From e4e026d06d084b21e59a835a6605903c439cd5a9 Mon Sep 17 00:00:00 2001 From: daniel-Jones Date: Sat, 18 Nov 2017 14:53:57 +1100 Subject: blog added prev, next, start and end buttons to the blog navigation bar. --- generatesite.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/generatesite.py b/generatesite.py index a7b0321..0f5d399 100644 --- a/generatesite.py +++ b/generatesite.py @@ -38,13 +38,13 @@ def generateindex(): def generatepagebar(currentpage, pagecount): print("generating page bar for {} total {}".format(currentpage, pagecount)); - pages = "
page "; + pages = "
page <- prev "; for x in range(1, int(pagecount)+1): if x == int(currentpage): pages += "" + str(x) + " "; else: pages += "" + str(x) + " "; - pages += "
"; + pages += "next ->
"; return pages; def generateportfolio(): @@ -60,8 +60,6 @@ def generateportfolio(): replace(outdir + "/portfolio.html", "{CONTENT}", content); replace(outdir + "/portfolio.html", "{TIME}", strftime("%Y-%m-%d %H:%M:%S", gmtime())); - - def deletefiles(ddir): # delete all blog files for the_file in os.listdir(ddir): @@ -69,7 +67,6 @@ def deletefiles(ddir): if os.path.isfile(file_path): os.unlink(file_path); - def generateblog(): template = cfg.get("output", "template"); outdir = cfg.get("output", "dir"); -- cgit v1.2.3