diff options
Diffstat (limited to 'index.js')
| -rw-r--r-- | index.js | 42 |
1 files changed, 35 insertions, 7 deletions
@@ -1,8 +1,27 @@ -var okcms = require("okcms"); -var path = require("path"); +import okcms from "okcms"; +import path from "path"; + +const __dirname = path.resolve(); var isProduction = process.env.OK_PRODUCTION === "true"; +// Charles' types from the spreadsheet +var tagTypes = [ + "(none)", + "No6092", + "1620s", + "painting", + "blunt", + "National Gallery of Canada", + "AGO", + "courtauld", + "intervensions", + "connosieurship", + "double agent", + "forensics", + "black box", +].map((type, index) => [index, type]); + var app = okcms .createApp({ project: "No. 6092", @@ -17,16 +36,25 @@ var app = okcms }, schemas: { - work: { + page: { id: { type: "string", hidden: true }, title: { type: "string" }, author: { type: "string" }, description: { type: "text" }, thumbnail: { type: "image" }, - image: { type: "image" }, + images: { type: "gallery" }, + tag_0: { type: "enum", options: tagTypes, alias: "Tag #1" }, + tag_1: { type: "enum", options: tagTypes, alias: "Tag #2" }, + tag_2: { type: "enum", options: tagTypes, alias: "Tag #3" }, + tag_3: { type: "enum", options: tagTypes, alias: "Tag #4" }, + tag_4: { type: "enum", options: tagTypes, alias: "Tag #5" }, + tag_5: { type: "enum", options: tagTypes, alias: "Tag #6" }, + tag_6: { type: "enum", options: tagTypes, alias: "Tag #7" }, + tag_7: { type: "enum", options: tagTypes, alias: "Tag #8" }, + tag_8: { type: "enum", options: tagTypes, alias: "Tag #9" }, hidden: { type: "flag" }, }, - page: { + ui: { id: { type: "string", hidden: true }, title: { type: "string" }, body: { type: "text" }, @@ -34,14 +62,14 @@ var app = okcms }, }, - resources: [{ type: "work" }, { type: "page" }], + resources: [{ type: "page" }, { type: "ui" }], views: { "/": { template: "home", data: [ - { type: "work", query: "*" }, { type: "page", query: "*" }, + { type: "ui", query: "*" }, ], }, }, |
