diff options
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), + }); +} |