diff options
author | Indrajith K L | 2022-03-20 00:38:25 +0530 |
---|---|---|
committer | Indrajith K L | 2022-03-20 00:38:25 +0530 |
commit | 941642aee876a97dbb79666d8fabaa2b1feb9ff5 (patch) | |
tree | 6147d3027127466b312eaa0b34c75966743bf547 /themes/terminal/layouts/partials/cover.html | |
parent | 31fc0796a09e1c0b8acbee6ac2fbee17d525b528 (diff) | |
download | experimentsofindrajith-941642aee876a97dbb79666d8fabaa2b1feb9ff5.tar.gz experimentsofindrajith-941642aee876a97dbb79666d8fabaa2b1feb9ff5.tar.bz2 experimentsofindrajith-941642aee876a97dbb79666d8fabaa2b1feb9ff5.zip |
Theme changes
Diffstat (limited to 'themes/terminal/layouts/partials/cover.html')
-rw-r--r-- | themes/terminal/layouts/partials/cover.html | 24 |
1 files changed, 24 insertions, 0 deletions
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 -}} + <!-- Cover image found --> + <img src="{{ $cover }}" + class="post-cover" + alt="{{ .Title | plainify | default " " }}" + title="{{ .Params.CoverCredit |plainify|default "Cover Image" }}" /> +{{- end }} |