Adds dynamic TOC menu for plugins page

This commit is contained in:
Rowan Hogan 2015-07-01 23:01:25 +10:00
parent 597a492cdf
commit 1003f6a0f2
2 changed files with 16 additions and 4 deletions

View File

@ -103,11 +103,13 @@ h2:target {
}
h3 {
margin-top: 2em;
margin-top: 1.5em;
padding-top: .5em;
color: black;
font-weight: 500;
font-size: 1.4em;
}
h4 {
font-size: 1.1em;
font-weight: 500;
@ -476,6 +478,11 @@ table.plugins td:first-child a {
padding-bottom: .333em;
}
#toc-copy hr {
background-color: transparent;
margin: 0 0 .5em;
}
#toc-copy ul {
display: none;
list-style: none;
@ -676,6 +683,11 @@ table.plugins td:first-child a {
background: rgba(255,255,255,0.9);
}
.plugins-page #toc-copy h4:hover + ul:after,
.plugins-page #toc-copy ul:hover:after {
width: 17em;
}
#toc-copy h4:hover, #toc-copy h4.hover {
color: black;
cursor: pointer;

View File

@ -2,7 +2,7 @@
var tocCopy = document.createElement('div');
tocCopy.id = 'toc-copy';
var toc = document.querySelector('.api-page #toc');
var toc = document.querySelector('#toc');
if (toc) {
tocCopy.innerHTML = toc.innerHTML;