Implement page_links(current, total, window=1) returning the list of items to show in a pagination bar: page numbers (ints) and "…" for gaps.
Always show the first and last page, and pages within window of the current page. Replace any gap of two or more hidden pages with "…"; if only one page would be hidden, show it instead.