Commit graph

19 commits

Author SHA1 Message Date
Saint Johann e0547ff7cc Fix background-size on thumbnails
Bug: T229664
Change-Id: I001e3aea67ca09bf657b3895c7e0bcb4c63412ea
2019-08-07 10:53:50 +00:00
Isarra b31970084f Use SkinAfterContent hook to place cards in the DOM
This allows skins to determine where the cards appear in a consistent
fashion with other extensions, and require minimal special handling from
the extension itself.

Also change default settings as to when RelatedArticle cards will appear
- keep the whitelist to allow projects to configure their usage such as
in the case of only wanting it on mobile, etc, but now that it should
just work in any given skin, default it to on for all so that it's easier
for the average third party to install for whatever use.

Note that this default setting change will not affect WMF wikis, as
wmgRelatedArticlesFooterWhitelistedSkins is explicitly set in the
wmf-config regardless.

Bug: T181242
Depends-On: I5b0ad889e633fde88c392577ce5373c81fc5486a
Change-Id: Iebd759c0d1a536768d18953f372664df762d9e04
2019-07-26 19:28:49 +00:00
Volker E 2d7c4e979e Update 'noimage' to unified 'article' icon
Equivalent to latest 'article' icon in Design Style Guide and OOUI.
Also updating `.list-thumb-none` class to align icon and simplify
maintenance.

Bug: T222717
Change-Id: I49a89afa3d370abc4cf282a0bf8d44ee2751aa78
2019-06-05 17:05:31 -07:00
Jan Drewniak fcd4d1a272 Hygiene: Followup from 191fc2a
pass a collection of jQuery objects to `.append` instead of
and array.

Use `.css` instead of `.attr` to set thumbnail background image.

Change a unit to reflect the escaping pattern of the `.css` method

Bug: T219846
Change-Id: I6359be2db6c7c7a8e4b52296e0801d4ded921b46
2019-05-01 22:28:47 +02:00
Volker E a7e6c196f7 Remove -o-linear-gradient for Opera 11.5, Opera Mobile 12
Removing obsolete vendor property specifically for old subversion
of Opera < 12.1, desktop and mobile.

Change-Id: Id9a8a9fffb594f3973486f7be243329abdc9a5fa
2019-04-17 12:54:23 -07:00
Jan Drewniak 191fc2af9d Remove muhogan templates and module
Removes the muhogan module along with the templates and replacing
them with jQuery DOM construction.

Bug: T219846
Change-Id: I246f9c46ea2cc5721ddd57efcf58fae9fd947c58
2019-04-10 17:14:28 +02:00
Volker E 1fc22a3892 Remove .background-size() mixin usage
Removing deprecated LESS `.background-size()` mixin calls.

Bug: T219956
Change-Id: I2602fb46b3ae757ad2f1653ff3862fbc59adfc9c
2019-04-02 19:58:07 -07:00
Volker E 9a5d59caee build: Update 'stylelint-config-wikimedia' to v0.5.0 and make pass
Also enabling 'no-descending-specificity' rule and the same time
simplify VE hidden rule.

Change-Id: Idad811e7fca681883fccbc961c70f49e2b356c02
2019-01-16 19:26:36 -08:00
Fomafix 00405b0309 Remove mediaWiki and jQuery from eslint globals
Remove all mappings in the closures like in
I7cf2426cde597259e8c6f3f6f615a1a81a0ca82b in core.

Change-Id: Ie9a2fadb8e276774784a4937bb5c3ec11f213352
2018-09-15 17:54:03 +00:00
Fomafix 0fa064728f Use native JavaScript instead of jQuery
Replace
* $.each( array, function ( index, value ) { ... } ) by
  array.forEach( function ( value ) { ... } )

* $.map( array, function ( value ) { ... } ) by
  array.map( function ( value ) { ... } )

* $.isArray( var ) by
  Array.isArray( var )

* $.isFunction( var ) by
  typeof var === 'function'

Change-Id: I450f5a75eb9c3fe20517da02986b0a491ebca67a
2018-08-17 12:45:12 +02:00
Stephen Niedzielski 4e92ea4680 Fix: replace deviceTabletWidth w/ width-breakpoint-tablet in LESS
T140804 dropped the support for deviceTabletWidth in core
(https://gerrit.wikimedia.org/r/#/c/mediawiki/core/+/451648/9/includes/DefaultSettings.php).

Bug: T202021
Change-Id: I0d215bcd66654ac8646e6cc66f673e7e7b7fe945
2018-08-16 09:23:56 -05:00
Volker E 2e0c5719ea Unify SVG markup
Align SVG markup across Foundation products by
- unifying XML declaration,
- removing `enable-background` as it's deprecated and
- unifying whitespace.

Bug: T178867
Change-Id: I32972de815484fa89bd7cdacbbcd65f4663a4161
2017-12-18 19:43:17 -08:00
Ed Sanders 10de1deaf4 build: Update eslint and stylelint
Change-Id: I82bfb5fbfea4997f3048305574d2ff7d28ecd1b8
2017-10-09 15:37:28 +01:00
Volker E 6add5a1eac Align 'noimage' to WikimediaUI color palette
Aligning 'noimage' to overhauled color palette, background-color
equaling footer color and icon color going to closest,
minimally higher contrast color `#72777d`.

Bug: T172850
Change-Id: I949db4983910ef6609124adbfcd3c0d31a7f7eb4
2017-08-25 06:12:14 -07:00
Volker E 581a247d70 Replace abandoned colors with current WikimediaUI ones
Replacing abandoned `@colorGray8` (`#888`) & `@colorGray9` (`#999`)
with slightly increased contrast, WCAG 2.0 level AA conformant,
`@colorGray7` from WikimediaUI color palette.

Bug: T172850
Change-Id: I750261b83cc79c32e9ccdb2d69bb5e396b20ed35
2017-08-09 17:49:35 -04:00
jenkins-bot 38ac4650e0 Merge "Make number of RelatedArticles configurable" 2017-07-06 21:09:06 +00:00
jdlrobson 9126c7d0ef Make number of RelatedArticles configurable
Wikivoyage pages have more than 3 related articles as they make use
of the {{#related:}}  magic word.

After speaking with Nirzar we should allow this project to show more than 3.
This change allows this while keeping the existing behaviour on other wikis and
will pave the way for removing a bunch of code from this extension.

Additional changes:
* Cleanup skinStyles definitions
* Limit cards to 30% maximum width and give margin top to account for
situations where the number of cards are multiple of 3
** In Minerva hardcode the max-width to pixels.
* Margins are switched from hardcoded 10px to percentage based. Yes
this changes the right margin slightly but is more maintable and visually
the same.

Bug: T164765
Change-Id: I41119de3228c2df799f740d4bd00082101c21b97
2017-07-06 11:17:47 -07:00
jdlrobson 4598d9b567 Remove CardsGateway (unused)
Bug: T167647
Change-Id: I7e2a7777a5f28991d77deab520a55d3bd242104b
2017-06-14 13:10:01 -07:00
jdlrobson 6dee0147f4 Migrate Cards code to RelatedArticles
* Move across all files
* Rename ext-card- prefix to ext-related-articles- prefix
** Since all code using these prefixes is JS
  we do not have to worry about cached HTML

Bug: T137021
Change-Id: I784fd132c36329fa0dcc49fe2804460061940347
2017-06-07 08:35:53 -07:00