Fix featured image toggle

This commit is contained in:
Track3 2019-01-03 18:25:14 +08:00
parent f601584822
commit 334d05e5a1
9 changed files with 24 additions and 31 deletions

View file

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