summaryrefslogtreecommitdiff
path: root/public/assets/js/app.js
diff options
context:
space:
mode:
Diffstat (limited to 'public/assets/js/app.js')
-rw-r--r--public/assets/js/app.js13
1 files changed, 10 insertions, 3 deletions
diff --git a/public/assets/js/app.js b/public/assets/js/app.js
index 54b2177..29224fe 100644
--- a/public/assets/js/app.js
+++ b/public/assets/js/app.js
@@ -1,5 +1,7 @@
var app = (function() {
var app = {}
+
+ app.navigation_delay = 200
app.iscroll_options = {
mouseWheel: true,
@@ -53,8 +55,9 @@ var app = (function() {
$("body").removeClass("loading")
}, 20)
- app.view = app.projects[0]
- app.view.show()
+ app.router = new SiteRouter ()
+
+ app.router.launch()
console.log("launched")
}
@@ -63,9 +66,13 @@ var app = (function() {
$(".cell, .next, .previous").css({ 'display': 'none' })
$('body').addClass('resizing')
debounce(function() {
+ $(".item").addClass("hidden")
+ setTimeout(function(){
$(".cell, .next, .previous").css({ 'height': ($(".top").height() + 'px'), 'display': 'inline-block' })
+ app.view.$el.removeClass("hidden")
$('.top').flickity('resize')
$('body').removeClass('resizing')
+ }, 20)
}, 400)
}
@@ -74,6 +81,7 @@ var app = (function() {
})()
$(".cell, .next").css({ 'height': ($(".top").height() + 'px') })
+$(".item").addClass("hidden")
$('.top').flickity(app.flickity_options).on( 'cellSelect', function(e) {
var gallery = $(e.target).data('flickity')
@@ -82,5 +90,4 @@ $('.top').flickity(app.flickity_options).on( 'cellSelect', function(e) {
$(".previous, .next").css({ 'height': ($(".top").height() + 'px') })
-
app.init()