hugo-theme-terminal/layouts/shortcodes/image.html
Cézar Augusto 5aac274434
Update the image shortcode
- Add both width and height attributes
2023-03-06 20:21:08 -03:00

4 lines
380 B
HTML

{{ if .Get "src" }}
<img src="{{ .Get "src" | safeURL }}" {{ with .Get "alt" }} alt="{{ . | plainify }}" {{ end }} class="{{ with .Get "position"}}{{ . }}{{ else -}} left {{- end }}" {{ with .Get "style" }} style="{{ . | safeCSS }}" {{ end }} {{ with .Get "width" }} width="{{ . | plainify }}" {{ end }} {{ with .Get "height" }} height="{{ . | plainify }}" {{ end }} />
{{ end }}