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 sizepull/11405/head
parent
12581a0428
commit
4691ee4ef7
|
@ -21,7 +21,7 @@
|
|||
<div class="pages">
|
||||
{{ $num_pages := len $pages }}
|
||||
{{ 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 }}
|
||||
{{ $offset := mod $i $column_size | add 1 }}
|
||||
{{ if eq $offset 1 }}
|
||||
|
|
Loading…
Reference in New Issue