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
|
@ -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