webpage/themes/hugo-book/layouts/shortcodes/columns.html

10 lines
368 B
HTML
Raw Permalink Normal View History

2024-11-26 22:25:09 +00:00
{{- $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>