From 941642aee876a97dbb79666d8fabaa2b1feb9ff5 Mon Sep 17 00:00:00 2001 From: Indrajith K L Date: Sun, 20 Mar 2022 00:38:25 +0530 Subject: Theme changes --- themes/terminal/layouts/partials/cover.html | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 themes/terminal/layouts/partials/cover.html (limited to 'themes/terminal/layouts/partials/cover.html') diff --git a/themes/terminal/layouts/partials/cover.html b/themes/terminal/layouts/partials/cover.html new file mode 100644 index 0000000..ea562ea --- /dev/null +++ b/themes/terminal/layouts/partials/cover.html @@ -0,0 +1,24 @@ +{{- $cover := false -}} +{{- $autoCover := default $.Site.Params.autoCover false }} + +{{- if index .Params "cover" -}} + {{- if .Resources.GetMatch .Params.Cover }} + {{- $cover = (.Resources.GetMatch .Params.Cover).RelPermalink -}} + {{- else -}} + {{- $cover = absURL .Params.Cover -}} + {{- end -}} +{{- else if $.Site.Params.AutoCover -}} + {{- if (not .Params.Cover) -}} + {{- if .Resources.GetMatch "cover.*" -}} + {{- $cover = (.Resources.GetMatch "cover.*").RelPermalink -}} + {{- end -}} + {{- end -}} +{{- end -}} + +{{if $cover -}} + + {{ .Title | plainify | default +{{- end }} -- cgit v1.2.3