Skip to content

Commit

Permalink
fix column size bug -- add decimal number to div operation (+7 squash…
Browse files Browse the repository at this point in the history
…ed commits) (kubernetes#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
  • Loading branch information
chenopis authored and k8s-ci-robot committed Jun 6, 2018
1 parent 12581a0 commit 4691ee4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion layouts/partials/docs/browse.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ <h3><a href="{{ .RelPermalink }}">{{ .Params.bigheader | default .Title }}</a></
<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 }}
Expand Down

0 comments on commit 4691ee4

Please sign in to comment.