mirror of
https://github.com/nunocoracao/blowfish.git
synced 2025-01-23 06:55:43 -06:00
19520b4481
Also added ability to set author image as external url and updated relevant documentation in configuration
20 lines
No EOL
900 B
HTML
20 lines
No EOL
900 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 -}}
|
|
{{ if .Params.featureimage }}
|
|
{{- $url:= .Params.featureimage -}}
|
|
{{- if not $featured }}{{ $featured = resources.GetRemote $url }}{{ end -}}
|
|
{{ end }}
|
|
{{- with $featured -}}
|
|
{{ if $disableImageOptimization }}
|
|
{{ with . }}
|
|
<div class="w-full h-36 md:h-56 lg:h-72 single_hero_basic nozoom" style="background-image:url({{ .RelPermalink }});"></div>
|
|
{{ end }}
|
|
{{ else }}
|
|
{{ with .Resize "1200x" }}
|
|
<div class="w-full h-36 md:h-56 lg:h-72 single_hero_basic nozoom" style="background-image:url({{ .RelPermalink }});"></div>
|
|
{{ end }}
|
|
{{ end }}
|
|
{{- end -}} |