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 From 05983e8091b99cef6d7baebe2b72ac3c19d41151 Mon Sep 17 00:00:00 2001 From: “Ryder <“r@okfoc.us”> Date: Mon, 28 Mar 2016 13:06:36 -0400 Subject: css --- package.json | 1 + public/assets/js/app.js | 5 ++++ templates/index.liquid | 64 +++++++++++++++++++++++++++++++++++-------------- 3 files changed, 52 insertions(+), 18 deletions(-) diff --git a/package.json b/package.json index 635e23d..d09219a 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ }, "dependencies": { "dotenv": "^2.0.0", + "flickity": "^1.2.1", "object-assign": "^2.0.0", "okcms": "git+ssh://git@github.com:okfocus/okcms.git#v0.1.18" }, diff --git a/public/assets/js/app.js b/public/assets/js/app.js index 84919fd..bf0616d 100644 --- a/public/assets/js/app.js +++ b/public/assets/js/app.js @@ -9,3 +9,8 @@ $(function() { $("html").addClass("desktop"); } }); + +$('.gallery').flickity({ + cellAlign: 'left', + contain: true +}); \ No newline at end of file diff --git a/templates/index.liquid b/templates/index.liquid index 492dbcd..0d625b3 100644 --- a/templates/index.liquid +++ b/templates/index.liquid @@ -53,50 +53,73 @@ float: left; } + .item { + height: 100vh; + display: -webkit-flex; + display: flex; + -webkit-flex-flow: column wrap; + flex-flow: column wrap; + } + + .top, + .bottom { + -webkit-flex: 1 auto; + flex: 1 auto; + } + .top { background: yellow; width: 100%; - height: 80vh; + /*height: 80vh;*/ + flex: 1 auto; } .bottom { - height: 20vh; + /*height: 20vh;*/ + flex: 0 auto; background: #eee; + overflow: hidden; + padding:5px 0; } .five { width: 100%; } - + .headings { - font-size:10px; - font-weight: 700; + font-size: 10px; + font-weight: 700; } + .texts { - font-weight:400; - padding:5px 0 0 0; + font-weight: 400; + padding: 5px 0 0 0; } + .five span { - width:calc(12% - 8px); - margin:0 4px; + width: calc(12% - 8px); + margin: 0 4px; } - - .press .headings span:nth-child(5){ + + .press .headings span:nth-child(5) { width: calc(40% - 8px); } + .headings span { border-bottom: 1px solid; - padding:5px 0; + padding: 0 0 2px 0; } .press .headings span:last-child:before { content: "PRESS"; } + .five .description { width: 50%; -webkit-column-count: 3; - font-size:12px; - } + font-size: 12px; + } + .press .five .description { width: calc(40% - 8px); -webkit-column-count: 2; @@ -110,9 +133,9 @@ ul li { list-style-type: none; } - - .nopress span:last-child{ - width: calc(51.5555555555% - 2px); + + .nopress span:last-child { + width: calc(52% - 8px); } @@ -121,7 +144,12 @@ {% for project in projects %}
-
+
+
-- cgit v1.2.3-70-g09d2 From cb0b2d229855d80f041b0c44984418ae3097b5b4 Mon Sep 17 00:00:00 2001 From: “Ryder <“r@okfoc.us”> Date: Mon, 28 Mar 2016 13:20:28 -0400 Subject: adding iframe and video --- db.json | 15 +++++++++++++++ index.js | 2 ++ 2 files changed, 17 insertions(+) diff --git a/db.json b/db.json index b23375b..c615f2c 100644 --- a/db.json +++ b/db.json @@ -17,6 +17,21 @@ "__index": "0", "dateCreated": "Sat, 26 Mar 2016 20:34:21 GMT", "client": "Annapurna Pictures" + }, + { + "id": "test-2", + "year": 2016, + "title": "Test 2", + "client": "Moopy", + "link": "http://moonpies.org", + "NatureOfWork": "poo, surf, eat popcorn", + "brief": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Sed posuere consectetur est at lobortis. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit.", + "image": { + "uri": "https://ltho.s3.amazonaws.com/e12aee73-07a1-41f4-a54f-8b8c09f167f9.png", + "caption": "" + }, + "__index": 1, + "dateCreated": "Mon, 28 Mar 2016 17:19:36 GMT" } ] } \ No newline at end of file diff --git a/index.js b/index.js index 28b70b8..eb51e75 100644 --- a/index.js +++ b/index.js @@ -26,6 +26,8 @@ var app = okcms.createApp({ NatureOfWork: {type: 'tag-list'}, brief: {type: 'text'}, image: {type: 'image'}, + iframe: {type: 'string'}, + video: {type: 'string'}, press: {type: 'link-list'}, }, }, -- cgit v1.2.3-70-g09d2 From 5166017abeb745630de0aa69d3cc920090279b32 Mon Sep 17 00:00:00 2001 From: “Ryder <“r@okfoc.us”> Date: Mon, 28 Mar 2016 13:23:42 -0400 Subject: css --- db.json | 6 ++++-- templates/index.liquid | 7 +++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/db.json b/db.json index c615f2c..ac34d0e 100644 --- a/db.json +++ b/db.json @@ -30,8 +30,10 @@ "uri": "https://ltho.s3.amazonaws.com/e12aee73-07a1-41f4-a54f-8b8c09f167f9.png", "caption": "" }, - "__index": 1, - "dateCreated": "Mon, 28 Mar 2016 17:19:36 GMT" + "__index": "1", + "dateCreated": "Mon, 28 Mar 2016 17:19:36 GMT", + "iframe": "http://okfoc.us", + "video": "" } ] } \ No newline at end of file diff --git a/templates/index.liquid b/templates/index.liquid index 0d625b3..0313ec1 100644 --- a/templates/index.liquid +++ b/templates/index.liquid @@ -133,9 +133,11 @@ ul li { list-style-type: none; } - - .nopress span:last-child { + .nopress span:nth-child(5) { width: calc(52% - 8px); + } + .nopress span:last-child { + display:none; } @@ -145,6 +147,7 @@ {% for project in projects %}
+