diff --git a/layouts/_default/index.html b/layouts/_default/index.html index b952314..ca309c2 100644 --- a/layouts/_default/index.html +++ b/layouts/_default/index.html @@ -47,17 +47,7 @@ {{ end }} {{ if .Params.Cover }} -
- {{ if .Params.UseRelativeCover }} - {{ .Params.CoverAlt | plainify | default .Title }} - {{ else }} - {{ .Params.CoverAlt | plainify | default .Title }} - {{ end }} - - {{ if .Params.CoverCaption }} -
{{ .Params.CoverCaption | markdownify }}
- {{ end }} -
+ {{ partial "postcover.html" . }} {{ end }}
diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 8ece5f0..ff0bb14 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -35,17 +35,7 @@ {{ end }} {{ if .Params.Cover }} -
- {{ if .Params.UseRelativeCover }} - {{ .Params.CoverAlt | plainify | default .Title }} - {{ else }} - {{ .Params.CoverAlt | plainify | default .Title }} - {{ end }} - - {{ if .Params.CoverCaption }} -
{{ .Params.CoverCaption | markdownify }}
- {{ end }} -
+ {{ partial "postcover.html" . }} {{ end }}
diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 30b5eb9..6453481 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -39,17 +39,7 @@ {{ end }} {{ if .Params.Cover }} -
- {{ if .Params.UseRelativeCover }} - {{ .Params.CoverAlt | plainify | default .Title }} - {{ else }} - {{ .Params.CoverAlt | plainify | default .Title }} - {{ end }} - - {{ if .Params.CoverCaption }} -
{{ .Params.CoverCaption | markdownify }}
- {{ end }} -
+ {{ partial "postcover.html" . }} {{ end }}
diff --git a/layouts/partials/postcover.html b/layouts/partials/postcover.html new file mode 100644 index 0000000..d9e0bc6 --- /dev/null +++ b/layouts/partials/postcover.html @@ -0,0 +1,11 @@ +
+ {{ if .Params.UseRelativeCover }} + {{ .Params.CoverAlt | plainify | default .Title }} + {{ else }} + {{ .Params.CoverAlt | plainify | default .Title }} + {{ end }} + + {{ if .Params.CoverCaption }} +
{{ .Params.CoverCaption | markdownify }}
+ {{ end }} +