aboutsummaryrefslogtreecommitdiff
path: root/layouts/posts
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/posts')
-rw-r--r--layouts/posts/single.html8
1 files changed, 6 insertions, 2 deletions
diff --git a/layouts/posts/single.html b/layouts/posts/single.html
index 224995e..026a626 100644
--- a/layouts/posts/single.html
+++ b/layouts/posts/single.html
@@ -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 }}