« get me outta code hell

wip - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/content/dependencies/generateLyricsEntry.js
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2024-07-25 16:35:02 -0300
committer(quasar) nebula <qznebula@protonmail.com>2025-04-13 22:54:14 -0300
commit48dde4a388fd4c31dd5680f7535419874124e554 (patch)
tree50c0fce8ef19f3bae856e79b1dc92e257e0db4ab /src/content/dependencies/generateLyricsEntry.js
parentb1ff1444c47f6bd8c532e3a76eb2a5b92ed82a0e (diff)
wip
Diffstat (limited to 'src/content/dependencies/generateLyricsEntry.js')
-rw-r--r--src/content/dependencies/generateLyricsEntry.js25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/content/dependencies/generateLyricsEntry.js b/src/content/dependencies/generateLyricsEntry.js
new file mode 100644
index 00000000..4f9c22f1
--- /dev/null
+++ b/src/content/dependencies/generateLyricsEntry.js
@@ -0,0 +1,25 @@
+export default {
+  contentDependencies: [
+    'transformContent',
+  ],
+
+  extraDependencies: ['html', 'language'],
+
+  relations: (relation, entry) => ({
+    content:
+      relation('transformContent', entry.body),
+  }),
+
+  slots: {
+    attributes: {
+      type: 'attributes',
+      mutable: false,
+    },
+  },
+
+  generate: (relations, slots, {html}) =>
+    html.tag('div', {class: 'lyrics-entry'},
+      slots.attributes,
+
+      relations.content.slot('mode', 'lyrics')),
+};