mirror of
https://github.com/nunocoracao/blowfish.git
synced 2025-04-21 13:51:53 +02:00
commit
282eb80cc2
2 changed files with 5 additions and 3 deletions
|
@ -3,14 +3,16 @@
|
||||||
{{- $images := .Resources.ByType "image" -}}
|
{{- $images := .Resources.ByType "image" -}}
|
||||||
{{- $featured := $images.GetMatch "*feature*" -}}
|
{{- $featured := $images.GetMatch "*feature*" -}}
|
||||||
{{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}}
|
{{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}}
|
||||||
|
{{- $alt := .Page.Title -}}
|
||||||
|
{{- with .Page.Params.alt }}{{ $alt = . }}{{ end -}}
|
||||||
{{- with $featured -}}
|
{{- with $featured -}}
|
||||||
{{ if $disableImageOptimization }}
|
{{ if $disableImageOptimization }}
|
||||||
{{ with . }}
|
{{ with . }}
|
||||||
<img class="w-full rounded-lg single_hero_round nozoom" src="{{ .RelPermalink }}">
|
<img class="w-full rounded-lg single_hero_round nozoom" alt="{{ $alt }}" width="{{ .Width }}" height="{{ .Height }}" src="{{ .RelPermalink }}">
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{ with .Resize "1200x" }}
|
{{ with .Resize "1200x" }}
|
||||||
<img class="w-full rounded-lg single_hero_round nozoom" src="{{ .RelPermalink }}">
|
<img class="w-full rounded-lg single_hero_round nozoom" alt="{{ $alt }}" width="{{ .Width }}" height="{{ .Height }}" src="{{ .RelPermalink }}">
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{- end -}}
|
{{- end -}}
|
|
@ -8,7 +8,7 @@
|
||||||
{{ with .Site.Params.defaultBackgroundImage }}{{ $homepageImage = resources.Get . }}{{ end }}
|
{{ with .Site.Params.defaultBackgroundImage }}{{ $homepageImage = resources.Get . }}{{ end }}
|
||||||
{{ with .Site.Params.homepage.homepageImage }}{{ $homepageImage = resources.Get . }}{{ end }}
|
{{ with .Site.Params.homepage.homepageImage }}{{ $homepageImage = resources.Get . }}{{ end }}
|
||||||
{{ if not (eq $homepageImage "") }}
|
{{ if not (eq $homepageImage "") }}
|
||||||
<img class="w-full h-[1000px] object-cover m-0 nozoom" src="{{ $homepageImage.RelPermalink }}">
|
<img class="w-full h-[1000px] object-cover m-0 nozoom" src="{{ $homepageImage.RelPermalink }}" role="presentation">
|
||||||
<div
|
<div
|
||||||
class="absolute inset-0 h-[1000px] bg-gradient-to-t from-neutral dark:from-neutral-800 to-transparent mix-blend-normal">
|
class="absolute inset-0 h-[1000px] bg-gradient-to-t from-neutral dark:from-neutral-800 to-transparent mix-blend-normal">
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Reference in a new issue