From 59b3591d22a6050bee421af3c58cab302f197ab5 Mon Sep 17 00:00:00 2001 From: schneefux Date: Sun, 23 Oct 2016 19:06:18 +0200 Subject: show a loader --- themes/flog/layouts/partials/footer.html | 33 +++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/themes/flog/layouts/partials/footer.html b/themes/flog/layouts/partials/footer.html index 5d4ac07..fc0f949 100644 --- a/themes/flog/layouts/partials/footer.html +++ b/themes/flog/layouts/partials/footer.html @@ -1,5 +1,18 @@ + @@ -16,7 +29,25 @@ $(document).ready(function() { $('.button-collapse').sideNav(); - $('#main').smoothState({ prefetch: true, onAfter: ready }); + $('#main').smoothState({ + prefetch: true, + onAfter: ready, + onStart: { + duration: 250, + render: function (container) { + $('#loading').fadeTo(250, 0.3); + $('#loading').show(); + } + }, + onReady: { + duration: 100, + render: function (container, newContent) { + $('#loading').fadeTo(100, 0); + $('#loading').hide(); + container.html(newContent); + } + } + }); }); $('body').imagesLoaded({ background: true }, function() { $('').load(function() { -- cgit v1.3.1