diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2022-11-28 23:25:05 -0400 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2022-11-28 23:25:05 -0400 |
commit | 690a7b53a72ac71f9f76260fa50c634566c4e984 (patch) | |
tree | 841653cf0e474c6edd437ec36884f2130b5b7b43 /src/data/things/static-page.js | |
parent | ae9dba60c4bbb327b402c500cc042922a954de74 (diff) |
divide things.js into modular files (hilariously)
Diffstat (limited to 'src/data/things/static-page.js')
-rw-r--r-- | src/data/things/static-page.js | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/data/things/static-page.js b/src/data/things/static-page.js new file mode 100644 index 00000000..226e0b61 --- /dev/null +++ b/src/data/things/static-page.js @@ -0,0 +1,30 @@ +import Thing from './thing.js'; + +export class StaticPage extends Thing { + static [Thing.referenceType] = 'static'; + + static [Thing.getPropertyDescriptors] = ({ + validators: { + isName, + }, + }) => ({ + // Update & expose + + name: Thing.common.name('Unnamed Static Page'), + + nameShort: { + flags: {update: true, expose: true}, + update: {validate: isName}, + + expose: { + dependencies: ['name'], + transform: (value, {name}) => value ?? name, + }, + }, + + directory: Thing.common.directory(), + content: Thing.common.simpleString(), + stylesheet: Thing.common.simpleString(), + showInNavigationBar: Thing.common.flag(true), + }); +} |