From 4691ee4ef7fa9ccd91e0f573cba2efb058674f81 Mon Sep 17 00:00:00 2001 From: Andrew Chen Date: Wed, 6 Jun 2018 15:20:24 -0700 Subject: [PATCH] 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 --- layouts/partials/docs/browse.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/partials/docs/browse.html b/layouts/partials/docs/browse.html index 5e69206c19..8055493a08 100644 --- a/layouts/partials/docs/browse.html +++ b/layouts/partials/docs/browse.html @@ -21,7 +21,7 @@
{{ $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 }}