From ed055b9487ca8902ada8462195c2924237d77ad4 Mon Sep 17 00:00:00 2001 From: Isarra Date: Wed, 21 Aug 2019 16:38:05 +0000 Subject: [PATCH] Add custom WikiLove heart icon Requires I7188a3ee318db80484037733ab058a5a0b42d732 for support for the replacement with the icon on desktop, as otherwise we can't tell if we're correctly heeding the configuration setting there. Removing as a depends-on because we still need this for mobile regardless. Bug: T173219 Change-Id: I6ee0b6d94d96ee359321b203f235b2d25f06cea6 --- resources/extensions/WikiLove.icon.less | 18 ++++++++ resources/images/heart-grey.png | Bin 0 -> 636 bytes resources/images/heart-grey.svg | 54 ++++++++++++++++++++++++ skin.json | 3 +- 4 files changed, 74 insertions(+), 1 deletion(-) create mode 100644 resources/extensions/WikiLove.icon.less create mode 100644 resources/images/heart-grey.png create mode 100644 resources/images/heart-grey.svg diff --git a/resources/extensions/WikiLove.icon.less b/resources/extensions/WikiLove.icon.less new file mode 100644 index 0000000..a48fa27 --- /dev/null +++ b/resources/extensions/WikiLove.icon.less @@ -0,0 +1,18 @@ +@import '../variables.less'; + +@media screen { + // Only apply icon if setting enabled + @media ( min-width: @desktop-small-floor ) { + #ca-wikilove.icon a { + .ca-icon(); + .background-image-svg( '../images/heart-grey.svg', '../images/heart-grey.png' ); + } + } + + @media ( max-width: @mobile-width ) { + #ca-wikilove a { + .ca-icon(); + .background-image-svg( '../images/heart-grey.svg', '../images/heart-grey.png' ); + } + } +} diff --git a/resources/images/heart-grey.png b/resources/images/heart-grey.png new file mode 100644 index 0000000000000000000000000000000000000000..a202b233fdc631b316e92417cb6b898bb828cdc1 GIT binary patch literal 636 zcmV-?0)zdDP)g11qq0uZYhP;O$ z528@P!MZ!>>e5YwLR*YOllx3+5HdM9xd}o>MMnogDEYxlB{>egPhOL>nZ@t&&i&r+ z_j}KI_riY%nMO7mjm6<`cuhq1GMUWhLZL7KXf~U{9$ByI7sp>kAN$hP#QM48WK`$mwBm-U7Z2(Jl83A)ZPDD0UHJ1Gb`oL-6 zzU#W@ft&HB6Bl6^mTZ^;4}f`K5qKSIRCPOwqJ>hav|u#~>0%ANeAHh_o4l=Xp=ZIom{AM3zIVVOazL^J6ql|#;nZ>tJP|cfIPrxG>W~4pN%nQ7g({KZuk5BhvjlPN@`lI z)~QaX^HN00mfH0^@9(7~N2b^7-4T&jw&QX(oBdd?*DoXvJlE}ZKg3}ovXf4y?;iRM z)5bBztO74MxU`?D>I3^C@&-5y3{~}s@B7cky;B1L!Z2J?)g9mruy5&;z^{WB + + + + + image/svg+xml + + + + + + + + + + + + + + diff --git a/skin.json b/skin.json index a8e2454..b2fa2f5 100644 --- a/skin.json +++ b/skin.json @@ -91,7 +91,8 @@ "+ext.visualEditor.desktopArticleTarget.noscript": "resources/extensions/VisualEditor.article.less", "+ext.CodeMirror.visualEditor.init": "resources/extensions/VisualEditor.CodeMirror.less", "+ext.dismissableSiteNotice.styles": "resources/extensions/DismissableSiteNotice.less", - "+ext.MWOAuth.AuthorizeForm": "resources/extensions/MWOAuth.AuthorizeForm.less" + "+ext.MWOAuth.AuthorizeForm": "resources/extensions/MWOAuth.AuthorizeForm.less", + "+ext.wikiLove.icon": "resources/extensions/WikiLove.icon.less" } }, "AutoloadClasses": {