chore: fix img shortcode formatting (#564)
This commit is contained in:
parent
61913ac87e
commit
8c84a8d028
1 changed files with 3 additions and 4 deletions
|
@ -9,19 +9,19 @@
|
||||||
{{- $isSVG := (eq .MediaType.SubType "svg") }}
|
{{- $isSVG := (eq .MediaType.SubType "svg") }}
|
||||||
|
|
||||||
{{- $origin := .Permalink }}
|
{{- $origin := .Permalink }}
|
||||||
{{ if $isSVG }}
|
{{- if $isSVG }}
|
||||||
{{- $data.SetInMap "size" "profile" "180" }}
|
{{- $data.SetInMap "size" "profile" "180" }}
|
||||||
{{- $data.SetInMap "size" "tiny" "320" }}
|
{{- $data.SetInMap "size" "tiny" "320" }}
|
||||||
{{- $data.SetInMap "size" "small" "600" }}
|
{{- $data.SetInMap "size" "small" "600" }}
|
||||||
{{- $data.SetInMap "size" "medium" "1200" }}
|
{{- $data.SetInMap "size" "medium" "1200" }}
|
||||||
{{- $data.SetInMap "size" "large" "1800" }}
|
{{- $data.SetInMap "size" "large" "1800" }}
|
||||||
{{ else }}
|
{{- else }}
|
||||||
{{- $data.SetInMap "size" "profile" (.Fill "180x180 Center").Permalink }}
|
{{- $data.SetInMap "size" "profile" (.Fill "180x180 Center").Permalink }}
|
||||||
{{- $data.SetInMap "size" "tiny" (.Resize "320x").Permalink }}
|
{{- $data.SetInMap "size" "tiny" (.Resize "320x").Permalink }}
|
||||||
{{- $data.SetInMap "size" "small" (.Resize "600x").Permalink }}
|
{{- $data.SetInMap "size" "small" (.Resize "600x").Permalink }}
|
||||||
{{- $data.SetInMap "size" "medium" (.Resize "1200x").Permalink }}
|
{{- $data.SetInMap "size" "medium" (.Resize "1200x").Permalink }}
|
||||||
{{- $data.SetInMap "size" "large" (.Resize "1800x").Permalink }}
|
{{- $data.SetInMap "size" "large" (.Resize "1800x").Permalink }}
|
||||||
{{ end }}
|
{{- end }}
|
||||||
|
|
||||||
|
|
||||||
<div class="flex justify-center">
|
<div class="flex justify-center">
|
||||||
|
@ -39,7 +39,6 @@
|
||||||
{{- else }}
|
{{- else }}
|
||||||
srcset="{{ $size.small }} 600w, {{ $size.medium }} 1200w" sizes="100vw"
|
srcset="{{ $size.small }} 600w, {{ $size.medium }} 1200w" sizes="100vw"
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
<img
|
<img
|
||||||
|
|
Loading…
Reference in a new issue