diff --git a/exampleSite/config/_default/params.toml b/exampleSite/config/_default/params.toml index 92dea0f3..efe3a93d 100644 --- a/exampleSite/config/_default/params.toml +++ b/exampleSite/config/_default/params.toml @@ -94,6 +94,7 @@ defaultBackgroundImage = "/img/iceland.jpg" showTableOfContents = true cardView = false + [term] showHero = true heroStyle = "background" # valid options: basic, big, background, thumbAndBackground diff --git a/exampleSite/resources/_gen/images/docs/shortcodes/abstract_hu684c0a32e4d0f58583128be29b348bb9_40710_1024x0_resize_q75_box.jpg b/exampleSite/resources/_gen/images/docs/shortcodes/abstract_hu684c0a32e4d0f58583128be29b348bb9_40710_1024x0_resize_q75_box.jpg deleted file mode 100644 index e633fd25..00000000 Binary files a/exampleSite/resources/_gen/images/docs/shortcodes/abstract_hu684c0a32e4d0f58583128be29b348bb9_40710_1024x0_resize_q75_box.jpg and /dev/null differ diff --git a/exampleSite/resources/_gen/images/docs/shortcodes/abstract_hu684c0a32e4d0f58583128be29b348bb9_40710_1320x0_resize_q75_box.jpg b/exampleSite/resources/_gen/images/docs/shortcodes/abstract_hu684c0a32e4d0f58583128be29b348bb9_40710_1320x0_resize_q75_box.jpg deleted file mode 100644 index c30f6695..00000000 Binary files a/exampleSite/resources/_gen/images/docs/shortcodes/abstract_hu684c0a32e4d0f58583128be29b348bb9_40710_1320x0_resize_q75_box.jpg and /dev/null differ diff --git a/exampleSite/resources/_gen/images/docs/shortcodes/abstract_hu684c0a32e4d0f58583128be29b348bb9_40710_330x0_resize_q75_box.jpg b/exampleSite/resources/_gen/images/docs/shortcodes/abstract_hu684c0a32e4d0f58583128be29b348bb9_40710_330x0_resize_q75_box.jpg deleted file mode 100644 index 088bfc8c..00000000 Binary files a/exampleSite/resources/_gen/images/docs/shortcodes/abstract_hu684c0a32e4d0f58583128be29b348bb9_40710_330x0_resize_q75_box.jpg and /dev/null differ diff --git a/exampleSite/resources/_gen/images/docs/shortcodes/abstract_hu684c0a32e4d0f58583128be29b348bb9_40710_660x0_resize_q75_box.jpg b/exampleSite/resources/_gen/images/docs/shortcodes/abstract_hu684c0a32e4d0f58583128be29b348bb9_40710_660x0_resize_q75_box.jpg deleted file mode 100644 index 3fe68641..00000000 Binary files a/exampleSite/resources/_gen/images/docs/shortcodes/abstract_hu684c0a32e4d0f58583128be29b348bb9_40710_660x0_resize_q75_box.jpg and /dev/null differ diff --git a/exampleSite/resources/_gen/images/docs/welcome/image-resizing_hudc3a1812e7aa4d065174f956d05e334c_253342_1024x0_resize_box_3.png b/exampleSite/resources/_gen/images/docs/welcome/image-resizing_hudc3a1812e7aa4d065174f956d05e334c_253342_1024x0_resize_box_3.png deleted file mode 100644 index 151fc4ea..00000000 Binary files a/exampleSite/resources/_gen/images/docs/welcome/image-resizing_hudc3a1812e7aa4d065174f956d05e334c_253342_1024x0_resize_box_3.png and /dev/null differ diff --git a/exampleSite/resources/_gen/images/docs/welcome/image-resizing_hudc3a1812e7aa4d065174f956d05e334c_253342_1320x0_resize_box_3.png b/exampleSite/resources/_gen/images/docs/welcome/image-resizing_hudc3a1812e7aa4d065174f956d05e334c_253342_1320x0_resize_box_3.png deleted file mode 100644 index 291a8f73..00000000 Binary files a/exampleSite/resources/_gen/images/docs/welcome/image-resizing_hudc3a1812e7aa4d065174f956d05e334c_253342_1320x0_resize_box_3.png and /dev/null differ diff --git a/exampleSite/resources/_gen/images/docs/welcome/image-resizing_hudc3a1812e7aa4d065174f956d05e334c_253342_330x0_resize_box_3.png b/exampleSite/resources/_gen/images/docs/welcome/image-resizing_hudc3a1812e7aa4d065174f956d05e334c_253342_330x0_resize_box_3.png deleted file mode 100644 index 54dd49a3..00000000 Binary files a/exampleSite/resources/_gen/images/docs/welcome/image-resizing_hudc3a1812e7aa4d065174f956d05e334c_253342_330x0_resize_box_3.png and /dev/null differ diff --git a/exampleSite/resources/_gen/images/docs/welcome/image-resizing_hudc3a1812e7aa4d065174f956d05e334c_253342_660x0_resize_box_3.png b/exampleSite/resources/_gen/images/docs/welcome/image-resizing_hudc3a1812e7aa4d065174f956d05e334c_253342_660x0_resize_box_3.png deleted file mode 100644 index ed080b1d..00000000 Binary files a/exampleSite/resources/_gen/images/docs/welcome/image-resizing_hudc3a1812e7aa4d065174f956d05e334c_253342_660x0_resize_box_3.png and /dev/null differ diff --git a/layouts/partials/article-link/card.html b/layouts/partials/article-link/card.html index 5e732749..cd87691c 100644 --- a/layouts/partials/article-link/card.html +++ b/layouts/partials/article-link/card.html @@ -1,4 +1,3 @@ -{{ $disableImageOptimization := .Page.Site.Params.disableImageOptimization | default false }} {{ with .Params.externalUrl }} {{ else }} @@ -14,14 +13,8 @@ {{- $featured := $images.GetMatch "*feature*" -}} {{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}} {{- with $featured -}} - {{ if $disableImageOptimization }} - {{ with . }} -
- {{ end }} - {{ else }} - {{ with .Fill "600x600" }} -
- {{ end }} + {{ with .Fill "600x600" }} +
{{ end }} {{- else -}} {{- with $.Site.Params.images }} diff --git a/layouts/partials/article-link/simple.html b/layouts/partials/article-link/simple.html index ff63cd96..5c7261d4 100644 --- a/layouts/partials/article-link/simple.html +++ b/layouts/partials/article-link/simple.html @@ -12,8 +12,6 @@ {{ $articleImageClasses = delimit (slice $articleImageClasses "thumbnailshadow md:mr-7") " " }} {{ end }} -{{ $disableImageOptimization := .Page.Site.Params.disableImageOptimization | default false }} - {{ $articleInnerClasses := "" }} {{ if .Site.Params.list.showCards }} {{ $articleInnerClasses = delimit (slice $articleInnerClasses "p-4") " " }} @@ -34,15 +32,9 @@ {{- $featured := $images.GetMatch "*feature*" -}} {{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}} {{- with $featured -}} - {{ if $disableImageOptimization }} - {{ with . }} -
- {{ end }} - {{ else }} - {{ with .Fill "600x400" }} -
- {{ end }} - {{ end }} + {{ with .Fill "600x400" }} +
+ {{ end }} {{- else -}} {{- with $.Site.Params.images }} {{ end -}} diff --git a/layouts/partials/hero/background.html b/layouts/partials/hero/background.html index 83622da4..28c10c00 100644 --- a/layouts/partials/hero/background.html +++ b/layouts/partials/hero/background.html @@ -1,5 +1,3 @@ -{{ $disableImageOptimization := .Page.Site.Params.disableImageOptimization | default false }} - {{- $images := .Resources.ByType "image" -}} {{- $featured := $images.GetMatch "*background*" -}} {{- if not $featured }}{{ $featured = $images.GetMatch "*feature*" }}{{ end -}} @@ -15,21 +13,12 @@ (and ($.Site.Params.list.layoutBackgroundHeaderSpace | default true) ($isParentList)) ) }} {{- with $featured -}} +{{ with .Resize "1200x" }} {{ if $shouldAddHeaderSpace | default true}}
{{ end }} -{{ if $disableImageOptimization }} - {{ with . }} -
- {{ end }} -{{ else }} - {{ with .Resize "1200x" }} -
- {{ end }} -{{ end }} -
{{ end }} +{{ end }} {{- end -}} diff --git a/layouts/partials/hero/basic.html b/layouts/partials/hero/basic.html index 11377928..7928480b 100644 --- a/layouts/partials/hero/basic.html +++ b/layouts/partials/hero/basic.html @@ -1,16 +1,8 @@ -{{ $disableImageOptimization := .Page.Site.Params.disableImageOptimization | default false }} - {{- $images := .Resources.ByType "image" -}} {{- $featured := $images.GetMatch "*feature*" -}} {{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}} {{- with $featured -}} - {{ if $disableImageOptimization }} - {{ with . }} -
- {{ end }} - {{ else }} - {{ with .Resize "1200x" }} -
- {{ end }} + {{ with .Resize "1200x" }} +
{{ end }} {{- end -}} \ No newline at end of file diff --git a/layouts/partials/hero/big.html b/layouts/partials/hero/big.html index f6287df4..9bf51278 100644 --- a/layouts/partials/hero/big.html +++ b/layouts/partials/hero/big.html @@ -1,16 +1,8 @@ -{{ $disableImageOptimization := .Page.Site.Params.disableImageOptimization | default false }} - {{- $images := .Resources.ByType "image" -}} {{- $featured := $images.GetMatch "*feature*" -}} {{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}} {{- with $featured -}} - {{ if $disableImageOptimization }} - {{ with . }} + {{ with .Resize "1200x" }} - {{ end }} - {{ else }} - {{ with .Resize "1200x" }} - - {{ end }} {{ end }} {{- end -}} \ No newline at end of file diff --git a/layouts/partials/hero/thumbAndBackground.html b/layouts/partials/hero/thumbAndBackground.html index 1e4114ca..b0b4d997 100644 --- a/layouts/partials/hero/thumbAndBackground.html +++ b/layouts/partials/hero/thumbAndBackground.html @@ -1,5 +1,3 @@ -{{ $disableImageOptimization := .Page.Site.Params.disableImageOptimization | default false }} - {{- $images := .Resources.ByType "image" -}} {{- $background := $images.GetMatch "*background*" -}} {{- if not $background }}{{ with .Site.Params.defaultBackgroundImage }}{{ $background = resources.Get . }}{{ end }}{{ end -}} @@ -16,30 +14,12 @@ ) }} {{- with $featured -}} -{{ if $disableImageOptimization }} -{{ with . }} -
-{{ end }} -{{ else }} {{ with .Resize "1200x" }}
{{ end }} -{{ end }} {{- end -}} {{- with $background -}} - -{{ if $disableImageOptimization }} -{{ with . }} -
-
-
-
-
-
{{ end }} -{{ else }} {{ with .Resize "1200x" }}
@@ -48,9 +28,8 @@
-
{{ end }} +
{{ end }} - {{- end -}} {{ if $shouldBlur | default false }} diff --git a/layouts/partials/term-link/card.html b/layouts/partials/term-link/card.html index 9b9edee9..343fb8f9 100644 --- a/layouts/partials/term-link/card.html +++ b/layouts/partials/term-link/card.html @@ -2,8 +2,6 @@
- {{ $disableImageOptimization := .Page.Site.Params.disableImageOptimization | default false }} - {{- with site.Params.images -}} {{- range first 6 . }} {{ end -}} @@ -12,15 +10,9 @@ {{- $featured := $images.GetMatch "*feature*" -}} {{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}} {{- with $featured -}} - {{ if $disableImageOptimization }} - {{ with . }} -
- {{ end }} - {{ else }} - {{ with .Fill "600x600" }} -
- {{ end }} - {{ end }} + {{ with .Fill "600x600" }} +
+ {{ end }} {{- else -}} {{- with site.Params.images }} {{ end -}}