mirror of
https://github.com/Noratrieb/website.git
synced 2026-01-17 02:15:01 +01:00
never use a submodule ever again
This commit is contained in:
parent
830045ee2f
commit
bf24af3431
77 changed files with 12557 additions and 1 deletions
24
blog/themes/terminal/layouts/partials/cover.html
Normal file
24
blog/themes/terminal/layouts/partials/cover.html
Normal file
|
|
@ -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 }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue