« get me outta code hell

footer layout tweaks - 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:
author(quasar) nebula <qznebula@protonmail.com>2022-08-17 23:21:34 -0300
committer(quasar) nebula <qznebula@protonmail.com>2022-08-17 23:21:34 -0300
commit2a575201526063d48c1292ae6bb66d55fbe808c9 (patch)
tree2ef3036a9df3d55ad44a3123d4294d20ee66c913 /src/upd8.js
parentac5cf2a1e11260ea7415c6e43b0f6270b68bbb69 (diff)
footer layout tweaks
Diffstat (limited to 'src/upd8.js')
-rwxr-xr-xsrc/upd8.js43
1 files changed, 24 insertions, 19 deletions
diff --git a/src/upd8.js b/src/upd8.js
index b433f96d..df5380ba 100755
--- a/src/upd8.js
+++ b/src/upd8.js
@@ -151,7 +151,7 @@ import FileSizePreloader from './file-size-preloader.js';
 
 const __dirname = path.dirname(fileURLToPath(import.meta.url));
 
-const CACHEBUST = 11;
+const CACHEBUST = 12;
 
 let COMMIT;
 try {
@@ -936,16 +936,6 @@ writePage.html = (
     ? transformMultiline(wikiInfo.footerContent)
     : '';
 
-  footer.content +=
-    '\n' +
-    getFooterLocalizationLinks(paths.pathname, {
-      defaultLanguage,
-      languages,
-      paths,
-      language,
-      to,
-    });
-
   const canonical = wikiInfo.canonicalBase
     ? wikiInfo.canonicalBase + (paths.pathname === '/' ? '' : paths.pathname)
     : '';
@@ -962,21 +952,36 @@ writePage.html = (
 
   const mainHTML =
     main.content &&
-    html.tag('main',
-      {
-        id: 'content',
-        class: main.classes,
-      },
-      main.content);
+      html.tag('main',
+        {
+          id: 'content',
+          class: main.classes,
+        },
+        main.content);
 
   const footerHTML =
-    footer.content &&
     html.tag('footer',
       {
+        [html.onlyIfContent]: true,
         id: 'footer',
         class: footer.classes,
       },
-      footer.content);
+      [
+        html.tag('div',
+          {
+            [html.onlyIfContent]: true,
+            class: 'footer-content',
+          },
+          footer.content),
+
+        getFooterLocalizationLinks(paths.pathname, {
+          defaultLanguage,
+          languages,
+          paths,
+          language,
+          to,
+        }),
+      ]);
 
   const generateSidebarHTML = (
     id,