« get me outta code hell

content, css: generatePageLayout: drop has-#-sidebars - 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>2024-06-03 17:05:46 -0300
committer(quasar) nebula <qznebula@protonmail.com>2024-06-03 17:05:46 -0300
commit813077eaf47a228d8e9122cb6a83a370478da5d8 (patch)
tree8e28b02e3ffe73398be926603be835e113146a01
parentd519780f9863ad8fa0bd3057e308f07c112f0985 (diff)
content, css: generatePageLayout: drop has-#-sidebars
-rw-r--r--src/content/dependencies/generatePageLayout.js7
-rw-r--r--src/static/css/site.css10
2 files changed, 6 insertions, 11 deletions
diff --git a/src/content/dependencies/generatePageLayout.js b/src/content/dependencies/generatePageLayout.js
index fd5df91d..da7f4a41 100644
--- a/src/content/dependencies/generatePageLayout.js
+++ b/src/content/dependencies/generatePageLayout.js
@@ -678,13 +678,6 @@ export default {
           html.tag('body',
             [
               html.tag('div', {id: 'page-container'},
-                (hasSidebarLeft || hasSidebarRight
-                  ? {class: 'has-one-sidebar'}
-                  : {class: 'has-zero-sidebars'}),
-
-                hasSidebarLeft && hasSidebarRight &&
-                  {class: 'has-two-sidebars'},
-
                 hasSidebarLeft &&
                   {class: 'has-sidebar-left'},
 
diff --git a/src/static/css/site.css b/src/static/css/site.css
index aff773c5..295f1c5c 100644
--- a/src/static/css/site.css
+++ b/src/static/css/site.css
@@ -2566,7 +2566,8 @@ html[data-language-code="preview-en"][data-url-key="localized.home"] #content
 /* Layout - Wide (most computers) */
 
 @media (min-width: 900px) {
-  #page-container:not(.has-zero-sidebars) #secondary-nav {
+  #page-container.showing-sidebar-left #secondary-nav,
+  #page-container.showing-sidebar-left #secondary-nav {
     display: none;
   }
 }
@@ -2583,7 +2584,8 @@ html[data-language-code="preview-en"][data-url-key="localized.home"] #content
    * don't apply the similar layout change of widening the long-content area
    * if this page doesn't have a sidebar to hide in the first place.
    */
-  #page-container:not(.has-zero-sidebars) main.long-content {
+  #page-container.showing-sidebar-left main.long-content,
+  #page-container.showing-sidebar-right main.long-content {
     --long-content-padding-ratio: 0.06;
   }
 }
@@ -2615,12 +2617,12 @@ html[data-language-code="preview-en"][data-url-key="localized.home"] #content
     z-index: 2;
   }
 
-  html[data-url-key="localized.home"] #page-container.has-one-sidebar .grid-listing > .grid-item:not(:nth-child(n+7)) {
+  html[data-url-key="localized.home"] #page-container.showing-sidebar-left .grid-listing > .grid-item:not(:nth-child(n+7)) {
     flex-basis: 23%;
     margin: 15px;
   }
 
-  html[data-url-key="localized.home"] #page-container.has-one-sidebar .grid-listing > .grid-item:nth-child(n+7) {
+  html[data-url-key="localized.home"] #page-container.showing-sidebar-left .grid-listing > .grid-item:nth-child(n+7) {
     flex-basis: 18%;
     margin: 10px;
   }