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:
14
layouts/shortcodes/image.html
Normal file
14
layouts/shortcodes/image.html
Normal 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 }}
|
Reference in New Issue
Block a user