Prtksxna has uploaded a new change for review.

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

Change subject: add toc
......................................................................

add toc

Change-Id: Ic059b8dda7783369bea5bbfda01010201cc13d28
---
M Blueprint.php
M resources/master.less
A resources/toc.js
3 files changed, 43 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Blueprint 
refs/changes/42/204042/1

diff --git a/Blueprint.php b/Blueprint.php
index d9a7d7e..469594a 100644
--- a/Blueprint.php
+++ b/Blueprint.php
@@ -61,7 +61,10 @@
                'position' => 'top',
        ) + $styleguideSkinResourceTemplate,
        'skin.blueprint' => array(
-               'scripts' => 'menu.js',
+               'scripts' => array(
+                       'menu.js',
+                       'toc.js',
+               ),
                'dependencies' => 'ext.bootstrap',
        ) + $styleguideSkinResourceTemplate,
 );
diff --git a/resources/master.less b/resources/master.less
index ec22606..216fc73 100644
--- a/resources/master.less
+++ b/resources/master.less
@@ -99,7 +99,7 @@
 
        ul {
                list-style: none;
-               padding: 10px 20px;
+               padding: 0;
 
                li {
                        padding: 10px 0;
@@ -149,7 +149,40 @@
                        }
                }
        }
+
 }
+
+#toc {
+       font-weight: 200;
+       font-size: 0.8em;
+       margin-top: 60px;
+
+       #toctitle {
+               display: none;
+       }
+
+       .tocnumber {
+               display: inline-block;
+               width: 60px;
+       }
+
+       ul {
+               margin: 0;
+       }
+
+       a {
+               display: inline-block;
+               padding: 5px 10px;
+               width: 280px;
+               border-radius: 2px;
+
+               &:hover {
+                       background: rgba(0,0,0,0.2);
+               }
+       }
+}
+
+
 /* Offscreen Navigation */
 
 /* Navbar */
diff --git a/resources/toc.js b/resources/toc.js
new file mode 100644
index 0000000..d5f7473
--- /dev/null
+++ b/resources/toc.js
@@ -0,0 +1,5 @@
+$( function () {
+       $( '#toc' )
+               .detach()
+               .appendTo( $( '#off-navigation' ) );
+} );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic059b8dda7783369bea5bbfda01010201cc13d28
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Blueprint
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