#791, bring back missing ID for columns to apply ratio
This commit is contained in:
@@ -5,6 +5,7 @@
|
|||||||
"attributes" (cond .IsNamedParams .Params dict)
|
"attributes" (cond .IsNamedParams .Params dict)
|
||||||
"merge" (dict
|
"merge" (dict
|
||||||
"class" (slice "book-columns" "flex" "flex-wrap")
|
"class" (slice "book-columns" "flex" "flex-wrap")
|
||||||
|
"id" (printf "book-columns-%d" .Ordinal)
|
||||||
)
|
)
|
||||||
) -}}
|
) -}}
|
||||||
<div {{ partial "docs/html-attrs" $attributes | safeHTMLAttr }}>
|
<div {{ partial "docs/html-attrs" $attributes | safeHTMLAttr }}>
|
||||||
@@ -16,15 +17,19 @@
|
|||||||
{{- end -}}
|
{{- end -}}
|
||||||
</div>
|
</div>
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- if .Get "ratio" -}}<style>{{- range $index, $grow := $ratio -}}
|
{{- if .Get "ratio" -}}
|
||||||
.book-columns-{{ $.Ordinal }}>ul>li:nth-child({{ $index | add 1 }}){
|
<style>{{- range $index, $grow := $ratio -}}
|
||||||
flex-grow: {{ default 1 $grow }};
|
#book-columns-{{ $.Ordinal }}>ul>li:nth-child({{ $index | add 1 }}) {
|
||||||
}
|
flex-grow: {{ default 1 $grow }};
|
||||||
{{- end -}}</style>{{- end -}}
|
}
|
||||||
|
{{ end -}}
|
||||||
|
</style>
|
||||||
|
{{- end -}}
|
||||||
{{- $attributes := partial "docs/text/mapper" (dict
|
{{- $attributes := partial "docs/text/mapper" (dict
|
||||||
"attributes" (cond .IsNamedParams .Params dict)
|
"attributes" (cond .IsNamedParams .Params dict)
|
||||||
"merge" (dict
|
"merge" (dict
|
||||||
"class" (slice "book-columns")
|
"class" (slice "book-columns")
|
||||||
|
"id" (printf "book-columns-%d" .Ordinal)
|
||||||
)
|
)
|
||||||
) -}}
|
) -}}
|
||||||
<div {{ partial "docs/html-attrs" $attributes | safeHTMLAttr }}>
|
<div {{ partial "docs/html-attrs" $attributes | safeHTMLAttr }}>
|
||||||
|
|||||||
Reference in New Issue
Block a user