webpage/themes/hugo-book/layouts/shortcodes/columns.html
kekskurse 27e6a14105 init
2024-11-26 23:25:09 +01:00

9 lines
368 B
HTML

{{- $ratio := (split (.Get "ratio") ":") -}}
<div class="book-columns flex flex-wrap{{ with .Get "class" }} {{ . }}{{ end }}">
{{ range $index, $content := split .InnerDeindent "<--->" }}
{{- $grow := default 1 (index $ratio $index) -}}
<div class="flex-even markdown-inner" style="flex-grow: {{ $grow }};">
{{ $content | safeHTML }}
</div>
{{ end }}
</div>