Spage has uploaded a new change for review.
https://gerrit.wikimedia.org/r/243056
Change subject: [WIP] Structure the sidebar to be more Vector-like
......................................................................
[WIP] Structure the sidebar to be more Vector-like
Separate lists for the view and namespace "tabs" with hidden H3
headings, the way Vector does it.
Permits a cleaner fix for T113067, replacing ".mw-skin-bs-cn_ns" hack.
Bug: T114338
Bug: T113067
Change-Id: Icc07fdef2a8e3382a33efa7182ff0bdd9095c8ca
---
M resources/master.less
M templates/Skin.mustache
M templates/sidebar.mustache
3 files changed, 56 insertions(+), 36 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Blueprint
refs/changes/56/243056/1
diff --git a/resources/master.less b/resources/master.less
index 89a3e7e..b913824 100644
--- a/resources/master.less
+++ b/resources/master.less
@@ -104,6 +104,23 @@
font-size: 2em;
}
+ /*
+ Styling for namespace tabs (page, discussion) and views (read, edit,
view history, watch and other actions)
+ */
+
+ /* Navigation Labels */
+ div.blueprintSidebarStuff h3 {
+ display: none;
+ }
+
+ /*
+ * Hide the current tab (e.g. "Page" or "Discussion")
+ * in the content_navigation.namespace set of tabs.
+ */
+ #p-namespaces .selected {
+ display:none
+ }
+
ul {
list-style: none;
@@ -119,7 +136,7 @@
}
}
- .sidebar-toc {
+ .blueprintSidebarStuff,.sidebar-toc {
padding: 0 50px;
font-weight: 200;
@@ -194,13 +211,6 @@
#ca-talk {
background-image: url(talk.svg);
}
- }
- /*
- * Hide the current tab (e.g. "Page" or "Discussion")
- * in the content_navigation.namespace set of tabs.
- */
- .mw-skin-bs-cn_ns .selected {
- display:none
}
}
@@ -327,4 +337,4 @@
.nav li.open.open > a {
// Override bootstrap
border-color: @side-menu-border-color;
-}
\ No newline at end of file
+}
diff --git a/templates/Skin.mustache b/templates/Skin.mustache
index 327d557..f0e0803 100644
--- a/templates/Skin.mustache
+++ b/templates/Skin.mustache
@@ -1,7 +1,7 @@
{{{headelement}}}
<div id="side-menu">
- {{>sidebar}}
+ {{>sidebar}}{{! edit this comment to force recompilation, bug T113095}}
</div>
<nav class="navbar navbar-fixed-top">
diff --git a/templates/sidebar.mustache b/templates/sidebar.mustache
index 46d00ac..1f5c0f6 100644
--- a/templates/sidebar.mustache
+++ b/templates/sidebar.mustache
@@ -1,29 +1,39 @@
<h6 class="side-menu-heading">{{titletext}}</h6>
-<ul class="content-links">
- {{#each content_navigation.views}}
- <li>
- <a
- href="{{href}}"
- class="{{class}}"
- {{#if rel}}rel="{{rel}}"{{/if}}
- {{#if id}}id="{{id}}"{{/if}}
- >
- {{text}}
- </a>
- </li>
- {{/each}}
- {{#each content_navigation.namespaces}}
- <li class="mw-skin-bs-cn_ns">
- <a
- href="{{href}}"
- class="{{class}}"
- id="{{id}}"
- >
- {{text}}
- </a>
- </li>
- {{/each}}
-</ul>
+<div>
+ <div aria-labelledby="p-views-label" class="blueprintSidebarStuff"
role="navigation" id="p-views">
+ <h3 id="p-views-label">Views</h3>
+ <ul class="content-links">
+ {{#each content_navigation.views}}
+ <li>
+ <a
+ href="{{href}}"
+ class="{{class}}"
+ {{#if rel}}rel="{{rel}}"{{/if}}
+ {{#if id}}id="{{id}}"{{/if}}
+ >
+ {{text}}
+ </a>
+ </li>
+ {{/each}}
+ </ul>
+ </div>
+ <div aria-labelledby="p-namespaces-label" class="blueprintSidebarStuff"
role="navigation" id="p-namespaces">
+ <h3 id="p-namespaces-label">Namespaces</h3>
+ <ul class="content-links">
+ {{#each content_navigation.namespaces}}
+ <li>
+ <a
+ href="{{href}}"
+ class="{{class}}"
+ id="{{id}}"
+ >
+ {{text}}
+ </a>
+ </li>
+ {{/each}}
+ </ul>
+ </div>
+</div>
<ul class="toc sidebar-toc">
{{#each left_nav_sections}}
<li class="{{#if current}}sidebar-toc-active{{/if}} sidebar-toc-page">
@@ -33,4 +43,4 @@
</a>
</li>
{{/each}}
-</ul>
+</div>
--
To view, visit https://gerrit.wikimedia.org/r/243056
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Icc07fdef2a8e3382a33efa7182ff0bdd9095c8ca
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Blueprint
Gerrit-Branch: master
Gerrit-Owner: Spage <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits