From a164bfbb16bde80089ed272294dc5be2042e48c8 Mon Sep 17 00:00:00 2001 From: Julie Lala Date: Thu, 9 Apr 2015 05:39:58 -0400 Subject: images --- site/index.js | 43 +++++++++++++++++++++++++++++++------------ 1 file changed, 31 insertions(+), 12 deletions(-) (limited to 'site/index.js') 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'} } } -- cgit v1.2.3-70-g09d2