From 1ac9385f0e106a67c9cac159a88f1ef53ecc8f79 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Sat, 26 Mar 2016 17:25:41 -0400 Subject: preliminary formatting.. need to add a couple new datatypes --- db.json | 22 ++++++ index.js | 3 +- public/assets/js/app.js | 11 +++ templates/index.liquid | 173 ++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 208 insertions(+), 1 deletion(-) create mode 100644 db.json create mode 100644 public/assets/js/app.js diff --git a/db.json b/db.json new file mode 100644 index 0000000..b23375b --- /dev/null +++ b/db.json @@ -0,0 +1,22 @@ +{ + "project": [ + { + "id": "annapurna-pictures", + "year": 2016, + "title": "Annapurna Pictures", + "link": "http://annapurna.pictures/", + "NatureOfWork": "Design\r\nProgramming", + "brief": "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.\r\n", + "image": { + "uri": "https://ltho.s3.amazonaws.com/ebd3062e-1cf4-4a2d-a7f3-240f66e32258.png", + "caption": "" + }, + "press": [ + "http://asdf.us/" + ], + "__index": "0", + "dateCreated": "Sat, 26 Mar 2016 20:34:21 GMT", + "client": "Annapurna Pictures" + } + ] +} \ No newline at end of file diff --git a/index.js b/index.js index 5f2586a..28b70b8 100644 --- a/index.js +++ b/index.js @@ -21,8 +21,9 @@ var app = okcms.createApp({ id: {type: 'string', hidden: true}, year: {type: 'number'}, title: {type: 'string'}, + client: {type: 'string'}, link: {type: 'string'}, - NatureOfWork: {type: 'text'}, + NatureOfWork: {type: 'tag-list'}, brief: {type: 'text'}, image: {type: 'image'}, press: {type: 'link-list'}, diff --git a/public/assets/js/app.js b/public/assets/js/app.js new file mode 100644 index 0000000..84919fd --- /dev/null +++ b/public/assets/js/app.js @@ -0,0 +1,11 @@ +var is_iphone = (navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)); +var is_ipad = (navigator.userAgent.match(/iPad/i)); +var is_android = (navigator.userAgent.match(/Android/i)) +var is_mobile = is_iphone || is_ipad || is_android; +$(function() { + if (is_mobile) { + $("html").addClass("mobile"); + } else { + $("html").addClass("desktop"); + } +}); diff --git a/templates/index.liquid b/templates/index.liquid index e69de29..492dbcd 100644 --- a/templates/index.liquid +++ b/templates/index.liquid @@ -0,0 +1,173 @@ + + + + OKFOCUS + + + + + + + + + + + + + + + + + + + + + + + + + + + +{% for project in projects %} +
+
+
+
+
+ YEAR + CLIENT + TITLE + NATURE OF WORK + BRIEF +   +
+
+ {{ project.year }} + {{ project.client }} + {{ project.title }} + +
    + {% assign categories = project.NatureOfWork | split "\n" %} + {% for category in categories %} +
  • + {{ category }} +
  • + {% endfor %} +
+
+ + {{ project.brief }} + + + + +
+
+
+{% endfor %} + + + +{% if meta.production %} + +{% else %} + +{% endif %} + -- cgit v1.2.3-70-g09d2