From 2a575201526063d48c1292ae6bb66d55fbe808c9 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Wed, 17 Aug 2022 23:21:34 -0300 Subject: footer layout tweaks --- src/static/site2.css | 12 ++++++++++-- src/upd8.js | 43 ++++++++++++++++++++++++------------------- 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, -- cgit 1.3.0-6-gf8a5