From 2bf66aa429370069a6bf11c5fa690610fd635eb6 Mon Sep 17 00:00:00 2001 From: “Ryder <“r@okfoc.us”> Date: Mon, 28 Mar 2016 18:14:26 -0400 Subject: make gallery proper height --- public/assets/js/app.js | 44 ++++++++++++++++++++++++++------------------ public/assets/ok.css | 1 - 2 files changed, 26 insertions(+), 19 deletions(-) (limited to 'public') diff --git a/public/assets/js/app.js b/public/assets/js/app.js index 2bef5f5..dd2a7e1 100644 --- a/public/assets/js/app.js +++ b/public/assets/js/app.js @@ -3,30 +3,38 @@ 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"); - } + if (is_mobile) { + $("html").addClass("mobile"); + } else { + $("html").addClass("desktop"); + } +}); + +$(".cell").css({ 'height': ($(".top").height() + 'px') }); + +$(window).resize(function() { + $(".cell").css({ 'height': ($(".top").height() + 'px') }); }); $('.top').flickity({ - cellAlign: 'left', - contain: true, - pageDots: false, - wrapAround: true, - arrowShape: { - x0: 10, - x1: 35, y1: 25, - x2: 40, y2: 25, - x3: 15 - } + cellAlign: 'left', + contain: true, + pageDots: false, + wrapAround: true, + arrowShape: { + x0: 10, + x1: 35, + y1: 25, + x2: 40, + y2: 25, + x3: 15 + } }); -$('.index').click( function(){ +$('.index').click(function() { $('body').toggleClass('navopen'); }); -$('.item').click( function(){ +$('.item').click(function() { $('body').removeClass('navopen'); -}); +}); \ No newline at end of file diff --git a/public/assets/ok.css b/public/assets/ok.css index e4193b8..d9e6008 100644 --- a/public/assets/ok.css +++ b/public/assets/ok.css @@ -228,7 +228,6 @@ button.previous:active svg { .cell { width: 100vw; - height: 70vh; /*THIS SHOULD BE DYNAMIC*/ background-position: center; background-size: cover; -- cgit v1.2.3-70-g09d2