aboutsummaryrefslogtreecommitdiff
path: root/layouts/index.html
diff options
context:
space:
mode:
authorTrack3 <pengliabc@live.cn>2018-12-31 20:03:32 +0800
committerTrack3 <pengliabc@live.cn>2018-12-31 20:08:04 +0800
commit4b2192f2fa89f10d09fabc48105465865ef01943 (patch)
treefaf5519751b4994ccbeb1b8558295528317c2f87 /layouts/index.html
parentf5b68c452f6df102ee2e40e638cb8988798099ef (diff)
downloadhermit-4b2192f2fa89f10d09fabc48105465865ef01943.tar.gz
Use `images` instead of `featuredImg`
`featuredImg` and `bgImg` are preserved in case you want to use a different background image from metadata images
Diffstat (limited to 'layouts/index.html')
-rw-r--r--layouts/index.html8
1 files changed, 6 insertions, 2 deletions
diff --git a/layouts/index.html b/layouts/index.html
index c9047e5..8a2f798 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -1,6 +1,10 @@
{{ define "main" }}
- {{- with .Site.Params.bgImg }}
- <div class="bg-img" style="background-image: url('{{ . }}')"></div>
+ {{- if .Site.Params.bgImg }}
+ <div class="bg-img" style="background-image: url({{.Site.Params.bgImg}});"></div>
+ {{- else if .Site.Params.images }}
+ {{- range first 1 .Site.Params.images }}
+ <div class="bg-img" style="background-image: url({{.}});"></div>
+ {{- end }}
{{- end }}
<div id="spotlight" class="animated fadeIn">
<div id="home-center">