mirror of
https://github.com/TrezOne/congo-hindi-gujarati.git
synced 2026-07-20 09:51:37 -04:00
Fix render-image.html for SVG
SVG images do not support resizing, so `srcset/src` attributes should be simplified
This commit is contained in:
committed by
GitHub
parent
574275d650
commit
5e8d30c305
@@ -15,16 +15,24 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
{{ with $resource }}
|
{{ with $resource }}
|
||||||
<figure>
|
<figure>
|
||||||
<img
|
{{ if eq .MediaType.SubType "svg" }}
|
||||||
class="my-0 rounded-md"
|
<img
|
||||||
srcset="
|
class="my-0 rounded-md"
|
||||||
{{ (.Resize "330x").RelPermalink }} 330w,
|
src="{{ .RelPermalink }}"
|
||||||
{{ (.Resize "660x").RelPermalink }} 660w,
|
alt="{{ $altText }}"
|
||||||
{{ (.Resize "1024x").RelPermalink }} 1024w,
|
/>
|
||||||
{{ (.Resize "1320x").RelPermalink }} 2x"
|
{{ else }}
|
||||||
src="{{ (.Resize "660x").RelPermalink }}"
|
<img
|
||||||
alt="{{ $altText }}"
|
class="my-0 rounded-md"
|
||||||
/>
|
srcset="
|
||||||
|
{{ (.Resize "330x").RelPermalink }} 330w,
|
||||||
|
{{ (.Resize "660x").RelPermalink }} 660w,
|
||||||
|
{{ (.Resize "1024x").RelPermalink }} 1024w,
|
||||||
|
{{ (.Resize "1320x").RelPermalink }} 2x"
|
||||||
|
src="{{ (.Resize "660x").RelPermalink }}"
|
||||||
|
alt="{{ $altText }}"
|
||||||
|
/>
|
||||||
|
{{ end }}
|
||||||
{{ with $caption }}<figcaption>{{ . | markdownify }}</figcaption>{{ end }}
|
{{ with $caption }}<figcaption>{{ . | markdownify }}</figcaption>{{ end }}
|
||||||
</figure>
|
</figure>
|
||||||
{{ else }}
|
{{ else }}
|
||||||
|
|||||||
Reference in New Issue
Block a user