diff --git a/exampleSite/content/posts/tests/image-tests/index.md b/exampleSite/content/posts/tests/image-tests/index.md new file mode 100644 index 000000000..2115c85f0 --- /dev/null +++ b/exampleSite/content/posts/tests/image-tests/index.md @@ -0,0 +1,12 @@ +--- +title: "Image Tests" +date: 2024-06-06T12:41:49+01:00 +lastmod: 2024-06-06T12:41:49+01:00 +draft: true +hiddenFromHomePage: true +hiddenFromSearch: true +--- + +- Test 1: ![](./pin_black.png) +- Test 2: ![](./pin_red.png) +- Test 3: ![](./pin_white.png) diff --git a/exampleSite/content/posts/tests/image-tests/pin_black.png b/exampleSite/content/posts/tests/image-tests/pin_black.png new file mode 100644 index 000000000..16b625c2e Binary files /dev/null and b/exampleSite/content/posts/tests/image-tests/pin_black.png differ diff --git a/exampleSite/content/posts/tests/image-tests/pin_red.png b/exampleSite/content/posts/tests/image-tests/pin_red.png new file mode 100644 index 000000000..9dbdedf0f Binary files /dev/null and b/exampleSite/content/posts/tests/image-tests/pin_red.png differ diff --git a/exampleSite/content/posts/tests/image-tests/pin_white.png b/exampleSite/content/posts/tests/image-tests/pin_white.png new file mode 100644 index 000000000..37142be99 Binary files /dev/null and b/exampleSite/content/posts/tests/image-tests/pin_white.png differ diff --git a/layouts/_default/_markup/render-image.html b/layouts/_default/_markup/render-image.html index 304aab1a3..8f6ec8c30 100644 --- a/layouts/_default/_markup/render-image.html +++ b/layouts/_default/_markup/render-image.html @@ -4,11 +4,15 @@ (dict "Process" "resize 1200x webp q75" "descriptor" "1200w") (dict "Process" "resize 1600x webp q75" "descriptor" "1600w") -}} + +{{- if .Title -}}
{{- dict "Src" .Destination "Title" .Text "Caption" .Title "Linked" $lightgallery "Loading" "lazy" "Sizes" "auto" "Resources" .Page.Resources "OptimConfig" $optim | partial "plugin/image.html" -}} - {{- if .Title -}} -
- {{- .Title | safeHTML -}} -
- {{- end -}} +
+ {{- .Title | safeHTML -}} +
+{{- else -}} + {{- dict "Src" .Destination "Class" "tw-inline" "Title" .Text "Caption" .Title "Loading" "lazy" "Sizes" "auto" "Resources" .Page.Resources "OptimConfig" $optim | partial "plugin/image.html" -}} +{{- end -}} +