Bmansurov has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/170873

Change subject: Improve reference display for better readability
......................................................................

Improve reference display for better readability

Change-Id: Ie668c15fbc6be16c9bbbacc9edbc79797a90d491
---
M i18n/en.json
M i18n/qqq.json
M includes/Resources.php
M javascripts/modules/references/references.js
M less/iconsNew.less
A less/images/cite.png
A less/images/cite.svg
D less/modules/references.less
A less/modules/references/references.less
M templates/modules/references/ReferencesDrawer.hogan
10 files changed, 78 insertions(+), 30 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend 
refs/changes/73/170873/1

diff --git a/i18n/en.json b/i18n/en.json
index 3abef62..504cd12 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -238,6 +238,7 @@
        "mobile-frontend-profile-userpage-link": "Visit {{GENDER:$1|user}} 
page.",
        "mobile-frontend-profile-usertalk": "{{GENDER:$1|Talk to $1}}",
        "mobile-frontend-random-button": "Random",
+       "mobile-frontend-references-citation": "Citation",
        "mobile-frontend-regular-site": "Desktop view",
        "mobile-frontend-requires-mobile": "This page is not available on 
desktop. Please click the mobile view link at the bottom of the page.",
        "mobile-frontend-requires-optin": "This page is not available unless 
you opt into our beta mode. Visit the [[Special:MobileOptions|settings page]] 
to opt in.",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 8130054..4438391 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -265,6 +265,7 @@
        "mobile-frontend-profile-userpage-link": "Label for a link to user page 
that shows on [[Special:UserProfile]].\n\nParameter:\n* $1 - username of user 
who talk page belongs to. Can be used for GENDER.",
        "mobile-frontend-profile-usertalk": "Link label to user talk 
page.\n\nParameters:\n* $1 - username of user who talk page belongs to. Can be 
used for GENDER.",
        "mobile-frontend-random-button": "This is the label of one of the 
buttons that appear if you click the wiki logo near the search box.\n\nThis 
buttons takes the user to a random page.\n{{Identical|Random}}",
+       "mobile-frontend-references-citation": "The title of the reference 
drawer that opens up when a reference link is clicked.",
        "mobile-frontend-regular-site": "When on the mobile site, this text 
links to the normal page for desktop computers",
        "mobile-frontend-requires-mobile": "Message that shows when a special 
page does not have a desktop equivalent.\n\nPoints user to mobile view link at 
bottom of page to switch to mobile.\n\nThis should be consistent with 
{{msg-mw|Mobile-frontend-view}}.",
        "mobile-frontend-requires-optin": "Message that shows when a page 
requires beta mode to work. Wikitext that links to [[Special:MobileOptions]] 
page.",
diff --git a/includes/Resources.php b/includes/Resources.php
index 7fe6233..7c467a1 100644
--- a/includes/Resources.php
+++ b/includes/Resources.php
@@ -679,8 +679,11 @@
                        'mobile.startup',
                        'mobile.stable.common',
                ),
