« get me outta code hell

data steps: album additional files list - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/content/dependencies/generateContentHeading.js
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2023-03-21 23:28:38 -0300
committer(quasar) nebula <qznebula@protonmail.com>2023-03-21 23:34:23 -0300
commitec0dd58271eabd0dd9fa12fbf51f5b46b8ceb014 (patch)
treea10b342ae97f0554eca9179734f27ceecf6e2f90 /src/content/dependencies/generateContentHeading.js
parent7783afa2eeba6eb3b876d325cd83c41fb96b4792 (diff)
data steps: album additional files list
This is WIP but seems to be working! Pretty big test of
the new html.template system, which needed some extension
here.
Diffstat (limited to 'src/content/dependencies/generateContentHeading.js')
-rw-r--r--src/content/dependencies/generateContentHeading.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/content/dependencies/generateContentHeading.js b/src/content/dependencies/generateContentHeading.js
new file mode 100644
index 0000000..baa5208
--- /dev/null
+++ b/src/content/dependencies/generateContentHeading.js
@@ -0,0 +1,16 @@
+export default {
+  extraDependencies: [
+    'html',
+  ],
+
+  generate({html}) {
+    return html.template(slot =>
+      html.tag('p',
+        {
+          class: 'content-heading',
+          id: slot('id'),
+          tabindex: '0',
+        },
+        slot('title')));
+  }
+}