diff options
author | (quasar) nebula <towerofnix@gmail.com> | 2021-06-03 11:37:05 -0300 |
---|---|---|
committer | (quasar) nebula <towerofnix@gmail.com> | 2021-06-03 11:37:45 -0300 |
commit | 73e2f31b6d8eccb938b65a7337ed856d882d822a (patch) | |
tree | 9ed4d69690bbe4618b447945d8a884bef416d677 | |
parent | f4fe294d709add9164c57cf76cdd741c99d47855 (diff) |
prefer consistent layout HTML over hacky CSS
-rw-r--r-- | src/static/site.css | 13 | ||||
-rwxr-xr-x | src/upd8.js | 14 |
2 files changed, 9 insertions, 18 deletions
diff --git a/src/static/site.css b/src/static/site.css index cc2e9268..4ccbdc11 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 b37dabd9..a2262d6a 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` - <div ${classes('layout-columns', !collapseSidebars && 'vertical-when-thin')}> - ${sidebarLeftHTML} - ${mainHTML} - ${sidebarRightHTML} - </div> - ` : mainHTML, + html.tag('div', + {class: ['layout-columns', !collapseSidebars && 'vertical-when-thin']}, + [ + sidebarLeftHTML, + mainHTML, + sidebarRightHTML + ]), banner.position === 'bottom' && bannerHTML, footerHTML ].filter(Boolean).join('\n'); |