diff options
| author | Julie Lala <jules@okfoc.us> | 2015-04-09 05:39:58 -0400 |
|---|---|---|
| committer | Julie Lala <jules@okfoc.us> | 2015-04-09 05:39:58 -0400 |
| commit | a164bfbb16bde80089ed272294dc5be2042e48c8 (patch) | |
| tree | b81c7af6825798a2beb70258945d8fd2ad71ab7f /site/index.js | |
| parent | 2cb9ea4e87c5f81d7ed1d6377717ffc132e3f2fb (diff) | |
images
Diffstat (limited to 'site/index.js')
| -rw-r--r-- | site/index.js | 43 |
1 files changed, 31 insertions, 12 deletions
diff --git a/site/index.js b/site/index.js index 95d2bcf..9be7cd5 100644 --- a/site/index.js +++ b/site/index.js @@ -1,5 +1,13 @@ var okcms = require('..'); +var projectSchema = { + id: {type: 'string', id: true}, + title: {type: 'string'}, + description: {type: 'text'}, + video: {type: 'video'}, + images: {type: 'captioned-image-list'} +} + var app = okcms.createApp({ root: 'public', @@ -10,20 +18,19 @@ var app = okcms.createApp({ title: {type: 'string'}, body: {type: 'text'} }, - bread: { - type: {type: 'string', id: true}, - title: {type: 'string'}, - description: {type: 'text'}, - color: {type: 'enum', options: ["red","blue","green"]}, - video: {type: 'video'}, - images: {type: 'captioned-image-list'} - } + retail: projectSchema, + advertising: projectSchema, + experiential: projectSchema, + content: projectSchema, }, resources: [ { type: 'page', static: {id: 'about'}}, { type: 'page', static: {id: 'contact'}}, - { type: 'bread' }, + { type: 'retail' }, + { type: 'advertising' }, + { type: 'experiential' }, + { type: 'content' }, ], services: { @@ -37,7 +44,10 @@ var app = okcms.createApp({ views: { '/': { data: [ - {type: 'bread', query: '*'}, + {type: 'retail', query: '*'}, + {type: 'advertising', query: '*'}, + {type: 'experiental', query: '*'}, + {type: 'content', query: '*'}, {type: 'page', query: '*'} ] }, @@ -47,8 +57,17 @@ var app = okcms.createApp({ '/contact': { data: {type: 'page', query: 'contact'} }, - '/:id': { - data: {type: 'bread', query: ':id'} + '/retail/:id': { + data: {type: 'retail', query: ':id'} + } + '/advertising/:id': { + data: {type: 'advertising', query: ':id'} + } + '/experiental/:id': { + data: {type: 'experiental', query: ':id'} + } + '/content/:id': { + data: {type: 'content', query: ':id'} } } |
