From 3a28bacfc38cd0244ada6e74655d1e30d81d4d34 Mon Sep 17 00:00:00 2001 From: Julie Lala Date: Thu, 9 Apr 2015 13:32:45 -0400 Subject: video thumbnail and /all page --- site/templates/all.liquid | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'site/templates/all.liquid') diff --git a/site/templates/all.liquid b/site/templates/all.liquid index edb31d2..852137f 100644 --- a/site/templates/all.liquid +++ b/site/templates/all.liquid @@ -1,6 +1,8 @@
-
- - DIESEL SS15 -
+ {% for project in projects %} +
+ + {{ project.shortname }} +
+ {% endfor %}
-- cgit v1.2.3-70-g09d2 From 58b62a1d76298a568aa0ded39f986477f889b793 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 13 Apr 2015 18:30:24 -0400 Subject: use type and id for frontend lookups --- site/public/assets/javascripts/_env.js | 36 ++++++++++++++++------------------ site/templates/all.liquid | 22 +++++++++++++++++++-- site/templates/index.liquid | 8 ++++---- themes/okadmin/public/js/app.js | 9 +++++++-- 4 files changed, 48 insertions(+), 27 deletions(-) (limited to 'site/templates/all.liquid') diff --git a/site/public/assets/javascripts/_env.js b/site/public/assets/javascripts/_env.js index 2c183aa..8871602 100644 --- a/site/public/assets/javascripts/_env.js +++ b/site/public/assets/javascripts/_env.js @@ -43,16 +43,14 @@ environment.ready = function(){ $("nav a").click(function(e){ e.preventDefault() - var hash = "#" + $(this).data("hash") + var page = "/" + $(this).data("type") + "/" + $(this).data("id") + var hash = "#" + page if (done_loading && window.location.hash == hash) return window.location.hash = hash $("nav a.active").removeClass("active") $(this).addClass("active") open_entry() - - var page = $(this).attr("href") - if (page.indexOf("#") !== -1) page = "#" $("#entry_container").removeClass("visible") @@ -66,8 +64,8 @@ environment.ready = function(){ $("nav .about").click(function(e){ e.preventDefault() - if (done_loading && window.location.hash == "#about") return - window.location.hash = "#about" + if (done_loading && window.location.hash == "#/about") return + window.location.hash = "#/about" $("nav a.active").removeClass("active") open_entry() @@ -81,8 +79,8 @@ environment.ready = function(){ $("nav .contact").click(function(e){ e.preventDefault() - if (done_loading && window.location.hash == "#contact") return - window.location.hash = "#contact" + if (done_loading && window.location.hash == "#/contact") return + window.location.hash = "#/contact" $("nav a.active").removeClass("active") open_entry() @@ -96,8 +94,8 @@ environment.ready = function(){ $("nav .index").click(function(e){ e.preventDefault() - if (done_loading && window.location.hash == "#index") return - window.location.hash = "#index" + if (done_loading && window.location.hash == "#/index") return + window.location.hash = "#/index" $("nav a.active").removeClass("active") open_entry() @@ -107,13 +105,13 @@ environment.ready = function(){ $loader.load("all .entry", function(){ display_entry($loader.children()[0]) }) - }) + }) $(".toggleRapper").click(toggle_menu) $(".toplogo").click(hide_entry) $(document).on("click", ".project", function(){ - var hash = as_hash( $(this).find("span").text() ) - load_hash(hash) + var page = "/" + $(this).data("type") + "/" + $(this).data("id") + load_hash(page) }) $(window).mousedown(function(e){ @@ -146,13 +144,13 @@ environment.ready = function(){ var current_hash = window.location.hash.replace("#","") $("nav a").each(function(){ - var key = as_hash(this.innerHTML) - hashes[key] = this - $(this).data("hash", key) + var page = "/" + $(this).data("type") + "/" + $(this).data("id") + hashes[page] = this + $(this).data("hash", page) }) - hashes['about'] = $("nav .about") - hashes['contact'] = $("nav .contact") - hashes['index'] = $("nav .index") + hashes['/about'] = $("nav .about") + hashes['/contact'] = $("nav .contact") + hashes['/index'] = $("nav .index") if (current_hash in hashes) { toggle_menu() diff --git a/site/templates/all.liquid b/site/templates/all.liquid index 852137f..01ddc3a 100644 --- a/site/templates/all.liquid +++ b/site/templates/all.liquid @@ -1,6 +1,24 @@
- {% for project in projects %} -
+ {% for project in retails %} +
+ + {{ project.shortname }} +
+ {% endfor %} + {% for project in advertisings %} +
+ + {{ project.shortname }} +
+ {% endfor %} + {% for project in experientials %} +
+ + {{ project.shortname }} +
+ {% endfor %} + {% for project in contents %} +
{{ project.shortname }}
diff --git a/site/templates/index.liquid b/site/templates/index.liquid index 0bd6b7d..19bdf88 100644 --- a/site/templates/index.liquid +++ b/site/templates/index.liquid @@ -88,25 +88,25 @@ WEBSITE BY OKFOCUS, http://okfoc.us, Internet Legends.
retail
{% for project in retails %} - {{ project.shortname }} + {{ project.shortname }} {% endfor %}
advertising
{% for project in advertisings %} - {{ project.shortname }} + {{ project.shortname }} {% endfor %}
experiential
{% for project in experientials %} - {{ project.shortname }} + {{ project.shortname }} {% endfor %}
content
{% for project in contents %} - {{ project.shortname }} + {{ project.shortname }} {% endfor %}
diff --git a/themes/okadmin/public/js/app.js b/themes/okadmin/public/js/app.js index 009fe4c..b53d21f 100644 --- a/themes/okadmin/public/js/app.js +++ b/themes/okadmin/public/js/app.js @@ -51,7 +51,7 @@ var OKAdmin = function(){ // fix post indexing in list-driven inputs $(".main.resource form").submit(function(e){ - var $id = $("[name=id]"), $title = $("[name=title]") + var $id = $("[name=id]"), $title = $("[name=title]"), $shortname = $("[name=shortname]") if ($title.length && ! $title.val()) { alert("Please enter a title") @@ -60,6 +60,11 @@ var OKAdmin = function(){ return } + if ($shortname.length && ! $shortname.val()) { + $shortname.val( $title.val() ) + return + } + var slug = slugify( $title.val() ) $id.val( slug ) @@ -136,4 +141,4 @@ $(function(){ }) -function slugify (s){ return (s || "").toLowerCase().replace(/\s/g,"-").replace(/[^-_a-zA-Z0-9]/g, '-').replace(/-+/g,"-") } +function slugify (s){ return (s || "").toLowerCase().replace(/\s/g,"-").replace(/[^-_a-zA-Z0-9]/g, '-').replace(/-+/g, "-") } -- cgit v1.2.3-70-g09d2 From 455c09226f1bc57021147e889ef1127e982ed67c Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 13 Apr 2015 18:52:06 -0400 Subject: rename shortname -> menu to be clear --- site/db.json | 2 +- site/index.js | 2 +- site/templates/all.liquid | 8 ++++---- site/templates/index.liquid | 8 ++++---- themes/okadmin/public/js/app.js | 6 +++--- 5 files changed, 13 insertions(+), 13 deletions(-) (limited to 'site/templates/all.liquid') diff --git a/site/db.json b/site/db.json index 6c598ab..eb0265d 100644 --- a/site/db.json +++ b/site/db.json @@ -4,7 +4,7 @@ { "id": "diesel-jogg-jeans-ss15-denim-campaign", "title": "DIESEL JOGG JEANS SS15 DENIM CAMPAIGN", - "shortname": "DIESEL SS15", + "menu": "DIESEL SS15", "description": "Sed posuere consectetur est at lobortis. Donec id elit non mi porta gravida at eget metus. Cras mattis consectetur purus sit amet fermentum. Vestibulum id ligula porta felis euismod semper. Donec sed odio dui. \r\n\r\nVestibulum id ligula porta felis euismod semper. Vestibulum id ligula porta felis euismod semper. Vestibulum id ligula porta felis euismod semper. Aenean lacinia bibendum nulla sed consectetur. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. \r\n\r\nCurabitur blandit tempus porttitor. Integer posuere erat a ante venenatis dapibus posuere velit aliquet. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec ullamcorper nulla non metus auctor fringilla. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur blandit tempus porttitor. Maecenas sed diam eget risus varius blandit sit amet non magna.", "video": { "url": "http://vimeo.com/112498725", diff --git a/site/index.js b/site/index.js index d4f5cb4..189dfc4 100644 --- a/site/index.js +++ b/site/index.js @@ -3,7 +3,7 @@ var okcms = require('..'); var projectSchema = { 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'}, diff --git a/site/templates/all.liquid b/site/templates/all.liquid index 01ddc3a..e6f39bf 100644 --- a/site/templates/all.liquid +++ b/site/templates/all.liquid @@ -2,25 +2,25 @@ {% for project in retails %}
- {{ project.shortname }} + {{ project.title }}
{% endfor %} {% for project in advertisings %}
- {{ project.shortname }} + {{ project.title }}
{% endfor %} {% for project in experientials %}
- {{ project.shortname }} + {{ project.title }}
{% endfor %} {% for project in contents %}
- {{ project.shortname }} + {{ project.title }}
{% endfor %}
diff --git a/site/templates/index.liquid b/site/templates/index.liquid index 19bdf88..19a0b6c 100644 --- a/site/templates/index.liquid +++ b/site/templates/index.liquid @@ -88,25 +88,25 @@ WEBSITE BY OKFOCUS, http://okfoc.us, Internet Legends.
retail
{% for project in retails %} - {{ project.shortname }} + {{ project.menu }} {% endfor %}
advertising
{% for project in advertisings %} - {{ project.shortname }} + {{ project.menu }} {% endfor %}
experiential
{% for project in experientials %} - {{ project.shortname }} + {{ project.menu }} {% endfor %}
content
{% for project in contents %} - {{ project.shortname }} + {{ project.menu }} {% endfor %}
diff --git a/themes/okadmin/public/js/app.js b/themes/okadmin/public/js/app.js index ab571f3..aa8d0ad 100644 --- a/themes/okadmin/public/js/app.js +++ b/themes/okadmin/public/js/app.js @@ -51,7 +51,7 @@ var OKAdmin = function(){ // fix post indexing in list-driven inputs $(".main.resource form").submit(function(e){ - var $id = $("[name=id]"), $title = $("[name=title]"), $shortname = $("[name=shortname]"), $section = $(".resource.main") + var $id = $("[name=id]"), $title = $("[name=title]"), $menu = $("[name=menu]"), $section = $(".resource.main") var id = $section.data("id"), type = $section.data("type") if ($title.length && ! $title.val()) { @@ -61,8 +61,8 @@ var OKAdmin = function(){ return } - if ($shortname.length && ! $shortname.val()) { - $shortname.val( $title.val() ) + if ($menu.length && ! $menu.val()) { + $menu.val( $title.val() ) return } -- cgit v1.2.3-70-g09d2 From b93aa2b3f2e1a3c42f19942be13ca7fb34b03d38 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Thu, 23 Apr 2015 14:25:10 -0400 Subject: reorder --- site/index.js | 8 ++++---- site/templates/all.liquid | 12 ++++++------ site/templates/index.liquid | 20 ++++++++++---------- 3 files changed, 20 insertions(+), 20 deletions(-) (limited to 'site/templates/all.liquid') diff --git a/site/index.js b/site/index.js index 6d34b89..3283b82 100644 --- a/site/index.js +++ b/site/index.js @@ -27,10 +27,10 @@ var app = okcms.createApp({ body: {type: 'text'}, image: {type: 'string'} }, - retail: projectSchema, advertising: projectSchema, - experiential: projectSchema, content: projectSchema, + experiential: projectSchema, + retail: projectSchema, shape: { id: {type: 'string', id: true, hidden: true}, title: {type: 'string'}, @@ -42,10 +42,10 @@ var app = okcms.createApp({ { type: 'page', static: {id: 'about'}}, { type: 'page', static: {id: 'contact'}}, { type: 'shape', static: {id: 'shape-images'}}, - { type: 'retail' }, { type: 'advertising' }, + { type: 'content' }, { type: 'experiential' }, - { type: 'content' } + { type: 'retail' }, ], services: { diff --git a/site/templates/all.liquid b/site/templates/all.liquid index e6f39bf..1ee66ff 100644 --- a/site/templates/all.liquid +++ b/site/templates/all.liquid @@ -1,12 +1,12 @@
- {% for project in retails %} -
+ {% for project in advertisings %} +
{{ project.title }}
{% endfor %} - {% for project in advertisings %} -
+ {% for project in contents %} +
{{ project.title }}
@@ -17,8 +17,8 @@ {{ project.title }}
{% endfor %} - {% for project in contents %} -
+ {% for project in retails %} +
{{ project.title }}
diff --git a/site/templates/index.liquid b/site/templates/index.liquid index c67cdc2..5807329 100644 --- a/site/templates/index.liquid +++ b/site/templates/index.liquid @@ -85,16 +85,16 @@ WEBSITE BY OKFOCUS, http://okfoc.us, Internet Legends.