Files
hinode/layouts/shortcodes/button-group.html
2023-08-27 07:18:06 +02:00

15 lines
555 B
HTML

<!--
Displays a group of buttons. Add inner <button> elements for each button. The shortcode supports the following arguments:
"aria-label" Optional assistive label for the button group.
-->
{{ $inner := .Scratch.Get "inner" }}
{{ $input := trim .Inner " \r\n" }}
{{ if $input }}
{{ $input = replace $input "\n" "\n " }}
{{ warnf "Unexpected inner content: %s\r\n %s" .Position $input }}
{{ end }}
<div class="btn-group" role="group" {{ with .Get "aria-label" }}aria-label="{{ . }}"{{ end }}>
{{ $inner | safeHTML }}
</div>