diff options
Diffstat (limited to '')
| -rw-r--r-- | themes/neonxp/layouts/shortcodes/img.html | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/themes/neonxp/layouts/shortcodes/img.html b/themes/neonxp/layouts/shortcodes/img.html deleted file mode 100644 index 994e30f..0000000 --- a/themes/neonxp/layouts/shortcodes/img.html +++ /dev/null @@ -1,21 +0,0 @@ -{{- $alt := .Get "alt" -}} -{{- $res := .Page.Resources.Get (.Get "src") -}} - -{{- $ws := slice 480 800 -}} -{{- $srcset := slice -}} -{{- range $ws -}} -{{- if (le . $res.Width) -}} -{{- $w := printf "%dx" . -}} -{{- $url := ($res.Resize $w).RelPermalink | safeURL -}} -{{- $fmt := printf "%s %dw" $url . -}} -{{- $srcset = $srcset | append $fmt -}} -{{- end -}} -{{- end -}} - -{{- $set := delimit $srcset "," -}} - -<figure> - <img srcset="{{ $set }}" sizes="(max-width: 480px) 480px, 100vw" src="{{ $res.RelPermalink }}" alt="{{ $alt }}" - height="auto" /> - <figcaption>{{ $alt }}</figcaption> -</figure>
\ No newline at end of file |
