forked from rDrama/rDrama
make post navigation work with all post listings
parent
b2ac886612
commit
63a6a9bc88
|
@ -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}
|
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:
|
if not v:
|
||||||
cache.set(f'frontpage_{sort}_{t}_{page}_{hole}_{pins}', result, timeout=900)
|
cache.set(f'frontpage_{sort}_{t}_{page}_{hole}_{pins}', result, timeout=900)
|
||||||
|
|
|
@ -128,7 +128,4 @@
|
||||||
{% if FP and request.path == '/' and v and not v.fp %}
|
{% if FP and request.path == '/' and v and not v.fp %}
|
||||||
<script defer src="{{'js/fp.js' | asset}}"></script>
|
<script defer src="{{'js/fp.js' | asset}}"></script>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<input hidden id="post_permalinks" value="{{post_permalinks}}">
|
|
||||||
<script defer src="{{'js/post_permalinks.js' | asset}}"></script>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -248,3 +248,10 @@
|
||||||
{% if v and v.admin_level >= PERMS['POST_COMMENT_MODERATION'] %}
|
{% if v and v.admin_level >= PERMS['POST_COMMENT_MODERATION'] %}
|
||||||
<script defer src="{{'js/admin/post.js' | asset}}"></script>
|
<script defer src="{{'js/admin/post.js' | asset}}"></script>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% set post_permalinks = [] %}
|
||||||
|
{% for p in listing %}
|
||||||
|
{{post_permalinks.append(p.permalink)}}
|
||||||
|
{% endfor %}
|
||||||
|
<input hidden id="post_permalinks" value="{{post_permalinks}}">
|
||||||
|
<script defer src="{{'js/post_permalinks.js' | asset}}"></script>
|
||||||
|
|
Loading…
Reference in New Issue