Fix featured image toggle
This commit is contained in:
parent
f601584822
commit
334d05e5a1
9 changed files with 24 additions and 31 deletions
|
@ -1,15 +1,11 @@
|
|||
{{ define "head" }}
|
||||
<style>
|
||||
.bg-img {background-image: url('
|
||||
{{- if .Params.featuredImg -}}
|
||||
{{.Params.featuredImg | absURL}}
|
||||
{{ if .Params.featuredImg -}}
|
||||
<style>.bg-img {background-image: url('{{.Params.featuredImg | absURL}}');}</style>
|
||||
{{- else if .Params.images -}}
|
||||
{{- range first 1 .Params.images -}}
|
||||
{{. | absURL}}
|
||||
<style>.bg-img {background-image: url('{{. | absURL}}');}</style>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
');}
|
||||
</style>
|
||||
{{ end }}
|
||||
|
||||
{{ define "header" }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue