« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/upd8.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/upd8.js')
-rwxr-xr-xsrc/upd8.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/upd8.js b/src/upd8.js
index 241392d..7a8a37c 100755
--- a/src/upd8.js
+++ b/src/upd8.js
@@ -854,6 +854,7 @@ writePage.html = (pageInfo, {
         sidebarLeft = {},
         sidebarRight = {},
         nav = {},
+        secondaryNav = {},
         footer = {},
         socialEmbed = {},
     } = pageInfo;
@@ -884,6 +885,10 @@ writePage.html = (pageInfo, {
     nav.content ??= '';
     nav.links ??= [];
 
+    secondaryNav ??= {};
+    secondaryNav.content ??= '';
+    secondaryNav.content ??= '';
+
     footer.classes ??= [];
     footer.content ??= (wikiInfo.footerContent ? transformMultiline(wikiInfo.footerContent) : '');
 
@@ -1005,6 +1010,14 @@ writePage.html = (pageInfo, {
         nav.content
     ]);
 
+    const secondaryNavHTML = html.tag('nav', {
+        [html.onlyIfContent]: true,
+        id: 'secondary-nav',
+        class: secondaryNav.classes
+    }, [
+        secondaryNav.content
+    ]);
+
     const bannerSrc = (
         banner.src ? banner.src :
         banner.path ? to(...banner.path) :
@@ -1026,6 +1039,7 @@ writePage.html = (pageInfo, {
     const layoutHTML = [
         navHTML,
         banner.position === 'top' && bannerHTML,
+        secondaryNavHTML,
         html.tag('div',
             {class: ['layout-columns', !collapseSidebars && 'vertical-when-thin']},
             [