diff --git a/layouts/shortcodes/on-off.html b/layouts/shortcodes/on-off.html index e2d2308..0f74280 100644 --- a/layouts/shortcodes/on-off.html +++ b/layouts/shortcodes/on-off.html @@ -1,8 +1,26 @@ -{{ $mode := .Get 0 }} +{{ $mode := .Get 0 }}{{ $opt := .Get 1 }} + +{{ $img_on := ( printf "%s%s" $.Page.Site.BaseURL "img/on-off/switch-on-icon_smal.png" )}} +{{ $img_off := ( printf "%s%s" $.Page.Site.BaseURL "img/on-off/switch-off-icon_smal.png" )}} + {{ if eq $mode "on" }} - On + On {{ else if eq $mode "off"}} - Off + Off +{{ else if eq $mode "imgping" }} + {{ with $opt }} + {{ $id := md5 $opt }} + Off + + {{ else }} + Ned URL to image + {{ end }} {{ else }} ??? -{{end}} +{{ end }}