From 7e525bc4ae191bde7cb40de2c489250cb3e0af0f Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Tue, 4 Oct 2016 11:42:18 -0400 Subject: adding triple-captioned-image-list --- examples/db.json | 41 ++++++++++++++++++++++++- examples/index.js | 39 +++++++++++------------ package.json | 2 +- themes/okadmin/templates/partials/inputs.liquid | 38 +++++++++++++++++++++++ 4 files changed, 99 insertions(+), 21 deletions(-) diff --git a/examples/db.json b/examples/db.json index 5f8554f..d037d2b 100644 --- a/examples/db.json +++ b/examples/db.json @@ -233,7 +233,6 @@ "flagged": true } ], - "flour": [], "card": [ { "id": "1", @@ -284,5 +283,45 @@ "__index": 1, "dateCreated": "Fri, 02 Sep 2016 16:41:10 GMT" } + ], + "flour": [ + { + "id": "test", + "title": "Test", + "image": { + "uri": "", + "caption": "", + "width": "", + "height": "" + }, + "images": [ + { + "uri": "https://ltho.s3.amazonaws.com/okcms-example/07ad6a70-8a49-11e6-80c3-41900948e24c.png", + "width": "463", + "height": "606", + "label": "1", + "caption": "2", + "code": "3" + }, + { + "uri": "https://ltho.s3.amazonaws.com/okcms-example/07ad1c50-8a49-11e6-80c3-41900948e24c.png", + "width": "515", + "height": "441", + "label": "13", + "caption": "23", + "code": "33" + }, + { + "uri": "https://ltho.s3.amazonaws.com/okcms-example/07aa3620-8a49-11e6-80c3-41900948e24c.png", + "width": "566", + "height": "329", + "label": "14", + "caption": "25", + "code": "36" + } + ], + "__index": 0, + "dateCreated": "Tue, 04 Oct 2016 15:41:52 GMT" + } ] } \ No newline at end of file diff --git a/examples/index.js b/examples/index.js index 58a2314..ad57a09 100644 --- a/examples/index.js +++ b/examples/index.js @@ -13,14 +13,14 @@ var app = okcms.createApp({ admin: { theme: 'okadmin', - dashboard: { - resources: { - card: { - groupBy: 'stack', - descending: true - } - } - }, +// dashboard: { +// resources: { +// card: { +// groupBy: 'stack', +// descending: true +// } +// } +// }, }, schemas: { @@ -48,16 +48,17 @@ var app = okcms.createApp({ id: {type: 'string', hidden: true}, title: {type: 'string'}, image: {type: 'image'}, + images: {type: 'triple-captioned-image-list'}, }, - card: { - id: {type: 'string', hidden: true}, - title: {type: 'string'}, - stack: {type: 'foreign-key', key: 'stack'}, - }, - stack: { - id: {type: 'string', hidden: true}, - title: {type: 'string'}, - } +// card: { +// id: {type: 'string', hidden: true}, +// title: {type: 'string'}, +// stack: {type: 'foreign-key', key: 'stack'}, +// }, +// stack: { +// id: {type: 'string', hidden: true}, +// title: {type: 'string'}, +// } }, resources: [ @@ -66,8 +67,8 @@ var app = okcms.createApp({ { type: 'bread' }, { type: 'test' }, { type: 'flour' }, - { type: 'card' }, - { type: 'stack' }, +// { type: 'card' }, +// { type: 'stack' }, ], services: { diff --git a/package.json b/package.json index a1bbf4f..019cfcb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "okcms", - "version": "0.2.0", + "version": "0.2.1", "description": "The dopest CMS on the planet.", "main": "app/index.js", "scripts": { diff --git a/themes/okadmin/templates/partials/inputs.liquid b/themes/okadmin/templates/partials/inputs.liquid index 19aa3a1..4750630 100644 --- a/themes/okadmin/templates/partials/inputs.liquid +++ b/themes/okadmin/templates/partials/inputs.liquid @@ -344,6 +344,44 @@ {% endfor %} + {% elsif type == 'triple-captioned-image-list' %} +
+
+
+ + +
+ +
+ + + +
    + {% for image in spec.value %} +
  1. + {{image.caption | strip_html}} + + + + + + + +
  2. + {% endfor %} +
+
{% elsif type == 'meta' %} {% else %} -- cgit v1.2.3-70-g09d2