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
pull/11405/head
Andrew Chen 2018-06-06 15:20:24 -07:00 committed by k8s-ci-robot
parent 12581a0428
commit 4691ee4ef7
1 changed files with 1 additions and 1 deletions

View File

@ -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 }}