« 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/content/dependencies/generateCoverArtwork.js2
-rw-r--r--src/content/dependencies/generatePageLayout.js6
2 files changed, 6 insertions, 2 deletions
diff --git a/src/content/dependencies/generateCoverArtwork.js b/src/content/dependencies/generateCoverArtwork.js
index 76db16da..a830d121 100644
--- a/src/content/dependencies/generateCoverArtwork.js
+++ b/src/content/dependencies/generateCoverArtwork.js
@@ -44,7 +44,7 @@ export default {
   generate(relations, slots, {html, language}) {
     switch (slots.mode) {
       case 'primary':
-        return html.tag('div', {id: 'cover-art-container'}, [
+        return html.tags([
           relations.image.slots({
             path: slots.path,
             alt: slots.alt,
diff --git a/src/content/dependencies/generatePageLayout.js b/src/content/dependencies/generatePageLayout.js
index 1591223a..e4c02fb2 100644
--- a/src/content/dependencies/generatePageLayout.js
+++ b/src/content/dependencies/generatePageLayout.js
@@ -258,7 +258,11 @@ export default {
       }, [
         titleHTML,
 
-        slots.cover,
+        html.tag('div', {
+          [html.onlyIfContent]: true,
+          id: 'cover-art-container',
+        }, slots.cover),
+
         slots.additionalNames,
 
         html.tag('div',