From 772d7335d3fb01cfd95a886e6a535f7f7e7ed979 Mon Sep 17 00:00:00 2001
From: amzrk2
Date: Mon, 20 Apr 2020 16:29:46 +0800
Subject: Add webp checker for dev use
---
layouts/partials/head.html | 14 ++++++++++--
layouts/partials/scripts.html | 50 +++++++++++++++++++++++++++----------------
2 files changed, 43 insertions(+), 21 deletions(-)
(limited to 'layouts')
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index c5331cc..658030e 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -5,6 +5,7 @@
{{ hugo.Generator }}
+
{{ partial "favicon.html" . }}
{{ if .IsHome }}
@@ -18,20 +19,29 @@
{{ end }}
-
{{ template "_internal/opengraph.html" . }}
{{ template "_internal/twitter_cards.html" . }}
{{ partial "analytic-google.html" . }}
+
{{ $options := (dict "targetPath" "css/main.min.css" "outputStyle" "compressed") }}
{{ $style := resources.Get "sass/main.scss" | resources.ToCSS $options }}
+
+
+{{ if .Site.Params.webpChecker }}
+{{ $webp := resources.Get "js/modernizr-webp.min.js" }}
+
+{{ end }}
{{ with .Site.Params.cdnIntersectionObserverJS }}
-{{ end }}
+
+{{ end }}
+
+
{{ if or .Params.math .Site.Params.math }}
{{ partial "math.html" . }}
{{ end }}
\ No newline at end of file
diff --git a/layouts/partials/scripts.html b/layouts/partials/scripts.html
index e807e36..d734202 100644
--- a/layouts/partials/scripts.html
+++ b/layouts/partials/scripts.html
@@ -1,13 +1,13 @@
-
{{ if and (.IsPage) (.Site.Params.utterancesComment) }}
+
{{ end }}
-
{{ if .Site.Params.scrollTop }}
+
{{ end }}
-
+{{ if .Site.Params.webpChecker }}
+
+
+{{ end }}
+
+
+
{{ if .Site.Params.webpChecker }}
{{ $webp := resources.Get "js/modernizr-webp.min.js" }}
{{ end }}
-{{ with .Site.Params.cdnIntersectionObserverJS }}
-
-{{ end }}
-
-
-
{{ if or .Params.math .Site.Params.math }}
diff --git a/layouts/partials/scripts.html b/layouts/partials/scripts.html
index d734202..79befb5 100644
--- a/layouts/partials/scripts.html
+++ b/layouts/partials/scripts.html
@@ -86,12 +86,4 @@
});
});
-{{ end }}
-
-
\ No newline at end of file
+{{ end }}
\ No newline at end of file
diff --git a/layouts/shortcodes/lazyimg-col.html b/layouts/shortcodes/lazyimg-col.html
index 0192ba5..0067762 100644
--- a/layouts/shortcodes/lazyimg-col.html
+++ b/layouts/shortcodes/lazyimg-col.html
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/layouts/shortcodes/lazyimg-row.html b/layouts/shortcodes/lazyimg-row.html
index dd07f93..1e76de0 100644
--- a/layouts/shortcodes/lazyimg-row.html
+++ b/layouts/shortcodes/lazyimg-row.html
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/layouts/shortcodes/lazyimg.html b/layouts/shortcodes/lazyimg.html
index a23a15e..468a901 100644
--- a/layouts/shortcodes/lazyimg.html
+++ b/layouts/shortcodes/lazyimg.html
@@ -1 +1 @@
-