summaryrefslogtreecommitdiff
path: root/themes/neonxp/layouts/shortcodes/img.html
diff options
context:
space:
mode:
author2026-02-14 13:06:23 +0300
committer2026-02-14 13:06:23 +0300
commitd8b5023d7269fd67374cf65a1372e374b41964e0 (patch)
tree661c2901040fa3200e379d9ecfdd5ee941a867d6 /themes/neonxp/layouts/shortcodes/img.html
parentПост про stplr (diff)
downloadblog-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.html21
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