mirror of
https://github.com/nunocoracao/blowfish.git
synced 2025-01-23 15:05:38 -06:00
18 lines
No EOL
861 B
HTML
18 lines
No EOL
861 B
HTML
{{ $disableImageOptimization := .Page.Site.Params.disableImageOptimization | default false }}
|
|
|
|
{{- $images := .Resources.ByType "image" -}}
|
|
{{- $featured := $images.GetMatch "*feature*" -}}
|
|
{{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}}
|
|
{{- $alt := .Page.Title -}}
|
|
{{- with .Page.Params.alt }}{{ $alt = . }}{{ end -}}
|
|
{{- with $featured -}}
|
|
{{ if $disableImageOptimization }}
|
|
{{ with . }}
|
|
<img class="w-full rounded-lg single_hero_round nozoom" alt="{{ $alt }}" width="{{ .Width }}" height="{{ .Height }}" src="{{ .RelPermalink }}">
|
|
{{ end }}
|
|
{{ else }}
|
|
{{ with .Resize "1200x" }}
|
|
<img class="w-full rounded-lg single_hero_round nozoom" alt="{{ $alt }}" width="{{ .Width }}" height="{{ .Height }}" src="{{ .RelPermalink }}">
|
|
{{ end }}
|
|
{{ end }}
|
|
{{- end -}} |