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