« get me outta code hell

more sticky heading adjustments - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/page
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2022-12-07 07:30:48 -0400
committer(quasar) nebula <qznebula@protonmail.com>2022-12-07 07:30:48 -0400
commitf18ddd61d7430f82116b7f6003e68a548f39f766 (patch)
treea424f5145b759b765eff22498019a5b16e79272a /src/page
parent0735a45e0ddf693e35202c7c3ef3c15886139843 (diff)
more sticky heading adjustments
Diffstat (limited to 'src/page')
-rw-r--r--src/page/static.js18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/page/static.js b/src/page/static.js
index 2a0f5e53..1689d16b 100644
--- a/src/page/static.js
+++ b/src/page/static.js
@@ -10,15 +10,23 @@ export function write(staticPage) {
   const page = {
     type: 'page',
     path: ['staticPage', staticPage.directory],
-    page: ({html, transformMultiline}) => ({
+    page: ({
+      generateStickyHeadingContainer,
+      html,
+      transformMultiline,
+    }) => ({
       title: staticPage.name,
       stylesheet: staticPage.stylesheet,
 
       main: {
-        content: html.tag('div', {class: 'long-content'}, [
-          html.tag('h1', staticPage.name),
-          transformMultiline(staticPage.content),
-        ]),
+        content: [
+          generateStickyHeadingContainer({
+            class: ['long-content'],
+            title: staticPage.name,
+          }),
+          html.tag('div', {class: 'long-content'},
+            transformMultiline(staticPage.content)),
+        ],
       },
 
       nav: {simple: true},