diff options
Diffstat (limited to 'site/index.js')
| -rw-r--r-- | site/index.js | 96 |
1 files changed, 76 insertions, 20 deletions
diff --git a/site/index.js b/site/index.js index a7a8a6f..b81b3ab 100644 --- a/site/index.js +++ b/site/index.js @@ -1,38 +1,52 @@ var okcms = require('..'); var projectSchema = { - id: {type: 'string', id: true}, + id: {type: 'string', id: true, hidden: true}, title: {type: 'string'}, - shortname: {type: 'string'}, + menu: {type: 'string'}, description: {type: 'text'}, - video: {type: 'video'}, - images: {type: 'captioned-image-list'} + media: {type: 'media-list'}, + thumbnail: {type: 'image'}, } var app = okcms.createApp({ + meta: { + project: 'TwoHustlers' + }, + root: 'public', + debug: false, + production: true, + schemas: { page: { - id: {type: 'string'}, + id: {type: 'string', hidden: true}, title: {type: 'string'}, body: {type: 'text'}, + collabs: {type: 'text'}, + contact: {type: 'text'}, image: {type: 'string'} }, - retail: projectSchema, - advertising: projectSchema, - experiential: projectSchema, - content: projectSchema, + advertising: projectSchema, + content: projectSchema, + experiential: projectSchema, + shape: { + id: {type: 'string', id: true, hidden: true}, + title: {type: 'string'}, + images: {type: 'double-captioned-image-list'}, + } }, resources: [ { type: 'page', static: {id: 'about'}}, { type: 'page', static: {id: 'contact'}}, - { type: 'retail' }, + { type: 'shape', static: {id: 'shape-images'}}, + { type: 'shape', static: {id: 'about-images'}}, { type: 'advertising' }, - { type: 'experiential' }, { type: 'content' }, + { type: 'experiential' }, ], services: { @@ -40,39 +54,81 @@ var app = okcms.createApp({ key: process.env.S3_KEY, secret: process.env.S3_SECRET, bucket: process.env.S3_BUCKET, + dirname: "twohustlers", + maxbytes: 1024*1024*2, } }, views: { '/': { data: [ - {type: 'retail', query: '*'}, + {type: 'page', query: 'contact'}, +// {type: 'shape', query: 'about-images'}, + {type: 'shape', query: 'shape-images'}, +// {type: 'retail', query: '*'}, {type: 'advertising', query: '*'}, {type: 'experiential', query: '*'}, {type: 'content', query: '*'}, - {type: 'page', query: '*'} ] }, '/about': { - data: {type: 'page', query: 'about'} + data: [ + {type: 'page', query: 'about'}, + {type: 'shape', query: 'about-images'}, + ], + template: 'about' }, '/contact': { data: {type: 'page', query: 'contact'} }, - '/retail/:id': { - data: {type: 'retail', query: ':id'}, - template: 'project' + '/all': { + data: [ +// {type: 'retail', query: '*'}, + {type: 'advertising', query: '*'}, + {type: 'experiential', query: '*'}, + {type: 'content', query: '*'}, + {type: 'page', query: 'about'} + ], + template: 'all' }, +// '/retail/:id': { +// data: { +// type: 'retail', +// as: 'project', +// query: { +// id: ':id' +// } +// }, +// template: 'project' +// }, '/advertising/:id': { - data: {type: 'advertising', query: ':id'}, + data: { + type: 'advertising', + as: 'project', + query: { + id: ':id' + } + }, template: 'project' }, '/experiential/:id': { - data: {type: 'experiential', query: ':id'}, + data: { + type: 'experiential', + as: 'project', + query: { + id: ':id' + } + }, template: 'project' }, '/content/:id': { - data: {type: 'content', query: ':id'}, + data: { + type: 'content', + as: 'project', + query: { + id: ':id' + } + }, template: 'project' } } |
