summaryrefslogtreecommitdiff
path: root/public/assets/js/app.js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2016-04-04 17:31:33 -0400
committerJules Laplace <jules@okfoc.us>2016-04-04 17:31:33 -0400
commitcd04c9cb601ccbeff533fa3e01237fb3ab4716bc (patch)
tree7dbab7acfc62fc1cd0534a32a229601d62d78747 /public/assets/js/app.js
parent2dd2c0bff8a8632492972a2c8940c28d2cb0887a (diff)
scrollable nav
Diffstat (limited to 'public/assets/js/app.js')
-rw-r--r--public/assets/js/app.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/public/assets/js/app.js b/public/assets/js/app.js
index e34eb52..6fa5724 100644
--- a/public/assets/js/app.js
+++ b/public/assets/js/app.js
@@ -98,17 +98,19 @@ var app = (function() {
app.resizeItems = function(){
var windowHeight = window.innerHeight
+ var navHeight = $("nav").height()
if (is_iphone) {
windowHeight -= 22 // account for lower bar
window.scrollTo(0,0)
+ $(".menu").height( windowHeight + 16 - navHeight )
}
$(".item").each(function(i){
var height = windowHeight - ($(this).find(".bottom").height() + 10)
if (is_desktop) {
- height -= $("nav").height() // account for top bar
+ height -= navHeight // account for top bar
}
$(".cell, .top, .previous, .next, .flickity-viewport", this).css({ 'height': height })