From 464cce29a2e04e508a39cf9e68da4458d53873f8 Mon Sep 17 00:00:00 2001 From: schneefux Date: Sun, 23 Oct 2016 19:03:43 +0200 Subject: load low-res images first --- themes/flog/layouts/partials/footer.html | 7 ++++--- themes/flog/layouts/partials/header.html | 3 +-- themes/flog/layouts/partials/listing.html | 6 +++++- 3 files changed, 10 insertions(+), 6 deletions(-) (limited to 'themes/flog/layouts/partials') diff --git a/themes/flog/layouts/partials/footer.html b/themes/flog/layouts/partials/footer.html index 6a2857e..0dcd9e1 100644 --- a/themes/flog/layouts/partials/footer.html +++ b/themes/flog/layouts/partials/footer.html @@ -17,9 +17,10 @@ $('.button-collapse').sideNav(); $('#main').smoothState({ prefetch: true, onAfter: ready }); }); - - $(document).ready(function() { - $('.parallax').parallax(); + $('body').imagesLoaded({ background: true }, function() { + $('').load(function() { + $('body').css('background-image', 'url(' + this.src + ')'); + }); }); diff --git a/themes/flog/layouts/partials/header.html b/themes/flog/layouts/partials/header.html index 07fdd3d..8016f53 100644 --- a/themes/flog/layouts/partials/header.html +++ b/themes/flog/layouts/partials/header.html @@ -9,8 +9,7 @@ {{ .Title }}{{ if not .IsHome }} - {{ .Site.Title }}{{ end }} - - +