Paladox has submitted this change and it was merged.

Change subject: Update Metrolook
......................................................................


Update Metrolook

* Adds some new settings. please see README.md for new settings.

* Some cleaning up.

Change-Id: I2516293315d70844f0ce7e8cd5eb1f7059a98302
---
M Metrolook.php
M MetrolookTemplate.php
M README.md
M collapsibleNav.js
M components/collapsibleNav.less
M components/common.less
M components/navigation.less
7 files changed, 78 insertions(+), 86 deletions(-)

Approvals:
  Paladox: Verified; Looks good to me, approved



diff --git a/Metrolook.php b/Metrolook.php
index ac11f86..f102585 100644
--- a/Metrolook.php
+++ b/Metrolook.php
@@ -25,7 +25,7 @@
        'path' => __FILE__,
        'name' => 'Metrolook',
        'description' => 'Metrolook skin for MediaWiki.',
-       'version' => '2.4.9',
+       'version' => '2.4.10',
        'url' => 'https://www.mediawiki.org/wiki/Skin:Metrolook',
        'author' => array( 'immewnity', 'paladox2015', 'Craig Davison', 
'lagleki' ),
        'license-name' => 'GPLv2+',
@@ -59,13 +59,15 @@
  */
 $GLOBALS['wgVectorUseIconWatch'] = true;
 
-/* To enable logo. Note that if enabled it will not show properly.*/
-$GLOBALS['Logoshow'] = true;
+/* Logo is off by default to turn it on plase see README.md. Note that if 
enabled it will not show properly.*/
+$GLOBALS['logo'] = false;
 
 /* to enable search bar on the sidebar and disables the search bar on the top 
bar */
 $GLOBALS['SearchBar'] = true;
 
 $GLOBALS['DownArrow'] = true;
+
+$GLOBALS['Line'] = true;
 
 $GLOBALS['link1'] = true;
 
@@ -92,8 +94,6 @@
 $GLOBALS['image6'] = false;
 
 $GLOBALS['UploadButton'] = true;
-
-$GLOBALS['logo'] = false;
 
 // Register modules
 $GLOBALS['wgResourceModules']['skins.metrolook.styles'] = array(
diff --git a/MetrolookTemplate.php b/MetrolookTemplate.php
index c254ea3..3b0a365 100644
--- a/MetrolookTemplate.php
+++ b/MetrolookTemplate.php
@@ -37,9 +37,10 @@
         * Outputs the entire contents of the (X)HTML page
         */
        public function execute() {
-               global $Logoshow;
+               global $logo;
                global $SearchBar;
                global $DownArrow;
+               global $Line;
                global $image1;
                global $link1;
                global $picture1;
@@ -65,7 +66,6 @@
                global $picture6;
                global $url6;
                global $UploadButton;
-               global $logo;
 
                // Build additional attributes for navigation urls
                $nav = $this->data['content_navigation'];
@@ -393,7 +393,7 @@
        ?>
        </ul>
 </div>
-<?php if ( $logo ): ?><div style="padding-left:10px;"><div class="lighthover" 
style="height:40px;float:left;"><div class="onhoverbg" 
style="height:40px;float:left;"><h4 class="title-name"><a href="<?php echo 
$this->data['nav_urls']['mainpage']['href']; ?>"><img alt="<?php echo 
$this->text('sitename'); ?>" src="<?php echo $this->text('logopath') ?>" 
style="max-width: 65px;height:auto; max-height:36px; display: inline-block; 
vertical-align:middle; padding-right:5px; 
padding-left:5px;"></div></h4></a><?php else: ?><div 
style="padding-left:10px;"><div class="lighthover" 
style="height:40px;float:left;"><div class="onhoverbg" 
style="height:40px;float:left;"><h4 class="title-name"><a href="<?php echo 
$this->data['nav_urls']['mainpage']['href']; ?>"><div class="title-name" 
style="font-size: 0.9em; 
padding-left:0.4em;padding-right:0.4em;color:white;max-width: auto;height:auto; 
max-height:700px; display: inline-block; vertical-align:middle;"><?php echo 
$GLOBALS['wgSitename'] ?></div></a></h4></div><?php endif; ?><img 
class="custom2" src="<?php echo htmlspecialchars( 
$this->getSkin()->getSkinStylePath( 'images/Transparent.gif' ) ) ?>" 
style="float:left;" /><?php if ( $DownArrow ): ?><img class="custom3" 
src="<?php echo htmlspecialchars( $this->getSkin()->getSkinStylePath( 
'images/Transparent.gif' ) ) ?>" style="height:60px;width:27px;cursor:pointer;" 
onclick="toggleDiv('bartile');"/><?php else: ?><?php endif; ?></div></div>
+<?php if ( $logo ): ?><div style="padding-left:10px;"><div class="lighthover" 
style="height:40px;float:left;"><div class="onhoverbg" 
style="height:40px;float:left;"><h4 class="title-name"><a href="<?php echo 
$this->data['nav_urls']['mainpage']['href']; ?>"><img alt="<?php echo 
$this->text('sitename'); ?>" src="<?php echo $this->text('logopath') ?>" 
style="max-width: 65px;height:auto; max-height:36px; display: inline-block; 
vertical-align:middle; padding-right:5px; 
padding-left:5px;"></div></h4></a><?php else: ?><div 
style="padding-left:10px;"><div class="lighthover" 
style="height:40px;float:left;"><div class="onhoverbg" 
style="height:40px;float:left;"><h4 class="title-name"><a href="<?php echo 
$this->data['nav_urls']['mainpage']['href']; ?>"><div class="title-name" 
style="font-size: 0.9em; 
padding-left:0.4em;padding-right:0.4em;color:white;max-width: auto;height:auto; 
max-height:700px; display: inline-block; vertical-align:middle;"><?php echo 
$GLOBALS['wgSitename'] ?></div></a></h4></div><?php endif; ?><?php if ( $Line 
): ?><img class="custom2" src="<?php echo htmlspecialchars( 
$this->getSkin()->getSkinStylePath( 'images/Transparent.gif' ) ) ?>" 
style="float:left;" /><?php else: ?><?php endif; ?><?php if ( $DownArrow ): 
?><img class="custom3" src="<?php echo htmlspecialchars( 
$this->getSkin()->getSkinStylePath( 'images/Transparent.gif' ) ) ?>" 
style="height:60px;width:27px;cursor:pointer;" 
onclick="toggleDiv('bartile');"/><?php else: ?><?php endif; ?></div></div>
 <?php if ( $DownArrow ): ?>
        <div id="top-tile-bar" class="fixed-position">
 
