Use images
instead of featuredImg
`featuredImg` and `bgImg` are preserved in case you want to use a different background image from metadata images
This commit is contained in:
parent
f5b68c452f
commit
4b2192f2fa
6 changed files with 41 additions and 16 deletions
|
@ -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">
|
||||
|
|
|
@ -3,9 +3,13 @@
|
|||
{{ end }}
|
||||
|
||||
{{ define "main" }}
|
||||
{{- with .Params.featuredImg }}
|
||||
{{- if .Params.featuredImg }}
|
||||
<div id="bg-img" class="bg-img" style="background-image: url({{.Params.featuredImg}});" onclick="showContent()"></div>
|
||||
{{- else if .Params.images }}
|
||||
{{- range first 1 .Params.images }}
|
||||
<div id="bg-img" class="bg-img" style="background-image: url({{.}});" onclick="showContent()"></div>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
<main class="site-main section-inner animated fadeIn faster">
|
||||
<article class="thin">
|
||||
<header class="post-header">
|
||||
|
@ -51,7 +55,7 @@
|
|||
{{- end }}
|
||||
</div>
|
||||
<div id="comments" class="thin">
|
||||
{{ partial "comments.html" . }}
|
||||
{{- partial "comments.html" . -}}
|
||||
</div>
|
||||
</main>
|
||||
{{ end }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue