Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/lucperkins/hugo-fresh.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan M <StefMa@users.noreply.github.com>2022-08-13 13:24:31 +0300
committerGitHub <noreply@github.com>2022-08-13 13:24:31 +0300
commit30a1a075ea3c4912ac06154e63862b62e25c7aca (patch)
treea61478ae298849eb6c0d8f892955f6523fbdce5b
parent47c86f107d652cd7515bfe4bccc332faa390d452 (diff)
parent99f97d226ef88cddd43635f3f09dccfebc79ddbb (diff)
Merge pull request #140 from gazoakley/feature/disable-preloader
feat: Allow disabling preloader
-rw-r--r--exampleSite/config.yaml2
-rw-r--r--layouts/_default/baseof.html2
-rw-r--r--layouts/_default/single.html2
3 files changed, 6 insertions, 0 deletions
diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml
index 6071b27..4c883f1 100644
--- a/exampleSite/config.yaml
+++ b/exampleSite/config.yaml
@@ -17,6 +17,8 @@ params:
openGraph: true
# Used as meta data; describe your site to make Google Bots happy
description:
+ # Preloader ensures images are loaded before displaying to the user. If you don't want it uncomment to set it to false
+ # preloader: false
navbarlogo:
# Logo (from static/images/logos/___)
image: logos/fresh.svg
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index 241055d..6163221 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -6,10 +6,12 @@
{{ partial "css.html" . }}
</head>
<body>
+ {{ if ne .Site.Params.preloader false }}
<!-- Preloader -->
<div id="preloader">
<div id="status"></div>
</div>
+ {{ end }}
{{ block "main" . }}
{{ end }}
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index 0c91775..c9940d5 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -6,10 +6,12 @@
{{ partial "css.html" . }}
</head>
<body>
+ {{ if ne .Site.Params.preloader false }}
<!-- Preloader -->
<div id="preloader">
<div id="status"></div>
</div>
+ {{ end }}
{{ block "main" . }}