Introduce 'steps' shortcode

This commit is contained in:
Alex Shpak
2025-08-06 15:16:47 +02:00
parent 2c8c093a30
commit 9b6c1692fc
4 changed files with 94 additions and 13 deletions
+6 -5
View File
@@ -10,12 +10,13 @@
{{ end }}
</div>
{{ else }}
{{- if .Get "ratio" }}<style>{{ range $index, $grow := $ratio }}
.book-columns-{{ $.Ordinal }}>ul>li:nth-child({{ $index | add 1 }}){
flex-grow: {{ default 1 $grow }};
}
{{ end }}</style>{{ end -}}
<div class="book-columns book-columns-{{ .Ordinal }} {{ with .Get "class" }}{{ . }}{{ end }}">
<style>{{- range $index, $grow := $ratio -}}
.book-columns-{{ $.Ordinal }}>ul>li:nth-child({{ $index | add 1 }}){
flex-grow: {{ $grow }};
}
{{ end -}}</style>
{{ .Inner | safeHTML }}
</div>
{{ end -}}