Merge pull request #11636 from thaJeztah/various_changes

Minor cleanups in css and script
This commit is contained in:
Usha Mandya 2020-10-26 22:36:52 +00:00 committed by GitHub
commit fc8ed4e48d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 11 deletions

View File

@ -11,8 +11,8 @@ body {
color: $body-text; color: $body-text;
font-family: $font; font-family: $font;
font-size: $body-text-size; font-size: $body-text-size;
margin: $clear; margin: 0;
padding: $clear; padding: 0;
overflow-x: hidden; overflow-x: hidden;
} }

View File

@ -11,7 +11,6 @@ $global-header-height: 440px;
$bg-secondary-tabs: rgba(0, 0, 0, 0.05); $bg-secondary-tabs: rgba(0, 0, 0, 0.05);
$white: #fff; $white: #fff;
$black: #000; $black: #000;
$clear: 0;
/* /*
* standard mode * standard mode

View File

@ -28,17 +28,17 @@ function pageIsInSection(tree) {
} }
function walkTree(tree) { function walkTree(tree) {
for (let j = 0; j < tree.length; j++) { for (const page of tree) {
totalTopics++; totalTopics++;
if (tree[j].section) { if (page.section) {
let sectionHasPath = pageIsInSection(tree[j].section); let sectionHasPath = pageIsInSection(page.section);
outputLetNav.push('<li><a onclick="navClicked(' + totalTopics + ')" data-target="#item' + totalTopics + '" data-toggle="collapse" data-parent="#stacked-menu"') outputLetNav.push('<li><a onclick="navClicked(' + totalTopics + ')" data-target="#item' + totalTopics + '" data-toggle="collapse" data-parent="#stacked-menu"')
if (sectionHasPath) { if (sectionHasPath) {
outputLetNav.push('aria-expanded="true"') outputLetNav.push('aria-expanded="true"')
} else { } else {
outputLetNav.push('class="collapsed" aria-expanded="false"') outputLetNav.push('class="collapsed" aria-expanded="false"')
} }
outputLetNav.push(">" + tree[j].sectiontitle + '<span class="caret arrow"></span></a>'); outputLetNav.push(">" + page.sectiontitle + '<span class="caret arrow"></span></a>');
outputLetNav.push('<ul class="nav collapse'); outputLetNav.push('<ul class="nav collapse');
if (sectionHasPath) outputLetNav.push(" in"); if (sectionHasPath) outputLetNav.push(" in");
outputLetNav.push('" id="#item' + totalTopics + '" aria-expanded="'); outputLetNav.push('" id="#item' + totalTopics + '" aria-expanded="');
@ -48,15 +48,15 @@ function walkTree(tree) {
outputLetNav.push("false"); outputLetNav.push("false");
} }
outputLetNav.push('">'); outputLetNav.push('">');
walkTree(tree[j].section); walkTree(page.section);
outputLetNav.push("</ul></li>"); outputLetNav.push("</ul></li>");
} else { } else {
// just a regular old topic; this is a leaf, not a branch; render a link! // just a regular old topic; this is a leaf, not a branch; render a link!
outputLetNav.push('<li><a href="' + tree[j].path + '"') outputLetNav.push('<li><a href="' + page.path + '"')
if (tree[j].path === pageURL && !tree[j].nosync) { if (page.path === pageURL && !page.nosync) {
outputLetNav.push('class="active currentPage"') outputLetNav.push('class="active currentPage"')
} }
outputLetNav.push(">" + tree[j].title + "</a></li>") outputLetNav.push(">" + page.title + "</a></li>")
} }
} }
} }