diff --git a/src/views/diary.tpl b/src/views/diary.tpl index 1e4f7c1..b76ca4b 100644 --- a/src/views/diary.tpl +++ b/src/views/diary.tpl @@ -28,6 +28,13 @@ < % end + % # fill out number cluster to the left when page is high + % if page >= max_pages - cluster: + % for j in range(page - cluster): + {{page + j + cluster + 1}} + % end + % end + % # form cluster of number links around page % for i in range(max(0,page - cluster), min(max_pages + 1,page + cluster + 1)): % # bold current page number @@ -40,9 +47,9 @@ % end % # fill out number cluster to the right when page is low - % if page <= 2 and max_pages > page + 3: + % if page <= cluster - 1 and max_pages > page + cluster: % for j in range(cluster - page): - {{page + j + cluster + 1}} + {{page + j + cluster + 1}} % end % end