summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2016-04-06 17:45:01 -0400
committerJules Laplace <jules@okfoc.us>2016-04-06 17:45:01 -0400
commitae685a3a3e0427b9bf47a73f0f170235e469c979 (patch)
treedab245325cb5549fe874c562e66e111eb5050744
parentbeb20d06386eaf11899802aa3a420005d522c556 (diff)
flag to hide project, use white cursor
-rw-r--r--index.js2
-rw-r--r--public/assets/js/lib/ProjectView.js1
-rw-r--r--templates/index.liquid6
3 files changed, 8 insertions, 1 deletions
diff --git a/index.js b/index.js
index 1e62275..1914ba5 100644
--- a/index.js
+++ b/index.js
@@ -41,6 +41,8 @@ var app = okcms.createApp({
media: {type: 'media-list'},
mobileMedia: {type: 'media-list'},
press: {type: 'link-list'},
+ whiteCursor: {type: 'flag'},
+ hideProject: {type: 'flag'},
},
},
diff --git a/public/assets/js/lib/ProjectView.js b/public/assets/js/lib/ProjectView.js
index bc2a715..2bb0f32 100644
--- a/public/assets/js/lib/ProjectView.js
+++ b/public/assets/js/lib/ProjectView.js
@@ -5,6 +5,7 @@ var ProjectView = View.extend({
"click .page-up": "previous",
"click .page-down": "next",
"click .top": "stopPropagation",
+ "click a": "preventDefault",
},
initialize: function(opt){
diff --git a/templates/index.liquid b/templates/index.liquid
index 6f9d1c7..a932851 100644
--- a/templates/index.liquid
+++ b/templates/index.liquid
@@ -33,10 +33,12 @@
<li data-id="cover">Cover</li>
<li data-id="introduction">Introduction</li>
{% for project in projects %}
+ {% unless project.hideProject %}
<li data-id="{{ project.id }}">
<u class='desktoptitle'>{{ project.title }}</u>
<u class='mobiletitle'>{% if project.mobileTitle %}{{ project.mobileTitle }}{% else %}{{ project.title }}{% endif %}</u>
</li>
+ {% endunless %}
{% endfor %}
</ul>
</div>
@@ -117,8 +119,9 @@
<div class="right"></div>
</div>
{% for project in projects %}
+ {% unless project.hideProject %}
<div class="item" data-id="{{ project.id }}">
- <div class="top {% if project.media[2] %}gallery{% else %}single{% endif %}">
+ <div class="top {% if project.media[2] %}gallery{% else %}single{% endif %} {% if project.whiteCursor %}whitecursor{% endif %}">
{% for media in project.media %}
{% if media.type == 'image' %}
<div class="cell desktop image" data-uri="{{ media.uri }}" style="{% if media.caption %}{{ media.caption }}{% endif %}"></div>
@@ -183,6 +186,7 @@
</div>
</div>
</div>
+ {% endunless %}
{% endfor %}
</div>
</body>