« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/static/site.css13
-rwxr-xr-xsrc/upd8.js14
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');