fix column size bug -- add decimal number to div operation (+7 squashed commits) (#8631)
Squashed commits: [b645d8e] remove debug [47ba8b9] test new column size [2f12ba5] use float [b16f50b] test division [789e289] test ceil [012f6ad] debug offset [514b529] debug column size
This commit is contained in:
committed by
k8s-ci-robot
parent
12581a0428
commit
4691ee4ef7
@@ -21,7 +21,7 @@
|
|||||||
<div class="pages">
|
<div class="pages">
|
||||||
{{ $num_pages := len $pages }}
|
{{ $num_pages := len $pages }}
|
||||||
{{ if gt $num_pages 0 }}
|
{{ if gt $num_pages 0 }}
|
||||||
{{ $column_size := (div $num_pages 3) | math.Ceil | int | default 1 }}
|
{{ $column_size := (div $num_pages 3.0) | math.Ceil | int | default 1 }}
|
||||||
{{ range $i, $e := $pages.ByWeight }}
|
{{ range $i, $e := $pages.ByWeight }}
|
||||||
{{ $offset := mod $i $column_size | add 1 }}
|
{{ $offset := mod $i $column_size | add 1 }}
|
||||||
{{ if eq $offset 1 }}
|
{{ if eq $offset 1 }}
|
||||||
|
|||||||
Reference in New Issue
Block a user