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/_default/single.html | 6 +++++-
themes/flog/layouts/partials/footer.html | 7 ++++---
themes/flog/layouts/partials/header.html | 3 +--
themes/flog/layouts/partials/listing.html | 6 +++++-
4 files changed, 15 insertions(+), 7 deletions(-)
(limited to 'themes')
diff --git a/themes/flog/layouts/_default/single.html b/themes/flog/layouts/_default/single.html
index 44bdae9..bae38f8 100644
--- a/themes/flog/layouts/_default/single.html
+++ b/themes/flog/layouts/_default/single.html
@@ -4,7 +4,11 @@
{{ if .Params.image }}
-
+
+
{{ end }}
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 + ')');
+ });
});
-
+