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

github.com/vickylaixy/hugo-theme-introduction.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Ottens <kevin.ottens@kdab.com>2018-09-30 20:32:21 +0300
committerHanzei <16541325+hanzei@users.noreply.github.com>2018-09-30 20:32:21 +0300
commitbab5773e9fda3a95afcdf6fdd60d22508eb009b9 (patch)
tree954b54b76728658c21401186b56315c6041a2824
parent7d65d6ca1415a2f77fbba360e594152621d09cb9 (diff)
Allow to have the fade-in effect only on main page (#78)
-rw-r--r--exampleSite/config.toml1
-rw-r--r--layouts/index.html8
2 files changed, 5 insertions, 4 deletions
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index 00d8fff..e0088db 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -9,6 +9,7 @@ DefaultContentLanguage = "en" # Default language fo
favicon = "/img/fav.ico" # Path to favicon file
showRSSButton = false # Show rss button in navigation
fadeIn = true # Turn on/off the fade-in effect
+ fadeInIndex = false # Turn on/off the fade-in effect on the index page even if fade-in was otherwise turned off
dateFormat = "Jan 2, 2006"
email = "youremail@email.com" # E-mail address for contact section
# customCSS = ["foo.css"] # Include custom css files placed under assets/
diff --git a/layouts/index.html b/layouts/index.html
index 6bb259f..ede33af 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -15,15 +15,15 @@
<div class="hero-body">
<div class="container has-text-centered">
<!-- Title and tagline -->
- <h1 class="bold-title {{ if .Site.Params.fadeIn | default true }}fade-in one{{ end }}">
+ <h1 class="bold-title {{ if or (.Site.Params.fadeIn | default true) .Site.Params.fadeInIndex }}fade-in one{{ end }}">
{{ .Title }}
</h1>
- <div class="subtitle is-3 {{ if .Site.Params.fadeIn | default true }}fade-in two{{ end }}">
+ <div class="subtitle is-3 {{ if or (.Site.Params.fadeIn | default true) .Site.Params.fadeInIndex }}fade-in two{{ end }}">
{{ .Content }}
</div>
<!-- End title and tagline -->
<!-- Some social icons -->
- <div class=" {{ if .Site.Params.fadeIn | default true }}fade-in three{{ end }}">
+ <div class="{{ if or (.Site.Params.fadeIn | default true) .Site.Params.fadeInIndex }}fade-in three{{ end }}">
{{ partial "home/social.html" . }}
</div>
<!-- End top social icons -->
@@ -34,7 +34,7 @@
{{ end }}
<!-- Done with Hero -->
- <div class="{{ if .Site.Params.fadeIn | default true }}fade-in three{{ end }}">
+ <div class="{{ if or (.Site.Params.fadeIn | default true) .Site.Params.fadeInIndex }}fade-in three{{ end }}">
<!-- Tell them all about it! -->
{{ partial "nav.html" . }}