Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/chipzoller/hugo-clarity.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Boothe <git@rootwork.org>2022-05-17 03:10:29 +0300
committerIvan Boothe <git@rootwork.org>2022-05-17 03:10:29 +0300
commit7b8a2ac27c66be4852c2e5d7dd1d7d145f90007d (patch)
tree806089ed64ab2e62c3d7930d21a0954c405fb785
parent9c6e83697a84f3075be51057e2d1468709f650fd (diff)
MainType -> MediaType
Signed-off-by: Ivan Boothe <git@rootwork.org>
-rw-r--r--layouts/_default/_markup/render-image.html2
-rw-r--r--layouts/partials/image.html2
2 files changed, 2 insertions, 2 deletions
diff --git a/layouts/_default/_markup/render-image.html b/layouts/_default/_markup/render-image.html
index 03c1802..bc18a77 100644
--- a/layouts/_default/_markup/render-image.html
+++ b/layouts/_default/_markup/render-image.html
@@ -18,7 +18,7 @@
{{- if strings.HasPrefix $file "http" -}}
{{- $scratch.Add "classes" " image_external" -}}
{{- $image = resources.GetRemote $file -}}
- {{- with $image.MediaType.MainType }}
+ {{- with $image.MediaType }}
{{- if eq $image.MediaType.MainType "image" -}}
{{- if eq $image.MediaType.SubType "svg" -}}
{{- $image = "" -}}
diff --git a/layouts/partials/image.html b/layouts/partials/image.html
index fbd8003..3b10854 100644
--- a/layouts/partials/image.html
+++ b/layouts/partials/image.html
@@ -28,7 +28,7 @@
{{- if strings.HasPrefix $file "http" -}}
{{- $scratch.Add "classes" " image_external" -}}
{{- $image = resources.GetRemote $file -}}
- {{- with $image.MediaType.MainType }}
+ {{- with $image.MediaType }}
{{- if eq $image.MediaType.MainType "image" -}}
{{- if eq $image.MediaType.SubType "svg" -}}
{{- $image = "" -}}