summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordaniel-Jones <daniel@danieljon.es>2017-11-18 15:10:43 +1100
committerdaniel-Jones <daniel@danieljon.es>2017-11-18 15:10:43 +1100
commita097c125e1461095dd29be73f21662046b86a07e (patch)
tree1067c6e0fffbd6c8e97dfd4254f28ac26b875098
parent73d03637df6856a6fc00b4173c6aeb4961c8593d (diff)
downloadwebsite-a097c125e1461095dd29be73f21662046b86a07e.tar.gz
website-a097c125e1461095dd29be73f21662046b86a07e.zip
prev on 1 wraps around
-rw-r--r--generatesite.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/generatesite.py b/generatesite.py
index c480014..2d5d069 100644
--- a/generatesite.py
+++ b/generatesite.py
@@ -38,7 +38,7 @@ def generateindex():
def generatepagebar(currentpage, pagecount):
print("generating page bar for {} total {}".format(currentpage, pagecount));
- pages = "<div class='middle'>page <a href='1'><-</a> <a href='" + str(1 if int(currentpage) == 1 else int(currentpage)-1) + "'>prev</a> ";
+ pages = "<div class='middle'>page <a href='1'><-</a> <a href='" + str(pagecount if int(currentpage) == 1 else int(currentpage)-1) + "'>prev</a> ";
for x in range(1, int(pagecount)+1):
if x == int(currentpage):
pages += "<strong><i><a href=" + str(x) + ">" + str(x) + "</a></i></strong> ";