« 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/generateAlbumCommentaryPage.js2
-rw-r--r--src/content/dependencies/generateAlbumInfoPage.js2
-rw-r--r--src/content/dependencies/generateArtistInfoPage.js8
-rw-r--r--src/content/dependencies/generateCommentarySection.js4
-rw-r--r--src/content/dependencies/generateContentHeading.js9
-rw-r--r--src/content/dependencies/generateFlashInfoPage.js4
-rw-r--r--src/content/dependencies/generateListingPage.js2
-rw-r--r--src/content/dependencies/generateTrackInfoPage.js22
8 files changed, 26 insertions, 27 deletions
diff --git a/src/content/dependencies/generateAlbumCommentaryPage.js b/src/content/dependencies/generateAlbumCommentaryPage.js
index 70f90d27..ccde11f8 100644
--- a/src/content/dependencies/generateAlbumCommentaryPage.js
+++ b/src/content/dependencies/generateAlbumCommentaryPage.js
@@ -204,7 +204,7 @@ export default {
             }) => [
               heading.slots({
                 tag: 'h3',
-                id: directory,
+                attributes: {id: directory},
                 color,
 
                 title:
diff --git a/src/content/dependencies/generateAlbumInfoPage.js b/src/content/dependencies/generateAlbumInfoPage.js
index ee08e507..1ef0cbbe 100644
--- a/src/content/dependencies/generateAlbumInfoPage.js
+++ b/src/content/dependencies/generateAlbumInfoPage.js
@@ -222,7 +222,7 @@ export default {
           sec.additionalFiles && [
             sec.additionalFiles.heading
               .slots({
-                id: 'additional-files',
+                attributes: {id: 'additional-files'},
                 title:
                   language.$('releaseInfo.additionalFiles.heading', {
                     additionalFiles:
diff --git a/src/content/dependencies/generateArtistInfoPage.js b/src/content/dependencies/generateArtistInfoPage.js
index 363be023..28b9e1d3 100644
--- a/src/content/dependencies/generateArtistInfoPage.js
+++ b/src/content/dependencies/generateArtistInfoPage.js
@@ -208,7 +208,7 @@ export default {
             sec.tracks.heading
               .slots({
                 tag: 'h2',
-                id: 'tracks',
+                attributes: {id: 'tracks'},
                 title: language.$('artistPage.trackList.title'),
               }),
 
@@ -253,7 +253,7 @@ export default {
             sec.artworks.heading
               .slots({
                 tag: 'h2',
-                id: 'art',
+                attributes: {id: 'art'},
                 title: language.$('artistPage.artList.title'),
               }),
 
@@ -282,7 +282,7 @@ export default {
             sec.flashes.heading
               .slots({
                 tag: 'h2',
-                id: 'flashes',
+                attributes: {id: 'flashes'},
                 title: language.$('artistPage.flashList.title'),
               }),
 
@@ -293,7 +293,7 @@ export default {
             sec.commentary.heading
               .slots({
                 tag: 'h2',
-                id: 'commentary',
+                attributes: {id: 'commentary'},
                 title: language.$('artistPage.commentaryList.title'),
               }),
 
diff --git a/src/content/dependencies/generateCommentarySection.js b/src/content/dependencies/generateCommentarySection.js
index 8ae1b2d0..c7f6fa6a 100644
--- a/src/content/dependencies/generateCommentarySection.js
+++ b/src/content/dependencies/generateCommentarySection.js
@@ -20,8 +20,8 @@ export default {
     html.tags([
       relations.heading
         .slots({
-          id: 'artist-commentary',
-          title: language.$('misc.artistCommentary')
+          attributes: {id: 'artist-commentary'},
+          title: language.$('misc.artistCommentary'),
         }),
 
       relations.entries,
diff --git a/src/content/dependencies/generateContentHeading.js b/src/content/dependencies/generateContentHeading.js
index ab883ed8..2753fe86 100644
--- a/src/content/dependencies/generateContentHeading.js
+++ b/src/content/dependencies/generateContentHeading.js
@@ -24,8 +24,10 @@ export default {
 
     color: {validate: v => v.isColor},
 
-    id: {type: 'string'},
-    tag: {type: 'string', default: 'p'},
+    tag: {
+      type: 'string',
+      default: 'p',
+    },
   },
 
   generate: (relations, slots, {html}) =>
@@ -34,9 +36,6 @@ export default {
 
       slots.attributes,
 
-      slots.id &&
-        {id: slots.id},
-
       slots.color &&
         relations.colorStyle.slot('color', slots.color),
 
diff --git a/src/content/dependencies/generateFlashInfoPage.js b/src/content/dependencies/generateFlashInfoPage.js
index fa30c6a2..eec32157 100644
--- a/src/content/dependencies/generateFlashInfoPage.js
+++ b/src/content/dependencies/generateFlashInfoPage.js
@@ -158,7 +158,7 @@ export default {
         sec.featuredTracks && [
           sec.featuredTracks.heading
             .slots({
-              id: 'features',
+              attributes: {id: 'features'},
               title:
                 language.$('releaseInfo.tracksFeatured', {
                   flash: html.tag('i', data.name),
@@ -171,7 +171,7 @@ export default {
         sec.contributors && [
           sec.contributors.heading
             .slots({
-              id: 'contributors',
+              attributes: {id: 'contributors'},
               title: language.$('releaseInfo.contributors'),
             }),
 
diff --git a/src/content/dependencies/generateListingPage.js b/src/content/dependencies/generateListingPage.js
index 0b896ee0..c94bef86 100644
--- a/src/content/dependencies/generateListingPage.js
+++ b/src/content/dependencies/generateListingPage.js
@@ -249,7 +249,7 @@ export default {
                   .clone()
                   .slots({
                     tag: 'dt',
-                    id,
+                    attributes: {id},
 
                     title:
                       formatListingString({
diff --git a/src/content/dependencies/generateTrackInfoPage.js b/src/content/dependencies/generateTrackInfoPage.js
index ae4ca621..77256092 100644
--- a/src/content/dependencies/generateTrackInfoPage.js
+++ b/src/content/dependencies/generateTrackInfoPage.js
@@ -333,7 +333,7 @@ export default {
           sec.otherReleases && [
             sec.otherReleases.heading
               .slots({
-                id: 'also-released-as',
+                attributes: {id: 'also-released-as'},
                 title: language.$('releaseInfo.alsoReleasedAs'),
               }),
 
@@ -374,7 +374,7 @@ export default {
           sec.contributors && [
             sec.contributors.heading
               .slots({
-                id: 'contributors',
+                attributes: {id: 'contributors'},
                 title: language.$('releaseInfo.contributors'),
               }),
 
@@ -384,7 +384,7 @@ export default {
           sec.references && [
             sec.references.heading
               .slots({
-                id: 'references',
+                attributes: {id: 'references'},
                 title:
                   language.$('releaseInfo.tracksReferenced', {
                     track: html.tag('i', data.name),
@@ -397,7 +397,7 @@ export default {
           sec.samples && [
             sec.samples.heading
               .slots({
-                id: 'samples',
+                attributes: {id: 'samples'},
                 title:
                   language.$('releaseInfo.tracksSampled', {
                     track: html.tag('i', data.name),
@@ -410,7 +410,7 @@ export default {
           sec.referencedBy && [
             sec.referencedBy.heading
               .slots({
-                id: 'referenced-by',
+                attributes: {id: 'referenced-by'},
                 title:
                   language.$('releaseInfo.tracksThatReference', {
                     track: html.tag('i', data.name),
@@ -423,7 +423,7 @@ export default {
           sec.sampledBy && [
             sec.sampledBy.heading
               .slots({
-                id: 'referenced-by',
+                attributes: {id: 'referenced-by'},
                 title:
                   language.$('releaseInfo.tracksThatSample', {
                     track: html.tag('i', data.name),
@@ -436,7 +436,7 @@ export default {
           sec.flashesThatFeature && [
             sec.flashesThatFeature.heading
               .slots({
-                id: 'featured-in',
+                attributes: {id: 'featured-in'},
                 title:
                   language.$('releaseInfo.flashesThatFeature', {
                     track: html.tag('i', data.name),
@@ -459,7 +459,7 @@ export default {
           sec.lyrics && [
             sec.lyrics.heading
               .slots({
-                id: 'lyrics',
+                attributes: {id: 'lyrics'},
                 title: language.$('releaseInfo.lyrics'),
               }),
 
@@ -471,7 +471,7 @@ export default {
           sec.sheetMusicFiles && [
             sec.sheetMusicFiles.heading
               .slots({
-                id: 'sheet-music-files',
+                attributes: {id: 'sheet-music-files'},
                 title: language.$('releaseInfo.sheetMusicFiles.heading'),
               }),
 
@@ -481,7 +481,7 @@ export default {
           sec.midiProjectFiles && [
             sec.midiProjectFiles.heading
               .slots({
-                id: 'midi-project-files',
+                attributes: {id: 'midi-project-files'},
                 title: language.$('releaseInfo.midiProjectFiles.heading'),
               }),
 
@@ -491,7 +491,7 @@ export default {
           sec.additionalFiles && [
             sec.additionalFiles.heading
               .slots({
-                id: 'additional-files',
+                attributes: {id: 'additional-files'},
                 title:
                   language.$('releaseInfo.additionalFiles.heading', {
                     additionalFiles: