summaryrefslogtreecommitdiff
path: root/layouts/_markup/render-image.html
diff options
context:
space:
mode:
authoreltrac <hi@eltr.ac>2026-04-07 14:53:17 +0800
committereltrac <hi@eltr.ac>2026-04-07 14:53:17 +0800
commit10431bd8f5ff71690ae4e5444e8d7894fd401ae5 (patch)
tree62b7fd1b6c1f68d2804f380eb522bcebeb2c8d9f /layouts/_markup/render-image.html
parent3e0edacc4a0cafa53ede57ebb6f0378c93f3123b (diff)
chore: move templates out of site repo
Diffstat (limited to 'layouts/_markup/render-image.html')
-rw-r--r--layouts/_markup/render-image.html25
1 files changed, 0 insertions, 25 deletions
diff --git a/layouts/_markup/render-image.html b/layouts/_markup/render-image.html
deleted file mode 100644
index 49c9fcee..00000000
--- a/layouts/_markup/render-image.html
+++ /dev/null
@@ -1,25 +0,0 @@
-{{- $src := .Destination -}}
-{{- $alt := .Text | default "" -}}
-{{- $caption := .Title | default "" -}}
-{{- $class := .Attributes.class | default "" -}}
-
-{{- if and (not (strings.HasPrefix $src "https://")) (not (strings.HasPrefix $src "http://")) -}}
- {{- if not (strings.HasPrefix $src "/") -}}
- {{- $src = printf "%s/%s%s" site.Params.assetBaseUrl .Page.File.Dir $src -}}
- {{- else -}}
- {{- $src = printf "%s%s" site.Params.assetBaseUrl $src -}}
- {{- end -}}
-{{- end -}}
-
-<figure>
- <img
- class="lazy {{ $class }}" loading="lazy"
- src="{{ $src }}" alt="{{ $alt }}"
- data-libra
- />
- {{- if $caption }}
- <figcaption>
- <h4>{{ $caption | markdownify }}</h4>
- </figcaption>
- {{- end }}
-</figure>