summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author“Ryder <“r@okfoc.us”>2016-03-30 16:16:26 -0400
committer“Ryder <“r@okfoc.us”>2016-03-30 16:16:26 -0400
commitf6aedefed2663cdf6af8d7f599f24c6929064516 (patch)
tree9b383f614fe8129e423176ee2871ebabe0986deb
parentc3ac7977fa5921a43f81fb34be08d0d2e8eea5d8 (diff)
parent3cf47d8edc92dc005a26773816545963e21051b6 (diff)
Merge branch 'master' of https://github.com/okfocus/portfolio
-rw-r--r--public/assets/js/lib/NavView.js6
-rw-r--r--public/assets/js/lib/ProjectView.js2
-rw-r--r--public/assets/ok.css2
-rw-r--r--templates/index.liquid18
4 files changed, 18 insertions, 10 deletions
diff --git a/public/assets/js/lib/NavView.js b/public/assets/js/lib/NavView.js
index a9fba25..b2fe341 100644
--- a/public/assets/js/lib/NavView.js
+++ b/public/assets/js/lib/NavView.js
@@ -49,7 +49,6 @@ var NavView = View.extend({
return
}
- console.log(view.page_number, view.project_id)
direction = direction || "down"
addClassForPeriod( document.body, direction, app.navigation_delay )
@@ -59,4 +58,9 @@ var NavView = View.extend({
app.view = view
},
+ setActive: function(id){
+ this.$(".active").removeClass("active")
+ this.$("[data-id=" + id + "]").addClass("active")
+ },
+
}) \ No newline at end of file
diff --git a/public/assets/js/lib/ProjectView.js b/public/assets/js/lib/ProjectView.js
index 061dcee..6ae581e 100644
--- a/public/assets/js/lib/ProjectView.js
+++ b/public/assets/js/lib/ProjectView.js
@@ -44,6 +44,8 @@ var ProjectView = View.extend({
else {
app.router.pushState("/project/" + this.project_id)
}
+
+ app.nav.setActive( this.project_id )
this.showing = true
addClassForPeriod( this.el, "showing", app.navigation_delay, function(){
diff --git a/public/assets/ok.css b/public/assets/ok.css
index eb5dbba..221dd56 100644
--- a/public/assets/ok.css
+++ b/public/assets/ok.css
@@ -531,7 +531,7 @@ button.previous {
}
.resizing .top {
- background: url(img/tomato20dancing.gif)center;
+ background: url(img/tomato20dancing.gif) center !important;
}
.bottom {
diff --git a/templates/index.liquid b/templates/index.liquid
index e2969b0..788c34b 100644
--- a/templates/index.liquid
+++ b/templates/index.liquid
@@ -116,14 +116,16 @@
{% for project in projects %}
<div class="item" data-id="{{ project.id }}">
<div class="top {% if project.media[2] %}gallery{% else %}single{% endif %}">
- {% for media in project.media %} {% if media.type == 'image' %}
- <div class="cell" style="background-image:url({{ media.uri }});
- {% if media.caption %} background-size:{{ media.caption }}; {% endif %}"></div>
- {% elsif media.type == 'vimeo' %}
- <div class="cell video" data-video="{{ media.token }}"></div>
- {% elsif media.type == 'link' %}
- <iframe class="cell" src="{{ media.uri }}"></iframe>
- {% endif %} {% endfor %}
+ {% for media in project.media %}
+ {% if media.type == 'image' %}
+ <div class="cell" style="background-image:url({{ media.uri }});
+ {% if media.caption %} background-size:{{ media.caption }}; {% endif %}"></div>
+ {% elsif media.type == 'vimeo' %}
+ <div class="cell video" data-video="{{ media.token }}"></div>
+ {% elsif media.type == 'link' %}
+ <iframe class="cell" src="{{ media.uri }}"></iframe>
+ {% endif %}
+ {% endfor %}
</div>
<div class="bottom {% if project.press.length %}press{% else %}nopress{% endif %}">
<div class="headings five">