diff options
| author | 2026-02-14 13:06:23 +0300 | |
|---|---|---|
| committer | 2026-02-14 13:06:23 +0300 | |
| commit | d8b5023d7269fd67374cf65a1372e374b41964e0 (patch) | |
| tree | 661c2901040fa3200e379d9ecfdd5ee941a867d6 /themes/neonxp/layouts/shortcodes/img.html | |
| parent | Пост про stplr (diff) | |
| download | blog-d8b5023d7269fd67374cf65a1372e374b41964e0.tar.gz blog-d8b5023d7269fd67374cf65a1372e374b41964e0.tar.bz2 blog-d8b5023d7269fd67374cf65a1372e374b41964e0.tar.xz blog-d8b5023d7269fd67374cf65a1372e374b41964e0.zip | |
New post, didaceted theme
Diffstat (limited to 'themes/neonxp/layouts/shortcodes/img.html')
| -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 |