@@ -436,9 +436,8 @@
 
        </body>
 </html>
-
-   <?php
-   }
+<?php
+       }
 
        /**
         * Render a series of portals
diff --git a/README.md b/README.md
index 2d7579a..1fa3cec 100644
--- a/README.md
+++ b/README.md
@@ -24,7 +24,7 @@
 
 Please be aware that there are issues in the codes if you see any could you 
point it out it would help. and there are things like logos already set sorry i 
will put a setting there.
 
-A working demo of the skin is available at 
http://pidgi.net/metrolooktest/index.php/Main_Page . This is currently using 
MediaWiki 1.24wmf18 and version 2.3 of the master branch of the skin.
+A working demo of the skin is available at 
http://pidgi.net/metrolooktest/index.php/Main_Page . This is currently using 
MediaWiki 1.25wmf3 and version 3.0 beta 9 of the master branch of the skin.
 
 ## Installation
 
@@ -42,13 +42,9 @@
 
 To enable logo
 
-//$Logoshow = true;
-
 $logo = true;
 
 Default is
-
-//$Logoshow = false;
 
 $logo = false;
 
@@ -60,10 +56,6 @@
 
 $SearchBar = true;
 
-Default is
-
-$DownArrow = true;
-
 To turn it off
 
 $DownArrow = false;
@@ -71,6 +63,14 @@
 Default is
 
 $DownArrow = true;
+
+To turn it off
+
+$Line = false;
+
+Default is
+
+$Line = true;
 
 to change link
 
@@ -187,69 +187,69 @@
 /* Top Bar colour and hover colour start */
 
 #mw-page-base {
