diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2022-02-12 17:38:27 -0400 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2022-02-12 17:40:01 -0400 |
commit | 95bd943d62473e53de11cd6368e540cd48e4231a (patch) | |
tree | a6e1f0a21222eaeb01a270d8202a31616903649b /src/thing/news-entry.js | |
parent | cfa02cb03a363c46408db7f0ec54bd3a7e4ad018 (diff) |
bam (Thing subclasses: several steps, one file)
Diffstat (limited to 'src/thing/news-entry.js')
-rw-r--r-- | src/thing/news-entry.js | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/src/thing/news-entry.js b/src/thing/news-entry.js deleted file mode 100644 index 2db2f37c..00000000 --- a/src/thing/news-entry.js +++ /dev/null @@ -1,49 +0,0 @@ -import Thing from './thing.js'; - -import { - isDate, - isDirectory, - isName, -} from './validators.js'; - -export default class NewsEntry extends Thing { - static [Thing.referenceType] = 'news-entry'; - - static propertyDescriptors = { - // Update & expose - - name: { - flags: {update: true, expose: true}, - update: {validate: isName} - }, - - directory: { - flags: {update: true, expose: true}, - update: {validate: isDirectory}, - expose: Thing.directoryExpose - }, - - date: { - flags: {update: true, expose: true}, - update: {validate: isDate} - }, - - content: { - flags: {update: true, expose: true}, - }, - - // Expose only - - contentShort: { - flags: {expose: true}, - - expose: { - dependencies: ['content'], - - compute({ content }) { - return body.split('<hr class="split">')[0]; - } - } - }, - }; -} |