« 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
diff options
context:
space:
mode:
Diffstat (limited to 'src/content')
-rw-r--r--src/content/dependencies/generateFlashIndexPage.js29
-rw-r--r--src/content/dependencies/generateFlashInfoPage.js38
-rw-r--r--src/content/dependencies/listAllMidiProjectFiles.js28
-rw-r--r--src/content/dependencies/listAllSheetMusicFiles.js28
-rw-r--r--src/content/dependencies/listRandomPageLinks.js28
5 files changed, 151 insertions, 0 deletions
diff --git a/src/content/dependencies/generateFlashIndexPage.js b/src/content/dependencies/generateFlashIndexPage.js
new file mode 100644
index 00000000..24f9c861
--- /dev/null
+++ b/src/content/dependencies/generateFlashIndexPage.js
@@ -0,0 +1,29 @@
+export default {
+  contentDependencies: ['generatePageLayout'],
+  extraDependencies: ['html', 'language'],
+
+  relations(relation) {
+    const relations = {};
+
+    relations.layout =
+      relation('generatePageLayout');
+
+    return relations;
+  },
+
+  generate(relations, {html, language}) {
+    return relations.layout.slots({
+      title: language.$('flashIndex.title'),
+
+      mainContent: [
+        html.tag('p', `Alright alright, this is a stub page! Coming soon!`),
+      ],
+
+      navLinkStyle: 'hierarchical',
+      navLinks: [
+        {auto: 'home'},
+        {auto: 'current'},
+      ],
+    });
+  },
+};
diff --git a/src/content/dependencies/generateFlashInfoPage.js b/src/content/dependencies/generateFlashInfoPage.js
new file mode 100644
index 00000000..4316d7c1
--- /dev/null
+++ b/src/content/dependencies/generateFlashInfoPage.js
@@ -0,0 +1,38 @@
+export default {
+  contentDependencies: ['generatePageLayout'],
+  extraDependencies: ['html', 'language'],
+
+  relations(relation) {
+    const relations = {};
+
+    relations.layout =
+      relation('generatePageLayout');
+
+    return relations;
+  },
+
+  data(flash) {
+    return {
+      name: flash.name,
+    };
+  },
+
+  generate(data, relations, {html, language}) {
+    return relations.layout.slots({
+      title:
+        language.$('flashPage.title', {
+          flash: data.name,
+        }),
+
+      mainContent: [
+        html.tag('p', `Alright alright, this is a stub page! Coming soon!`),
+      ],
+
+      navLinkStyle: 'hierarchical',
+      navLinks: [
+        {auto: 'home'},
+        {auto: 'current'},
+      ],
+    });
+  },
+};
diff --git a/src/content/dependencies/listAllMidiProjectFiles.js b/src/content/dependencies/listAllMidiProjectFiles.js
new file mode 100644
index 00000000..28a925ac
--- /dev/null
+++ b/src/content/dependencies/listAllMidiProjectFiles.js
@@ -0,0 +1,28 @@
+export default {
+  contentDependencies: ['generateListingPage'],
+  extraDependencies: ['html', 'wikiData'],
+
+  sprawl() {
+    return {};
+  },
+
+  query(sprawl, spec) {
+    return {
+      spec,
+    };
+  },
+
+  relations(relation, query) {
+    return {
+      page: relation('generateListingPage', query.spec),
+    };
+  },
+
+  generate(relations, {html}) {
+    return relations.page.slots({
+      type: 'custom',
+      content:
+        html.tag('p', `Alright alright, this is a stub page! Coming soon!`),
+    });
+  },
+};
diff --git a/src/content/dependencies/listAllSheetMusicFiles.js b/src/content/dependencies/listAllSheetMusicFiles.js
new file mode 100644
index 00000000..28a925ac
--- /dev/null
+++ b/src/content/dependencies/listAllSheetMusicFiles.js
@@ -0,0 +1,28 @@
+export default {
+  contentDependencies: ['generateListingPage'],
+  extraDependencies: ['html', 'wikiData'],
+
+  sprawl() {
+    return {};
+  },
+
+  query(sprawl, spec) {
+    return {
+      spec,
+    };
+  },
+
+  relations(relation, query) {
+    return {
+      page: relation('generateListingPage', query.spec),
+    };
+  },
+
+  generate(relations, {html}) {
+    return relations.page.slots({
+      type: 'custom',
+      content:
+        html.tag('p', `Alright alright, this is a stub page! Coming soon!`),
+    });
+  },
+};
diff --git a/src/content/dependencies/listRandomPageLinks.js b/src/content/dependencies/listRandomPageLinks.js
new file mode 100644
index 00000000..28a925ac
--- /dev/null
+++ b/src/content/dependencies/listRandomPageLinks.js
@@ -0,0 +1,28 @@
+export default {
+  contentDependencies: ['generateListingPage'],
+  extraDependencies: ['html', 'wikiData'],
+
+  sprawl() {
+    return {};
+  },
+
+  query(sprawl, spec) {
+    return {
+      spec,
+    };
+  },
+
+  relations(relation, query) {
+    return {
+      page: relation('generateListingPage', query.spec),
+    };
+  },
+
+  generate(relations, {html}) {
+    return relations.page.slots({
+      type: 'custom',
+      content:
+        html.tag('p', `Alright alright, this is a stub page! Coming soon!`),
+    });
+  },
+};