« get me outta code hell

footer layout tweaks - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
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
parentac5cf2a1e11260ea7415c6e43b0f6270b68bbb69 (diff)
footer layout tweaks
-rw-r--r--src/static/site2.css12
-rwxr-xr-xsrc/upd8.js43
2 files changed, 34 insertions, 21 deletions
diff --git a/src/static/site2.css b/src/static/site2.css
index 328ef7d..49c3ab8 100644
--- a/src/static/site2.css
+++ b/src/static/site2.css
@@ -197,14 +197,22 @@ footer {
   font-style: oblique;
 }
 
-footer > :first-child {
+.footer-content {
+  margin: 5px 12%;
+}
+
+.footer-content > :first-child {
   margin-top: 0;
 }
 
-footer > :last-child {
+.footer-content > :last-child {
   margin-bottom: 0;
 }
 
+.footer-localization-links {
+  margin: 5px 12%;
+}
+
 .footer-localization-links > span:not(:last-child)::after {
   content: " \00b7 ";
   font-weight: 800;
diff --git a/src/upd8.js b/src/upd8.js
index b433f96..df5380b 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,