diff options
| author | Track3 <pengliabc@live.cn> | 2019-01-03 18:25:14 +0800 |
|---|---|---|
| committer | Track3 <pengliabc@live.cn> | 2019-01-03 18:25:14 +0800 |
| commit | 334d05e5a17701f171f0221c95c9235e52fa8f46 (patch) | |
| tree | f919eb9605316ad3f92b20c15c683c3e079f7b9b /layouts/posts/single.html | |
| parent | f601584822fb6cc5877b2a28848e6103a775b35f (diff) | |
Fix featured image toggle
Diffstat (limited to 'layouts/posts/single.html')
| -rw-r--r-- | layouts/posts/single.html | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/layouts/posts/single.html b/layouts/posts/single.html index dc70fd3..02e3fd5 100644 --- a/layouts/posts/single.html +++ b/layouts/posts/single.html @@ -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" }} |
