« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/content/dependencies
diff options
context:
space:
mode:
Diffstat (limited to 'src/content/dependencies')
-rw-r--r--src/content/dependencies/generateContentContentHeading.js3
-rw-r--r--src/content/dependencies/generateCoverArtwork.js14
-rw-r--r--src/content/dependencies/generateCoverCarousel.js1
-rw-r--r--src/content/dependencies/generateCoverGrid.js1
-rw-r--r--src/content/dependencies/generatePageLayout.js11
-rw-r--r--src/content/dependencies/generateRelationsContentHeading.js3
-rw-r--r--src/content/dependencies/generateTrackInfoPage.js7
-rw-r--r--src/content/dependencies/image.js22
8 files changed, 23 insertions, 39 deletions
diff --git a/src/content/dependencies/generateContentContentHeading.js b/src/content/dependencies/generateContentContentHeading.js
index 3281caba..b311890b 100644
--- a/src/content/dependencies/generateContentContentHeading.js
+++ b/src/content/dependencies/generateContentContentHeading.js
@@ -46,7 +46,8 @@ export default {
 
           const name =
             (data.nameStyle === 'utility' ||
-             data.nameStyle === 'unofficial'
+             data.nameStyle === 'unofficial' ||
+             data.nameStyle === 'unofficial localization'
               ? null
               : data.name);
 
diff --git a/src/content/dependencies/generateCoverArtwork.js b/src/content/dependencies/generateCoverArtwork.js
index 616b3c95..008af70d 100644
--- a/src/content/dependencies/generateCoverArtwork.js
+++ b/src/content/dependencies/generateCoverArtwork.js
@@ -31,9 +31,6 @@ export default {
     color:
       artwork.thing.color ?? null,
 
-    dimensions:
-      artwork.dimensions,
-
     style:
       artwork.style,
   }),
@@ -75,17 +72,6 @@ export default {
 
     image.setSlot('alt', slots.alt);
 
-    const square =
-      (data.dimensions
-        ? data.dimensions[0] === data.dimensions[1]
-        : true);
-
-    if (square) {
-      image.setSlot('square', true);
-    } else {
-      image.setSlot('dimensions', data.dimensions);
-    }
-
     const attributes = html.attributes();
 
     let color = null;
diff --git a/src/content/dependencies/generateCoverCarousel.js b/src/content/dependencies/generateCoverCarousel.js
index 1ffeff8e..8232a842 100644
--- a/src/content/dependencies/generateCoverCarousel.js
+++ b/src/content/dependencies/generateCoverCarousel.js
@@ -38,7 +38,6 @@ export default {
                   content:
                     image.slots({
                       thumb: 'small',
-                      square: true,
                       lazy:
                         (typeof slots.lazy === 'number'
                           ? index >= slots.lazy
diff --git a/src/content/dependencies/generateCoverGrid.js b/src/content/dependencies/generateCoverGrid.js
index 6f87b54c..b3cdac96 100644
--- a/src/content/dependencies/generateCoverGrid.js
+++ b/src/content/dependencies/generateCoverGrid.js
@@ -143,7 +143,6 @@ export default {
 
                 image.slots({
                   thumb: 'medium',
-                  square: true,
                   lazy:
                     (typeof slots.lazy === 'number'
                       ? index >= slots.lazy
diff --git a/src/content/dependencies/generatePageLayout.js b/src/content/dependencies/generatePageLayout.js
index 00e6422b..e49075a1 100644
--- a/src/content/dependencies/generatePageLayout.js
+++ b/src/content/dependencies/generatePageLayout.js
@@ -307,15 +307,18 @@ export default {
             [language.onlyIfOptions]: ['title'],
           };
 
-          workingOptions.title = headingNamePart;
+          workingOptions.title =
+            html.tag('span', {class: 'title-part'},
+              headingNamePart);
 
           if (!html.isBlank(slots.titleDetail)) {
             workingCapsule += '.withDetail';
             workingOptions.detailAccent =
               html.tag('span', {class: 'name-detail'},
-                language.$(capsule, 'withDetail.accent', {
-                  detail: slots.titleDetail,
-                }));
+                html.metatag('chunkwrap', {split: ':'},
+                  language.$(capsule, 'withDetail.accent', {
+                    detail: slots.titleDetail,
+                  })));
           }
 
           return language.$(workingCapsule, workingOptions);
diff --git a/src/content/dependencies/generateRelationsContentHeading.js b/src/content/dependencies/generateRelationsContentHeading.js
index f4fd6ad4..60d90424 100644
--- a/src/content/dependencies/generateRelationsContentHeading.js
+++ b/src/content/dependencies/generateRelationsContentHeading.js
@@ -19,7 +19,8 @@ export default {
   generate(data, relations, slots, {html, language}) {
     const namePart =
       (data.nameStyle === 'utility' ||
-       data.nameStyle === 'unofficial'
+       data.nameStyle === 'unofficial' ||
+       data.nameStyle === 'unofficial localization'
         ? null
         : html.tag('i', data.name));
 
diff --git a/src/content/dependencies/generateTrackInfoPage.js b/src/content/dependencies/generateTrackInfoPage.js
index 08217561..ac96e072 100644
--- a/src/content/dependencies/generateTrackInfoPage.js
+++ b/src/content/dependencies/generateTrackInfoPage.js
@@ -194,6 +194,13 @@ export default {
                   name: data.name,
                 }))),
 
+          data.nameStyle === 'unofficial localization' &&
+            html.tag('p',
+              html.tag('i',
+                language.$('releaseInfo.unofficialLocalization', {
+                  name: data.name,
+                }))),
+
           relations.releaseInfo,
 
           html.tag('p',
diff --git a/src/content/dependencies/image.js b/src/content/dependencies/image.js
index af4b7fdd..4c945a20 100644
--- a/src/content/dependencies/image.js
+++ b/src/content/dependencies/image.js
@@ -19,11 +19,6 @@ export default {
             .filter(artTag => artTag.isContentWarning)
             .map(artTag => artTag.name)
         : null),
-
-    dimensions:
-      (artwork
-        ? artwork.dimensions
-        : null),
   }),
 
   slots: {
@@ -33,7 +28,6 @@ export default {
 
     reveal: {type: 'boolean', default: true},
     lazy: {type: 'boolean', default: false},
-    square: {type: 'boolean', default: false},
 
     link: {
       validate: v => v.anyOf(v.isBoolean, v.isString),
@@ -72,15 +66,15 @@ export default {
       mutable: false,
     },
 
+    dimensions: {
+      validate: v => v.isDimensions,
+    },
+
     // These will also be used from the artwork if not specified as slots.
 
     warnings: {
       validate: v => v.looseArrayOf(v.isString),
     },
-
-    dimensions: {
-      validate: v => v.isDimensions,
-    },
   },
 
   generate(data, relations, slots, {
@@ -123,7 +117,7 @@ export default {
       (typeof slots.link === 'string' || slots.link);
 
     const warnings = slots.warnings ?? data.warnings;
-    const dimensions = slots.dimensions ?? data.dimensions;
+    const dimensions = slots.dimensions;
 
     const willReveal =
       slots.reveal &&
@@ -352,16 +346,10 @@ export default {
 
       wrapped =
         html.tag('div', {class: 'image-outer-area'},
-          slots.square &&
-            {class: 'square-content'},
-
           wrapped);
 
       wrapped =
         html.tag('div', {class: 'image-container'},
-          slots.square &&
-            {class: 'square'},
-
           typeof slots.link === 'string' &&
             {class: 'no-image-preview'},