1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-07-17 11:55:31 -04:00

add shortcode for "retina" images

This commit is contained in:
2019-08-29 13:00:17 -04:00
parent d655c3376d
commit 6fab1ead7a
3 changed files with 24 additions and 10 deletions

View File

@@ -0,0 +1,14 @@
{{ if .Get "caption"}}
<figure>
<picture>
{{ end }}
<img
src="{{ .Get "src" }}"
alt="{{ .Get "alt" }}"
{{ if .Get "width"}} width="{{ .Get "width" }}px"{{ end }}
{{ if .Get "caption"}} title="{{ .Get "caption"}}"{{ end }}>
{{ if .Get "caption"}}
</picture>
<figcaption>{{ .Get "caption" }}</figcaption>
</figure>
{{ end }}