+               'messages' => array(
+                       'mobile-frontend-references-citation',
+               ),
                'styles' => array(
-                       'less/modules/references.less',
+                       'less/modules/references/references.less',
                ),
                'templates' => array(
                        // references.js
diff --git a/javascripts/modules/references/references.js 
b/javascripts/modules/references/references.js
index 0be2096..f83a81a 100644
--- a/javascripts/modules/references/references.js
+++ b/javascripts/modules/references/references.js
@@ -11,9 +11,10 @@
        ReferencesDrawer = Drawer.extend( {
                defaults: {
                        cancelButton: new Icon( {
-                               name: 'cancel', additionalClassNames: 'cancel',
+                               name: 'cancel-light', additionalClassNames: 
'cancel',
                                label: mw.msg( 'mobile-frontend-overlay-close' )
-                       } ).toHtmlString()
+                       } ).toHtmlString(),
+                       citation: mw.msg( 'mobile-frontend-references-citation' 
)
                },
                className: 'drawer position-fixed text references',
                template: M.template.get( 
'modules/references/ReferencesDrawer.hogan' )
diff --git a/less/iconsNew.less b/less/iconsNew.less
index f4a2e2f..0baa6a2 100644
--- a/less/iconsNew.less
+++ b/less/iconsNew.less
@@ -76,6 +76,9 @@
 .mw-ui-icon-cancel {
        .m-background-image('images/cancel.png');
 }
+.mw-ui-icon-cancel-light {
+       .m-background-image('images/cancel-light.png');
+}
 
 .mw-ui-icon-clear {
        .m-background-image('images/clear.png');
diff --git a/less/images/cite.png b/less/images/cite.png
new file mode 100644
index 0000000..52188a4
--- /dev/null
+++ b/less/images/cite.png
Binary files differ
diff --git a/less/images/cite.svg b/less/images/cite.svg
new file mode 100644
index 0000000..e4218d4
--- /dev/null
+++ b/less/images/cite.svg
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 
6.00 Build 0)  -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" 
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd";>
+<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg"; 
xmlns:xlink="http://www.w3.org/1999/xlink"; x="0px" y="0px"
+        viewBox="0 0 24 24" enable-background="new 0 0 24 24" 
xml:space="preserve">
+<g>
+       <path fill="none" d="M14,12l-2-2l-2,2V6H8v13h8c0,0,1,0,1-1V6h-3V12z"/>
+       <path fill="#575757" d="M5,4v17h12c1,0,2-1,2-2V4H5z 
M17,18c0,1-1,1-1,1H8V6h2v6l2-2l2,2V6h3V18z"/>
+</g>
+</svg>
diff --git a/less/modules/references.less b/less/modules/references.less
deleted file mode 100644
index 1e71060..0000000
--- a/less/modules/references.less
+++ /dev/null
@@ -1,25 +0,0 @@
-@import "minerva.variables";
-@import "minerva.mixins";
-
-.references {
-       h3 {
-               margin: 0;
-               padding-right: 4px;
-               display: inline;
-       }
-
-       .mw-cite-backlink {
-               display: none;
-       }
-
-       // FIXME: Remove when mw-ui-icon in stable
-       .icon {
-               float: right;
-               margin-top: .7em;
-       }
-
-       .mw-ui-icon {
-               float: right;
-               line-height: normal;
-       }
-}
diff --git a/less/modules/references/references.less 
b/less/modules/references/references.less
new file mode 100644
index 0000000..5fc8bcb
--- /dev/null
+++ b/less/modules/references/references.less
@@ -0,0 +1,51 @@
+@import "minerva.variables";
+@import "minerva.mixins";
+
+.drawer.references {
+       background-color: @colorGray1;
+       color: @colorGray12;
+       padding: 20px;
+
+       &.text {
+               font-size: 1em;
+       }
+
+       .cite {
+               padding-bottom: 20px;
+               .text {
+                       color: @colorGray8;
+                       font-size: 0.75em;
+                       float: left;
+                       text-transform: uppercase;
+
+                       &:before {
+                               .background-image('../images/cite.svg');
+                               background-size: 12px 12px;
+                               margin-top: -.2em;
+                       }
+               }
+       }
+
+       .mw-cite-backlink {
+               display: none;
+       }
+
+       .reference-text {
+               line-height: 1.2;
+       }
+
+       .mw-ui-icon.cancel {
+               float: right;
+               line-height: normal;
+               height: 12px;
+               min-height: 12px;
+               min-width: 12px;
+               width: 12px;
+               &:before {
+                       height: 12px;
+                       margin: 0;
+                       min-height: 12px;
+                       width: 12px;
+               }
+       }
+}
diff --git a/templates/modules/references/ReferencesDrawer.hogan 
b/templates/modules/references/ReferencesDrawer.hogan
index 8adf9b7..4a077c9 100644
--- a/templates/modules/references/ReferencesDrawer.hogan
+++ b/templates/modules/references/ReferencesDrawer.hogan
@@ -1,3 +1,6 @@
-{{{cancelButton}}}
-<h3>{{title}}</h3>
+<div class="cite">
+       <div class="mw-ui-icon mw-ui-icon-before text">{{citation}}</div>
+       {{{cancelButton}}}
+</div>
+<sup>{{title}}</sup>
 {{{text}}}

-- 
To view, visit https://gerrit.wikimedia.org/r/170873
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie668c15fbc6be16c9bbbacc9edbc79797a90d491
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Bmansurov <bmansu...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to