Revert "🐛 fix disableImageOptimization usage across all images in theme"
This reverts commit 9cab78a325
.
|
@ -94,6 +94,7 @@ defaultBackgroundImage = "/img/iceland.jpg"
|
||||||
showTableOfContents = true
|
showTableOfContents = true
|
||||||
cardView = false
|
cardView = false
|
||||||
|
|
||||||
|
|
||||||
[term]
|
[term]
|
||||||
showHero = true
|
showHero = true
|
||||||
heroStyle = "background" # valid options: basic, big, background, thumbAndBackground
|
heroStyle = "background" # valid options: basic, big, background, thumbAndBackground
|
||||||
|
|
Before Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 70 KiB |
Before Width: | Height: | Size: 94 KiB |
Before Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 43 KiB |
|
@ -1,4 +1,3 @@
|
||||||
{{ $disableImageOptimization := .Page.Site.Params.disableImageOptimization | default false }}
|
|
||||||
{{ with .Params.externalUrl }}
|
{{ with .Params.externalUrl }}
|
||||||
<a href="{{ . }}" target="_blank" rel="external" class="min-w-full">
|
<a href="{{ . }}" target="_blank" rel="external" class="min-w-full">
|
||||||
{{ else }}
|
{{ else }}
|
||||||
|
@ -14,15 +13,9 @@
|
||||||
{{- $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 -}}
|
||||||
{{- with $featured -}}
|
{{- with $featured -}}
|
||||||
{{ if $disableImageOptimization }}
|
|
||||||
{{ with . }}
|
|
||||||
<div class="w-full thumbnail_card nozoom" style="background-image:url({{ .RelPermalink }});"></div>
|
|
||||||
{{ end }}
|
|
||||||
{{ else }}
|
|
||||||
{{ with .Fill "600x600" }}
|
{{ with .Fill "600x600" }}
|
||||||
<div class="w-full thumbnail_card nozoom" style="background-image:url({{ .RelPermalink }});"></div>
|
<div class="w-full thumbnail_card nozoom" style="background-image:url({{ .RelPermalink }});"></div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- with $.Site.Params.images }}
|
{{- with $.Site.Params.images }}
|
||||||
<meta property="og:image" content="{{ index . 0 | absURL }}" />{{ end -}}
|
<meta property="og:image" content="{{ index . 0 | absURL }}" />{{ end -}}
|
||||||
|
|
|
@ -12,8 +12,6 @@
|
||||||
{{ $articleImageClasses = delimit (slice $articleImageClasses "thumbnailshadow md:mr-7") " " }}
|
{{ $articleImageClasses = delimit (slice $articleImageClasses "thumbnailshadow md:mr-7") " " }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ $disableImageOptimization := .Page.Site.Params.disableImageOptimization | default false }}
|
|
||||||
|
|
||||||
{{ $articleInnerClasses := "" }}
|
{{ $articleInnerClasses := "" }}
|
||||||
{{ if .Site.Params.list.showCards }}
|
{{ if .Site.Params.list.showCards }}
|
||||||
{{ $articleInnerClasses = delimit (slice $articleInnerClasses "p-4") " " }}
|
{{ $articleInnerClasses = delimit (slice $articleInnerClasses "p-4") " " }}
|
||||||
|
@ -34,15 +32,9 @@
|
||||||
{{- $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 -}}
|
||||||
{{- with $featured -}}
|
{{- with $featured -}}
|
||||||
{{ if $disableImageOptimization }}
|
|
||||||
{{ with . }}
|
|
||||||
<div class="{{ $articleImageClasses }}" style="background-image:url({{ .RelPermalink }});"></div>
|
|
||||||
{{ end }}
|
|
||||||
{{ else }}
|
|
||||||
{{ with .Fill "600x400" }}
|
{{ with .Fill "600x400" }}
|
||||||
<div class="{{ $articleImageClasses }}" style="background-image:url({{ .RelPermalink }});"></div>
|
<div class="{{ $articleImageClasses }}" style="background-image:url({{ .RelPermalink }});"></div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- with $.Site.Params.images }}
|
{{- with $.Site.Params.images }}
|
||||||
<meta property="og:image" content="{{ index . 0 | absURL }}" />{{ end -}}
|
<meta property="og:image" content="{{ index . 0 | absURL }}" />{{ end -}}
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
{{ $disableImageOptimization := .Page.Site.Params.disableImageOptimization | default false }}
|
|
||||||
|
|
||||||
{{- $images := .Resources.ByType "image" -}}
|
{{- $images := .Resources.ByType "image" -}}
|
||||||
{{- $featured := $images.GetMatch "*background*" -}}
|
{{- $featured := $images.GetMatch "*background*" -}}
|
||||||
{{- if not $featured }}{{ $featured = $images.GetMatch "*feature*" }}{{ end -}}
|
{{- if not $featured }}{{ $featured = $images.GetMatch "*feature*" }}{{ end -}}
|
||||||
|
@ -15,21 +13,12 @@
|
||||||
(and ($.Site.Params.list.layoutBackgroundHeaderSpace | default true) ($isParentList))
|
(and ($.Site.Params.list.layoutBackgroundHeaderSpace | default true) ($isParentList))
|
||||||
) }}
|
) }}
|
||||||
{{- with $featured -}}
|
{{- with $featured -}}
|
||||||
|
{{ with .Resize "1200x" }}
|
||||||
{{ if $shouldAddHeaderSpace | default true}}
|
{{ if $shouldAddHeaderSpace | default true}}
|
||||||
<div id="hero" class="h-[150px] md:h-[200px]"></div>
|
<div id="hero" class="h-[150px] md:h-[200px]"></div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ if $disableImageOptimization }}
|
<div class="fixed inset-x-0 top-0 h-[800px] single_hero_background nozoom"
|
||||||
{{ with . }}
|
|
||||||
<div class="fixed inset-x-0 top-0 h-[800px] single_hero_background nozoom"
|
|
||||||
style="background-image:url({{ .RelPermalink }});">
|
style="background-image:url({{ .RelPermalink }});">
|
||||||
{{ end }}
|
|
||||||
{{ else }}
|
|
||||||
{{ with .Resize "1200x" }}
|
|
||||||
<div class="fixed inset-x-0 top-0 h-[800px] single_hero_background nozoom"
|
|
||||||
style="background-image:url({{ .RelPermalink }});">
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
<div class="absolute inset-0 bg-gradient-to-t from-neutral dark:from-neutral-800 to-transparent mix-blend-normal">
|
<div class="absolute inset-0 bg-gradient-to-t from-neutral dark:from-neutral-800 to-transparent mix-blend-normal">
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
|
@ -46,4 +35,5 @@
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
|
@ -1,16 +1,8 @@
|
||||||
{{ $disableImageOptimization := .Page.Site.Params.disableImageOptimization | default false }}
|
|
||||||
|
|
||||||
{{- $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 -}}
|
||||||
{{- with $featured -}}
|
{{- 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" }}
|
{{ 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>
|
<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 }}
|
|
||||||
{{- end -}}
|
{{- end -}}
|
|
@ -1,16 +1,8 @@
|
||||||
{{ $disableImageOptimization := .Page.Site.Params.disableImageOptimization | default false }}
|
|
||||||
|
|
||||||
{{- $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 -}}
|
||||||
{{- with $featured -}}
|
{{- with $featured -}}
|
||||||
{{ if $disableImageOptimization }}
|
|
||||||
{{ with . }}
|
|
||||||
<img class="w-full rounded-lg single_hero_round nozoom" src="{{ .RelPermalink }}">
|
|
||||||
{{ end }}
|
|
||||||
{{ 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" src="{{ .RelPermalink }}">
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
|
||||||
{{- end -}}
|
{{- end -}}
|
|
@ -1,5 +1,3 @@
|
||||||
{{ $disableImageOptimization := .Page.Site.Params.disableImageOptimization | default false }}
|
|
||||||
|
|
||||||
{{- $images := .Resources.ByType "image" -}}
|
{{- $images := .Resources.ByType "image" -}}
|
||||||
{{- $background := $images.GetMatch "*background*" -}}
|
{{- $background := $images.GetMatch "*background*" -}}
|
||||||
{{- if not $background }}{{ with .Site.Params.defaultBackgroundImage }}{{ $background = resources.Get . }}{{ end }}{{ end -}}
|
{{- if not $background }}{{ with .Site.Params.defaultBackgroundImage }}{{ $background = resources.Get . }}{{ end }}{{ end -}}
|
||||||
|
@ -16,30 +14,12 @@
|
||||||
) }}
|
) }}
|
||||||
|
|
||||||
{{- with $featured -}}
|
{{- with $featured -}}
|
||||||
{{ if $disableImageOptimization }}
|
|
||||||
{{ with . }}
|
|
||||||
<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" }}
|
{{ with .Resize "1200x" }}
|
||||||
<div class="w-full rounded-md h-36 md:h-56 lg:h-72 single_hero_basic nozoom" style="background-image:url({{ .RelPermalink }});"></div>
|
<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 }}
|
||||||
{{ end }}
|
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{- with $background -}}
|
{{- with $background -}}
|
||||||
|
|
||||||
{{ if $disableImageOptimization }}
|
|
||||||
{{ with . }}
|
|
||||||
<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">
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
class="absolute inset-0 opacity-30 dark:opacity-60 bg-gradient-to-t from-neutral dark:from-neutral-800 to-neutral dark:to-neutral-800 mix-blend-normal">
|
|
||||||
</div>
|
|
||||||
</div>{{ end }}
|
|
||||||
{{ else }}
|
|
||||||
{{ with .Resize "1200x" }}
|
{{ with .Resize "1200x" }}
|
||||||
<div class="fixed inset-x-0 top-0 h-[800px] single_hero_background nozoom"
|
<div class="fixed inset-x-0 top-0 h-[800px] single_hero_background nozoom"
|
||||||
style="background-image:url({{ .RelPermalink }});">
|
style="background-image:url({{ .RelPermalink }});">
|
||||||
|
@ -48,9 +28,8 @@
|
||||||
<div
|
<div
|
||||||
class="absolute inset-0 opacity-30 dark:opacity-60 bg-gradient-to-t from-neutral dark:from-neutral-800 to-neutral dark:to-neutral-800 mix-blend-normal">
|
class="absolute inset-0 opacity-30 dark:opacity-60 bg-gradient-to-t from-neutral dark:from-neutral-800 to-neutral dark:to-neutral-800 mix-blend-normal">
|
||||||
</div>
|
</div>
|
||||||
</div>{{ end }}
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{ if $shouldBlur | default false }}
|
{{ if $shouldBlur | default false }}
|
||||||
|
|
|
@ -2,8 +2,6 @@
|
||||||
<div
|
<div
|
||||||
class="border border-neutral-200 dark:border-neutral-700 border-2 rounded overflow-hidden shadow-2xl relative backdrop-blur">
|
class="border border-neutral-200 dark:border-neutral-700 border-2 rounded overflow-hidden shadow-2xl relative backdrop-blur">
|
||||||
|
|
||||||
{{ $disableImageOptimization := .Page.Site.Params.disableImageOptimization | default false }}
|
|
||||||
|
|
||||||
{{- with site.Params.images -}}
|
{{- with site.Params.images -}}
|
||||||
{{- range first 6 . }}
|
{{- range first 6 . }}
|
||||||
<meta property="og:image" content="{{ . | absURL }}" />{{ end -}}
|
<meta property="og:image" content="{{ . | absURL }}" />{{ end -}}
|
||||||
|
@ -12,14 +10,8 @@
|
||||||
{{- $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 -}}
|
||||||
{{- with $featured -}}
|
{{- with $featured -}}
|
||||||
{{ if $disableImageOptimization }}
|
|
||||||
{{ with . }}
|
|
||||||
<div class="w-full thumbnail_card nozoom" style="background-image:url({{ .RelPermalink }});"></div>
|
|
||||||
{{ end }}
|
|
||||||
{{ else }}
|
|
||||||
{{ with .Fill "600x600" }}
|
{{ with .Fill "600x600" }}
|
||||||
<div class="w-full thumbnail_card nozoom" style="background-image:url({{ .RelPermalink }});"></div>
|
<div class="w-full thumbnail_card_term nozoom" style="background-image:url({{ .RelPermalink }});"></div>
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- with site.Params.images }}
|
{{- with site.Params.images }}
|
||||||
|
|