From 63a6a9bc889b7f15b592e50e049110c240036054 Mon Sep 17 00:00:00 2001 From: Aevann Date: Wed, 31 Jan 2024 01:41:44 +0200 Subject: [PATCH] make post navigation work with all post listings --- files/routes/front.py | 2 +- files/templates/home.html | 3 --- files/templates/post_listing.html | 7 +++++++ 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/files/routes/front.py b/files/routes/front.py index f101cfde6..be4d913a0 100644 --- a/files/routes/front.py +++ b/files/routes/front.py @@ -80,7 +80,7 @@ def front_all(v, hole=None): if v and v.client: return {"data": [x.json for x in posts], "total": total} - result = render_template("home.html", v=v, listing=posts, total=total, sort=sort, t=t, page=page, hole=hole, home=True, pins=pins, size=size, post_permalinks=[p.permalink for p in posts]) + result = render_template("home.html", v=v, listing=posts, total=total, sort=sort, t=t, page=page, hole=hole, home=True, pins=pins, size=size) if not v: cache.set(f'frontpage_{sort}_{t}_{page}_{hole}_{pins}', result, timeout=900) diff --git a/files/templates/home.html b/files/templates/home.html index 6e72d535b..cde499bcb 100644 --- a/files/templates/home.html +++ b/files/templates/home.html @@ -128,7 +128,4 @@ {% if FP and request.path == '/' and v and not v.fp %} {% endif %} - - - {% endblock %} diff --git a/files/templates/post_listing.html b/files/templates/post_listing.html index 957beef2f..8a6e5d242 100644 --- a/files/templates/post_listing.html +++ b/files/templates/post_listing.html @@ -248,3 +248,10 @@ {% if v and v.admin_level >= PERMS['POST_COMMENT_MODERATION'] %} {% endif %} + +{% set post_permalinks = [] %} +{% for p in listing %} + {{post_permalinks.append(p.permalink)}} +{% endfor %} + +