add shortcode on-off [on/off]

This commit is contained in:
6543 2019-07-13 22:34:21 +02:00
parent 8bec21a29b
commit ae4f84f944
Signed by: 6543
GPG Key ID: A1CA74D27FD13271

View File

@ -0,0 +1,8 @@
{{ $mode := .Get 0 }}
{{ if eq $mode "on" }}
<img src="{{ .Page.Site.BaseURL }}img/on-off/switch-on-icon_smal.png" alt="On">
{{ else if eq $mode "off"}}
<img src="{{ .Page.Site.BaseURL }}img/on-off/switch-off-icon_smal.png" alt="Off">
{{ else }}
???
{{end}}