« get me outta code hell

content, css: generatePageLayout: move subtitle beneath cover - 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-11-17 16:34:12 -0400
committer(quasar) nebula <qznebula@protonmail.com>2024-11-17 16:35:55 -0400
commit02ec6fe9d628d3675645fab41eadef5397d269c3 (patch)
tree5427e965ac7f5c6d9499f0a7a0248e01eadad824
parent8069865a16a0dc4c2e1bbab1e0c1c11e45658d7b (diff)
content, css: generatePageLayout: move subtitle beneath cover
-rw-r--r--src/content/dependencies/generatePageLayout.js3
-rw-r--r--src/static/css/site.css8
2 files changed, 10 insertions, 1 deletions
diff --git a/src/content/dependencies/generatePageLayout.js b/src/content/dependencies/generatePageLayout.js
index ec1b3156..a895fe9a 100644
--- a/src/content/dependencies/generatePageLayout.js
+++ b/src/content/dependencies/generatePageLayout.js
@@ -300,12 +300,13 @@ export default {
 
         [
           titleHTML,
-          subtitleHTML,
 
           html.tag('div', {id: 'cover-art-container'},
             {[html.onlyIfContent]: true},
             slots.cover),
 
+          subtitleHTML,
+
           slots.additionalNames,
 
           html.tag('div', {class: 'main-content-container'},
diff --git a/src/static/css/site.css b/src/static/css/site.css
index 1ffe02fb..be13fded 100644
--- a/src/static/css/site.css
+++ b/src/static/css/site.css
@@ -2963,6 +2963,14 @@ html[data-language-code="preview-en"][data-url-key="localized.home"] #content
     z-index: 2;
   }
 
+  /* ...Except on top-indexes, where cover art is displayed prominently
+   * between the heading and subheading.
+   */
+  #content.top-index #cover-art-container {
+    float: none;
+    margin: 2em auto 2.5em auto;
+  }
+
   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;