-    height: 2.5em;
-    background-color: dodgerBlue;
-    background-position: bottom left;
-    background-repeat: repeat-x;
-    /* This image is only a fallback (for IE 6-9), so we do not @embed it. */
-    background-image: url('images/page-fade.png');
-    min-width: auto;
+        height: 2.5em;
+        background-color: dodgerBlue;
+        background-position: bottom left;
+        background-repeat: repeat-x;
+        /* This image is only a fallback (for IE 6-9), so we do not @embed it. 
*/
+        background-image: url('images/page-fade.png');
+        min-width: auto;
 }
 
 @media only screen and (min-device-width : 768px) and (max-device-width : 
1024px) {
 #mw-page-base {
-    height: 2.5em;
-    background-color: dodgerBlue;
-    background-position: bottom left;
-    background-repeat: repeat-x;
-    /* This image is only a fallback (for IE 6-9), so we do not @embed it. */
-    background-image: url('images/page-fade.png');
-    min-width:65em;
+        height: 2.5em;
+        background-color: dodgerBlue;
+        background-position: bottom left;
+        background-repeat: repeat-x;
+        /* This image is only a fallback (for IE 6-9), so we do not @embed it. 
*/
+        background-image: url('images/page-fade.png');
+        min-width:65em;
 }
 }
 
 div.vectorTabs a:hover {
-         background-color: blue;
+        background-color: blue;
 }
 
 div.onhoverbg:hover {
-         background-color: blue;
+        background-color: blue;
 }
 
 img.custom3:hover{
-            background-color: blue;
+        background-color: blue;
 }
 
 div.vectorMenu:hover h5 a {
-           background-color: blue;
+        background-color: blue;
 }
 
 div.vectorMenu h5 a {
-    display: inline-block;
-    width: 24px;
-    height: 2em;
-    background-color: dodgerBlue; 
-    .background-image-svg('images/arrow-down-icon.svg', 
'images/arrow-down-icon.png');
-    background-position: 50% 50%; 
-    background-repeat: no-repeat;
-    .transition(background-position 250ms);
+        display: inline-block;
+        width: 24px;
+        height: 2em;
+        background-color: dodgerBlue; 
+        .background-image-svg('images/arrow-down-icon.svg', 
'images/arrow-down-icon.png');
+        background-position: 50% 50%; 
+        background-repeat: no-repeat;
+        .transition(background-position 250ms);
 }
 div.vectorMenu:hover {
-           background-color: blue;
+        background-color: blue;
 }
 
 div.vectorMenu ul {
-    position: absolute;
-    background-color: white;
-    border: solid 2px dodgerBlue;
-    border-top-width: 0;
-    list-style-type: none;
-    list-style-image: none;
-    padding: 0;
-    padding-top:5px;
-    margin: 0;
-    margin-left: -6px;
-    text-align: left;
+        position: absolute;
+        background-color: white;
+        border: solid 2px dodgerBlue;
+        border-top-width: 0;
+        list-style-type: none;
+        list-style-image: none;
+        padding: 0;
+        padding-top:5px;
+        margin: 0;
+        margin-left: -6px;
+        text-align: left;
 }
 
 /* Top Bar colour and hover colour end */
@@ -260,6 +260,13 @@
 
 * Mobile view of desktop is not shown correcly.
 
+## Support comming soon
+
+Note plans may change.
+
+Comming soon support for 
+
+* MediaWiki 1.21
 
 ## Version
 
@@ -269,6 +276,8 @@
 
 1.x.x requires MediaWiki 1.23.
 
+0.3.x requires MediaWiki 1.22.
+
 
 ## Removed things
 
diff --git a/collapsibleNav.js b/collapsibleNav.js
index 6cb7294..bd89c1a 100644
--- a/collapsibleNav.js
+++ b/collapsibleNav.js
@@ -121,16 +121,8 @@
 
                $headings = $( '#mw-panel > .portal:not(.persistent) > h5' );
 
-               // Get the highest tab index
-               tabIndex = $( document ).lastTabIndex() + 1;
-
-               // Fix the search not having a tabindex
-               $( '#searchInput' ).attr( 'tabindex', tabIndex++ );
-
                // Make it keyboard accessible
-               $headings.attr( 'tabindex', function () {
-                       return tabIndex++;
-               });
+               $headings.attr( 'tabindex', '0' );
 
                // Toggle the selected menu's class and expand or collapse the 
menu
                $( '#mw-panel' )
