mirror of
https://github.com/nunocoracao/blowfish.git
synced 2025-05-19 22:41:52 +02:00
Use AutoOrient filter when resizing images
This commit is contained in:
parent
7d634c9ac9
commit
347a3630f1
8 changed files with 45 additions and 9 deletions
|
@ -24,7 +24,11 @@
|
|||
<div class="w-full thumbnail_card_related nozoom" style="background-image:url({{ .RelPermalink }});"></div>
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ with .Resize "600x" }}
|
||||
{{ $filters := slice
|
||||
images.AutoOrient
|
||||
(images.Process "resize 600x")
|
||||
}}
|
||||
{{ with images.Filter $filters . }}
|
||||
<div class="w-full thumbnail_card_related nozoom" style="background-image:url({{ .RelPermalink }});"></div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
|
|
@ -25,7 +25,11 @@
|
|||
<div class="w-full thumbnail_card nozoom" style="background-image:url({{ .RelPermalink }});"></div>
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ with .Resize "600x" }}
|
||||
{{ $filters := slice
|
||||
images.AutoOrient
|
||||
(images.Process "resize 600x")
|
||||
}}
|
||||
{{ with images.Filter $filters . }}
|
||||
<div class="w-full thumbnail_card nozoom" style="background-image:url({{ .RelPermalink }});"></div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
|
|
@ -52,7 +52,11 @@
|
|||
<div class="{{ $articleImageClasses }}" style="background-image:url({{ .RelPermalink }});"></div>
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ with .Resize "600x" }}
|
||||
{{ $filters := slice
|
||||
images.AutoOrient
|
||||
(images.Process "resize 600x")
|
||||
}}
|
||||
{{ with images.Filter $filters . }}
|
||||
<div class="{{ $articleImageClasses }}" style="background-image:url({{ .RelPermalink }});"></div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
|
|
@ -41,7 +41,11 @@
|
|||
style="background-image:url({{ .RelPermalink }});">
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ with .Resize "1200x" }}
|
||||
{{ $filters := slice
|
||||
images.AutoOrient
|
||||
(images.Process "resize 1200x")
|
||||
}}
|
||||
{{ with images.Filter $filters . }}
|
||||
<div class="fixed inset-x-0 top-0 h-[800px] single_hero_background nozoom"
|
||||
style="background-image:url({{ .RelPermalink }});">
|
||||
{{ end }}
|
||||
|
|
|
@ -26,7 +26,11 @@
|
|||
<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" }}
|
||||
{{ $filters := slice
|
||||
images.AutoOrient
|
||||
(images.Process "resize 1200x")
|
||||
}}
|
||||
{{ with images.Filter $filters . }}
|
||||
<div class="w-full h-36 md:h-56 lg:h-72 single_hero_basic nozoom" style="background-image:url({{ .RelPermalink }});"></div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
|
|
@ -48,7 +48,11 @@
|
|||
</figure>
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ with .Resize "1200x" }}
|
||||
{{ $filters := slice
|
||||
images.AutoOrient
|
||||
(images.Process "resize 1200x")
|
||||
}}
|
||||
{{ with images.Filter $filters . }}
|
||||
<figure>
|
||||
<img class="w-full rounded-lg single_hero_round nozoom" alt="{{ $alt }}" width="{{ .Width }}" height="{{ .Height }}" src="{{ .RelPermalink }}">
|
||||
{{ if $caption }}
|
||||
|
|
|
@ -25,7 +25,11 @@
|
|||
<div class="w-full rounded-md h-36 md:h-56 lg:h-72 single_hero_basic nozoom" style="background-image:url({{ .RelPermalink }});"></div>
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ with .Resize "1200x" }}
|
||||
{{ $filters := slice
|
||||
images.AutoOrient
|
||||
(images.Process "resize 1200x")
|
||||
}}
|
||||
{{ with images.Filter $filters . }}
|
||||
<div class="w-full rounded-md h-36 md:h-56 lg:h-72 single_hero_basic nozoom" style="background-image:url({{ .RelPermalink }});"></div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
@ -44,7 +48,11 @@
|
|||
</div>
|
||||
</div>{{ end }}
|
||||
{{ else }}
|
||||
{{ with .Resize "1200x" }}
|
||||
{{ $filters := slice
|
||||
images.AutoOrient
|
||||
(images.Process "resize 1200x")
|
||||
}}
|
||||
{{ with images.Filter $filters . }}
|
||||
<div class="fixed inset-x-0 top-0 h-[800px] single_hero_background nozoom"
|
||||
style="background-image:url({{ .RelPermalink }});">
|
||||
<div class="absolute inset-0 bg-gradient-to-t from-neutral dark:from-neutral-800 to-transparent mix-blend-normal">
|
||||
|
|
|
@ -17,7 +17,11 @@
|
|||
<div class="w-full thumbnail_card nozoom" style="background-image:url({{ .RelPermalink }});"></div>
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ with .Resize "600x" }}
|
||||
{{ $filters := slice
|
||||
images.AutoOrient
|
||||
(images.Process "resize 600x")
|
||||
}}
|
||||
{{ with images.Filter $filters . }}
|
||||
<div class="w-full thumbnail_card nozoom" style="background-image:url({{ .RelPermalink }});"></div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
|
Loading…
Add table
Reference in a new issue