This commit is contained in:
Aevann1 2022-01-14 14:04:35 +02:00
parent 24245d95cc
commit 207507fc8e
10 changed files with 97 additions and 279 deletions

View file

@ -106,9 +106,7 @@ def notifications(v):
if request.headers.get("Authorization"): return {"data":[x.json for x in listing]}
if not v or v.oldsite: template = ''
else: template = 'CHRISTMAS/'
return render_template(f"{template}notifications.html",
return render_template("notifications.html",
v=v,
notifications=listing,
next_exists=next_exists,
@ -206,9 +204,7 @@ def front_all(v):
g.db.commit()
if request.headers.get("Authorization"): return {"data": [x.json for x in posts], "next_exists": next_exists}
if not v or v.oldsite: template = ''
else: template = 'CHRISTMAS/'
return render_template(f"{template}home.html", v=v, listing=posts, next_exists=next_exists, sort=sort, t=t, page=page)
return render_template("home.html", v=v, listing=posts, next_exists=next_exists, sort=sort, t=t, page=page)
@ -328,9 +324,7 @@ def changelog(v):
posts = get_posts(ids, v=v)
if request.headers.get("Authorization"): return {"data": [x.json for x in posts], "next_exists": next_exists}
if not v or v.oldsite: template = ''
else: template = 'CHRISTMAS/'
return render_template(f"{template}changelog.html", v=v, listing=posts, next_exists=next_exists, sort=sort, t=t, page=page)
return render_template("changelog.html", v=v, listing=posts, next_exists=next_exists, sort=sort, t=t, page=page)
@cache.memoize(timeout=86400)
@ -472,6 +466,4 @@ def all_comments(v):
idlist = idlist[:25]
if request.headers.get("Authorization"): return {"data": [x.json for x in comments]}
if not v or v.oldsite: template = ''
else: template = 'CHRISTMAS/'
return render_template(f"{template}home_comments.html", v=v, sort=sort, t=t, page=page, comments=comments, standalone=True, next_exists=next_exists)
return render_template("home_comments.html", v=v, sort=sort, t=t, page=page, comments=comments, standalone=True, next_exists=next_exists)