@@ -284,16 +276,8 @@
 
                $headings = $( '#mw-panel-custom > 
.portal-custom:not(.persistent) > h5' );
 
-               // Get the highest tab index
-               tabIndex = $( document ).lastTabIndex() + 1;
-
-               // Fix the search not having a tabindex
-               $( '#searchInput' ).attr( 'tabindex', tabIndex++ );
-
                // Make it keyboard accessible
-               $headings.attr( 'tabindex', function () {
-                       return tabIndex++;
-               });
+               $headings.attr( 'tabindex', '0' );
 
                // Toggle the selected menu's class and expand or collapse the 
menu
                $( '#mw-panel-custom' )
diff --git a/components/collapsibleNav.less b/components/collapsibleNav.less
index 18dd67d..127831e 100644
--- a/components/collapsibleNav.less
+++ b/components/collapsibleNav.less
@@ -16,7 +16,7 @@
                        background-position: left center;
                        background-repeat: no-repeat;
 /*                     .background-image-svg('images/arrow-expanded.svg', 
'images/arrow-expanded.png'); */
-            .background-image-svg('images/open.svg', 'images/open.png');
+                        .background-image-svg('images/open.svg', 
'images/open.png');
                        padding: @collapsible-nav-heading-padding;
                        margin-bottom: 0;
 
@@ -75,7 +75,7 @@
                                background-position: left center;
                                background-repeat: no-repeat;
 /*                             
.background-image-svg('images/arrow-collapsed-ltr.svg', 
'images/arrow-collapsed-ltr.png'); */
-                .background-image-svg('images/closed-ltr.svg', 
'images/closed-ltr.png');
+                                .background-image-svg('images/closed-ltr.svg', 
'images/closed-ltr.png');
                                margin-bottom: 0;
 
                                &:hover {
@@ -115,7 +115,7 @@
                        background-position: left center;
                        background-repeat: no-repeat;
 /*                     .background-image-svg('images/arrow-expanded.svg', 
'images/arrow-expanded.png'); */
-            .background-image-svg('images/open.svg', 'images/open.png');
+                        .background-image-svg('images/open.svg', 
'images/open.png');
                        padding: @collapsible-nav-heading-padding;
                        margin-bottom: 0;
 
@@ -174,7 +174,7 @@
                                background-position: left center;
                                background-repeat: no-repeat;
 /*                             
.background-image-svg('images/arrow-collapsed-ltr.svg', 
'images/arrow-collapsed-ltr.png'); */
-                .background-image-svg('images/closed-ltr.svg', 
'images/closed-ltr.png');
+                                .background-image-svg('images/closed-ltr.svg', 
'images/closed-ltr.png');
                                margin-bottom: 0;
 
                                &:hover {
diff --git a/components/common.less b/components/common.less
index 0041b7c..a536211 100644
--- a/components/common.less
+++ b/components/common.less
@@ -201,7 +201,7 @@
             background-repeat: no-repeat;
 }
 
-img.custom2{
+img.custom2 {
             position:inherit;
             .background-image-svg('images/line.svg', 'images/line.png'); 
             width:28px; /*width of your image*/
@@ -219,7 +219,7 @@
             background-repeat: no-repeat;
             background-position: -0px 20px
 }
-img.custom3:hover{
+img.custom3:hover {
             position:inherit;
             background: #9F6F40;
             .background-image-svg('images/downarrow.svg', 
'images/downarrow.png');
@@ -271,8 +271,8 @@
 }
 
 .hoverbox {
-background:#CF8B54;
+        background:#CF8B54;
 }
 .hoverbox:hover {
-background:#9F6F40;
+        background:#9F6F40;
 }
diff --git a/components/navigation.less b/components/navigation.less
index 3a13b66..65a2fd0 100644
--- a/components/navigation.less
+++ b/components/navigation.less
@@ -30,7 +30,7 @@
        /* This image is only a fallback (for IE 6-9), so we do not @embed it. 
*/
        background-image: url('images/page-fade.png');
        .vertical-gradient(#CF8B54, #CF8B54, 50%, 100%);
-    min-width:65em;
+       min-width:65em;
 }
 }
 #mw-head-base {
@@ -168,8 +168,8 @@
        }
 }
 
+/* Panel */
 @media only screen and (min-device-width : 768px) and (max-device-width : 
1024px) {
-    /* Panel */
 div#mw-panel {
         font-size: @menu-main-font-size;
         position: absolute;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2516293315d70844f0ce7e8cd5eb1f7059a98302
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/skins/Metrolook
Gerrit-Branch: REL1_24
Gerrit-Owner: Paladox <thomasmulhall...@yahoo.com>
Gerrit-Reviewer: Paladox <thomasmulhall...@yahoo.com>

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

Reply via email to