« get me outta code hell

data: split homepage-layout.js - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/data/things/homepage-layout/HomepageLayoutSection.js
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2026-01-26 13:27:30 -0400
committer(quasar) nebula <qznebula@protonmail.com>2026-01-26 13:46:59 -0400
commit5c19b69f94b1ef913b114853264917f7eda627ed (patch)
tree040ee5d23b9d669a61b3643ccbbb908b3f594f13 /src/data/things/homepage-layout/HomepageLayoutSection.js
parentca4e9b3fd53f91e1cd95c8aa20496177ec39d669 (diff)
data: split homepage-layout.js
Diffstat (limited to 'src/data/things/homepage-layout/HomepageLayoutSection.js')
-rw-r--r--src/data/things/homepage-layout/HomepageLayoutSection.js30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/data/things/homepage-layout/HomepageLayoutSection.js b/src/data/things/homepage-layout/HomepageLayoutSection.js
new file mode 100644
index 00000000..1593ba6e
--- /dev/null
+++ b/src/data/things/homepage-layout/HomepageLayoutSection.js
@@ -0,0 +1,30 @@
+import {V} from '#composite';
+import Thing from '#thing';
+
+import {exposeConstant} from '#composite/control-flow';
+import {color, name, thingList} from '#composite/wiki-properties';
+
+export class HomepageLayoutSection extends Thing {
+  static [Thing.friendlyName] = `Homepage Section`;
+
+  static [Thing.getPropertyDescriptors] = ({HomepageLayoutRow}) => ({
+    // Update & expose
+
+    name: name(V(`Unnamed Homepage Section`)),
+
+    color: color(),
+
+    rows: thingList(V(HomepageLayoutRow)),
+
+    // Expose only
+
+    isHomepageLayoutSection: exposeConstant(V(true)),
+  });
+
+  static [Thing.yamlDocumentSpec] = {
+    fields: {
+      'Section': {property: 'name'},
+      'Color': {property: 'color'},
+    },
+  };
+}