mirror of
https://github.com/nunocoracao/blowfish.git
synced 2025-04-21 08:41:53 +02:00
commit
282eb80cc2
2 changed files with 5 additions and 3 deletions
|
@ -3,14 +3,16 @@
|
|||
{{- $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" src="{{ .RelPermalink }}">
|
||||
<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" src="{{ .RelPermalink }}">
|
||||
<img class="w-full rounded-lg single_hero_round nozoom" alt="{{ $alt }}" width="{{ .Width }}" height="{{ .Height }}" src="{{ .RelPermalink }}">
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{- end -}}
|
|
@ -8,7 +8,7 @@
|
|||
{{ with .Site.Params.defaultBackgroundImage }}{{ $homepageImage = resources.Get . }}{{ end }}
|
||||
{{ with .Site.Params.homepage.homepageImage }}{{ $homepageImage = resources.Get . }}{{ end }}
|
||||
{{ 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
|
||||
class="absolute inset-0 h-[1000px] bg-gradient-to-t from-neutral dark:from-neutral-800 to-transparent mix-blend-normal">
|
||||
</div>
|
||||
|
|
Loading…
Add table
Reference in a new issue