Prtksxna has uploaded a new change for review.

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

Change subject: Move navigation and account links under a dropdown
......................................................................

Move navigation and account links under a dropdown

Change-Id: Ia6f42ea140e446322104bb8e5339e71bc2316632
---
M templates/Skin.php
M templates/Skin.template
M templates/sidebar.template
3 files changed, 48 insertions(+), 38 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/LivingStyleGuide 
refs/changes/05/186605/1

diff --git a/templates/Skin.php b/templates/Skin.php
index eee95a2..2d0b111 100644
--- a/templates/Skin.php
+++ b/templates/Skin.php
@@ -192,22 +192,29 @@
     
     return ''.$cx['funcs']['v']($cx, $in, array('headelement')).'
 
-       <div id="off-navigation">
-'.'    <h3>Navigation</h3>
-       <ul>
-'.$cx['funcs']['sec']($cx, $cx['funcs']['v']($cx, $in, 
array('sidebar','navigation')), $in, true, function($cx, $in) {return '         
<li id="'.htmlentities((string)$cx['funcs']['v']($cx, $in, array('id')), 
ENT_QUOTES, 'UTF-8').'">
-                       <a href="'.htmlentities((string)$cx['funcs']['v']($cx, 
$in, array('href')), ENT_QUOTES, 
'UTF-8').'">'.htmlentities((string)$cx['funcs']['v']($cx, $in, array('text')), 
ENT_QUOTES, 'UTF-8').'</a>
-               </li>
-';}).' </ul>
-       <h3>
-               <span class="glyphicon glyphicon-user"></span>
-'.(($cx['funcs']['ifvar']($cx, $cx['funcs']['v']($cx, $in, 
array('loggedin')))) ? '                    Logged in
-               ' : '
-                       Not logged in
-').'   </h3>
-       <ul>
-'.$cx['funcs']['sec']($cx, $cx['funcs']['v']($cx, $in, 
array('personal_urls')), $in, true, function($cx, $in) {return '                
<li><a href="'.htmlentities((string)$cx['funcs']['v']($cx, $in, array('href')), 
ENT_QUOTES, 'UTF-8').'" class="'.htmlentities((string)$cx['funcs']['v']($cx, 
$in, array('class')), ENT_QUOTES, 
'UTF-8').'">'.htmlentities((string)$cx['funcs']['v']($cx, $in, array('text')), 
ENT_QUOTES, 'UTF-8').'</a></li>
-';}).' </ul>'.'        </div>
+<div id="off-navigation">
+'.'    <div class="dropdown">
+               <button class="btn btn-default dropdown-toggle" type="button" 
id="navigation" data-toggle="dropdown" aria-expanded="true">
+                       <span class="glyphicon glyphicon-th"></span>
+                       <span class="caret"></span>
+               </button>
+               <ul class="dropdown-menu" role="menu" 
aria-labelledby="navigation">
+'.$cx['funcs']['sec']($cx, $cx['funcs']['v']($cx, $in, 
array('sidebar','navigation')), $in, true, function($cx, $in) {return '         
                <li id="'.htmlentities((string)$cx['funcs']['v']($cx, $in, 
array('id')), ENT_QUOTES, 'UTF-8').'">
+                                       <a 
href="'.htmlentities((string)$cx['funcs']['v']($cx, $in, array('href')), 
ENT_QUOTES, 'UTF-8').'">'.htmlentities((string)$cx['funcs']['v']($cx, $in, 
array('text')), ENT_QUOTES, 'UTF-8').'</a>
+                               </li>
+';}).'         </ul>
+       </div>
+       
+       <div class="dropdown">
+               <button class="btn btn-default dropdown-toggle" type="button" 
id="account" data-toggle="dropdown" aria-expanded="true">
+                       <span class="glyphicon glyphicon-user"></span>
+                       <span class="caret"></span>
+               </button>
+               <ul class="dropdown-menu" role="menu" aria-labelledby="account">
+'.$cx['funcs']['sec']($cx, $cx['funcs']['v']($cx, $in, 
array('personal_urls')), $in, true, function($cx, $in) {return '                
                <li><a href="'.htmlentities((string)$cx['funcs']['v']($cx, $in, 
array('href')), ENT_QUOTES, 'UTF-8').'" 
class="'.htmlentities((string)$cx['funcs']['v']($cx, $in, array('class')), 
ENT_QUOTES, 'UTF-8').'">'.htmlentities((string)$cx['funcs']['v']($cx, $in, 
array('text')), ENT_QUOTES, 'UTF-8').'</a></li>
+';}).'         </ul>
+       </div>
+'.'    </div>
 
        <div id="site-wrap">
                <nav class="navbar">
diff --git a/templates/Skin.template b/templates/Skin.template
index f4d6bf3..9b70a50 100755
--- a/templates/Skin.template
+++ b/templates/Skin.template
@@ -1,6 +1,6 @@
 {{{headelement}}}
 
-       <div id="off-navigation">
+<div id="off-navigation">
        {{>sidebar}}
        </div>
 
diff --git a/templates/sidebar.template b/templates/sidebar.template
index 5370cf2..f5d9b2e 100644
--- a/templates/sidebar.template
+++ b/templates/sidebar.template
@@ -1,21 +1,24 @@
-<h3>Navigation</h3>
-<ul>
-{{#each sidebar.navigation}}
-       <li id="{{id}}">
-               <a href="{{href}}">{{text}}</a>
-       </li>
-{{/each}}
-</ul>
-<h3>
-       <span class="glyphicon glyphicon-user"></span>
-       {{#if loggedin}}
-               Logged in
-       {{else}}
-               Not logged in
-       {{/if}}
-</h3>
-<ul>
-{{#each personal_urls}}
-       <li><a href="{{href}}" class="{{class}}">{{text}}</a></li>
-{{/each}}
-</ul>
\ No newline at end of file
+<div class="dropdown">
+       <button class="btn btn-default dropdown-toggle" type="button" 
id="navigation" data-toggle="dropdown" aria-expanded="true">
+               <span class="glyphicon glyphicon-th"></span>
+               <span class="caret"></span>
+       </button>
+       <ul class="dropdown-menu" role="menu" aria-labelledby="navigation">
+               {{#each sidebar.navigation}}
+                       <li id="{{id}}">
+                               <a href="{{href}}">{{text}}</a>
+                       </li>
+               {{/each}}
+       </ul>
+</div>
+<div class="dropdown">
+       <button class="btn btn-default dropdown-toggle" type="button" 
id="account" data-toggle="dropdown" aria-expanded="true">
+               <span class="glyphicon glyphicon-user"></span>
+               <span class="caret"></span>
+       </button>
+       <ul class="dropdown-menu" role="menu" aria-labelledby="account">
+               {{#each personal_urls}}
+                       <li><a href="{{href}}" 
class="{{class}}">{{text}}</a></li>
+               {{/each}}
+       </ul>
+</div>

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia6f42ea140e446322104bb8e5339e71bc2316632
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/LivingStyleGuide
Gerrit-Branch: master
Gerrit-Owner: Prtksxna <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to