- Refactored themes to always load with just a single file. This avoids a round trip on each request. - Locally load "Fira Code" when available on the system, then try to load the woff2 file, then fall back to regular woff. - Update markup to use relative urls where it is safe. RSS feeds still use absolute URLs. - Only set og:image:(height/width) when using the standard color icon. - Fixed styles on the pagination buttons.
25 lines
759 B
HTML
25 lines
759 B
HTML
{{- $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 = relURL .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 }}
|