From 73e2f31b6d8eccb938b65a7337ed856d882d822a Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Thu, 3 Jun 2021 11:37:05 -0300 Subject: prefer consistent layout HTML over hacky CSS --- src/static/site.css | 13 ++----------- src/upd8.js | 14 +++++++------- 2 files changed, 9 insertions(+), 18 deletions(-) diff --git a/src/static/site.css b/src/static/site.css index cc2e926..4ccbdc1 100644 --- a/src/static/site.css +++ b/src/static/site.css @@ -40,9 +40,8 @@ body::before { } #page-container > * { - --margin: 15px; /* necessary for size calculations due to CSS suckery */ - margin-left: var(--margin); - margin-right: var(--margin); + margin-left: 15px; + margin-right: 15px; } #banner { @@ -908,14 +907,6 @@ li > ul { columns: 1; } - #content { - width: 100%; - } - - #page-container > #content { - width: calc(100% - calc(var(--margin) * 2)); - } - #cover-art-container { float: none; margin: 0 10px 10px 10px; diff --git a/src/upd8.js b/src/upd8.js index b37dabd..a2262d6 100755 --- a/src/upd8.js +++ b/src/upd8.js @@ -1978,13 +1978,13 @@ writePage.html = (pageFn, { const layoutHTML = [ navHTML, banner.position === 'top' && bannerHTML, - (sidebarLeftHTML || sidebarRightHTML) ? fixWS` -
- ${sidebarLeftHTML} - ${mainHTML} - ${sidebarRightHTML} -
- ` : mainHTML, + html.tag('div', + {class: ['layout-columns', !collapseSidebars && 'vertical-when-thin']}, + [ + sidebarLeftHTML, + mainHTML, + sidebarRightHTML + ]), banner.position === 'bottom' && bannerHTML, footerHTML ].filter(Boolean).join('\n'); -- cgit 1.3.0-6-gf8a5