summaryrefslogtreecommitdiff
path: root/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'index.js')
-rw-r--r--index.js27
1 files changed, 15 insertions, 12 deletions
diff --git a/index.js b/index.js
index 5927a34..14f17be 100644
--- a/index.js
+++ b/index.js
@@ -2,13 +2,6 @@ var okcms = require('okcms')
var isProduction = process.env.OK_PRODUCTION === 'true'
-var viewConfig = {
- template: 'index',
- data: [
- {type: 'project', query: '*'},
- ]
-}
-
var app = okcms.createApp({
project: 'OKFocus Portfolio',
@@ -17,28 +10,38 @@ var app = okcms.createApp({
production: isProduction,
schemas: {
+ page: {
+ id: {type: 'string', hidden: true},
+ title: {type: 'string'},
+ body: {type: 'string'},
+ },
project: {
id: {type: 'string', hidden: true},
- year: {type: 'number'},
title: {type: 'string'},
+ year: {type: 'number'},
client: {type: 'string'},
link: {type: 'string'},
NatureOfWork: {type: 'text'},
brief: {type: 'text'},
- image: {type: 'image'},
+ media: {type: 'media-list'},
containImage: {type: 'flag'},
- iframe: {type: 'string'},
- video: {type: 'string'},
press: {type: 'link-list'},
},
},
resources: [
{ type: 'project' },
+ { type: 'page' },
],
views: {
- '/': viewConfig,
+ '/': {
+ template: 'index',
+ data: [
+ {type: 'project', query: '*'},
+ {type: 'page', query: '*'},
+ ]
+ },
},
services: {