diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 166c188..0c5fa3c 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,6 +1,7 @@ {{ define "main" }}
+ {{ partial "header_image.html" . }} {{ partial "content.html" . }}
diff --git a/layouts/partials/content.html b/layouts/partials/content.html index 2d6e857..d14286a 100644 --- a/layouts/partials/content.html +++ b/layouts/partials/content.html @@ -1,14 +1,3 @@ - -{{ if .Params.image }} - {{ .Scratch.Set "image" .Params.image }} - {{ if hasPrefix .Params.image "resource:" }} - {{ $resource := .Resources.GetMatch (replace .Params.image "resource:" "") }} - {{ .Scratch.Set "image" ($resource.Resize "2000x").RelPermalink }} - {{ end }} - - -{{ end }} -

{{ .Title }}

{{ if .Params.subtitle }}
{{ markdownify .Params.subtitle | emojify }}
diff --git a/layouts/partials/header_image.html b/layouts/partials/header_image.html new file mode 100644 index 0000000..9657cc2 --- /dev/null +++ b/layouts/partials/header_image.html @@ -0,0 +1,9 @@ +{{ if .Params.image }} + {{ .Scratch.Set "image" .Params.image }} + {{ if hasPrefix .Params.image "resource:" }} + {{ $resource := .Resources.GetMatch (replace .Params.image "resource:" "") }} + {{ .Scratch.Set "image" ($resource.Resize "2000x").RelPermalink }} + {{ end }} + + +{{ end }}