From 2cb9ea4e87c5f81d7ed1d6377717ffc132e3f2fb Mon Sep 17 00:00:00 2001 From: Julie Lala Date: Thu, 9 Apr 2015 05:11:56 -0400 Subject: gruntfilé MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- site/index.js | 57 ++++++++++++++++++++++++++++++++++++++++ site/public/css/main.css | 18 +++++++++++++ site/public/images/brown046.jpg | Bin 0 -> 5108 bytes site/templates/bread.liquid | 14 ++++++++++ site/templates/index.liquid | 30 +++++++++++++++++++++ site/templates/page.liquid | 14 ++++++++++ 6 files changed, 133 insertions(+) create mode 100644 site/index.js create mode 100644 site/public/css/main.css create mode 100644 site/public/images/brown046.jpg create mode 100644 site/templates/bread.liquid create mode 100644 site/templates/index.liquid create mode 100644 site/templates/page.liquid (limited to 'site') diff --git a/site/index.js b/site/index.js new file mode 100644 index 0000000..95d2bcf --- /dev/null +++ b/site/index.js @@ -0,0 +1,57 @@ +var okcms = require('..'); + +var app = okcms.createApp({ + + root: 'public', + + schemas: { + page: { + id: {type: 'string'}, + 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'} + } + }, + + resources: [ + { type: 'page', static: {id: 'about'}}, + { type: 'page', static: {id: 'contact'}}, + { type: 'bread' }, + ], + + services: { + s3: { + key: process.env.S3_KEY, + secret: process.env.S3_SECRET, + bucket: process.env.S3_BUCKET, + } + }, + + views: { + '/': { + data: [ + {type: 'bread', query: '*'}, + {type: 'page', query: '*'} + ] + }, + '/about': { + data: {type: 'page', query: 'about'} + }, + '/contact': { + data: {type: 'page', query: 'contact'} + }, + '/:id': { + data: {type: 'bread', query: ':id'} + } + } + +}).listen(1337); + +console.log('Server listening at port 1337...'); diff --git a/site/public/css/main.css b/site/public/css/main.css new file mode 100644 index 0000000..92b2ee7 --- /dev/null +++ b/site/public/css/main.css @@ -0,0 +1,18 @@ +html, body { + margin: 0; + passing: 0; + font-family: "Georgia", sans-serif; +} + +body { + background-image: url(../images/brown046.jpg); +} + +h1, h2, h3 { + color: rgb(12, 145, 14); +} + +.container { + padding: 2em; + background-color: rgba(255, 255, 255, 0.5); +} diff --git a/site/public/images/brown046.jpg b/site/public/images/brown046.jpg new file mode 100644 index 0000000..4b86003 Binary files /dev/null and b/site/public/images/brown046.jpg differ diff --git a/site/templates/bread.liquid b/site/templates/bread.liquid new file mode 100644 index 0000000..da36cce --- /dev/null +++ b/site/templates/bread.liquid @@ -0,0 +1,14 @@ + + + + + + +
+

{{bread.type | capitalize}}

+

+ {{bread.description}} +

+
+ + diff --git a/site/templates/index.liquid b/site/templates/index.liquid new file mode 100644 index 0000000..7c12a86 --- /dev/null +++ b/site/templates/index.liquid @@ -0,0 +1,30 @@ + + + + + + +
+
+

Cheryl's Deli and Bakery

+
+
+
+
+ + diff --git a/site/templates/page.liquid b/site/templates/page.liquid new file mode 100644 index 0000000..e90f7ce --- /dev/null +++ b/site/templates/page.liquid @@ -0,0 +1,14 @@ + + + + + + +
+

{{page.title | capitalize}}

+

+ {{page.body}} +

+
+ + -- cgit v1.2.3-70-g09d2