diff --git a/files/routes/front.py b/files/routes/front.py index 855a39357..a348d429f 100644 --- a/files/routes/front.py +++ b/files/routes/front.py @@ -8,8 +8,8 @@ from os import listdir defaulttimefilter = environ.get("DEFAULT_TIME_FILTER", "all").strip() SITE_NAME = environ.get("SITE_NAME", "").strip() -if SITE_NAME == 'Drama': g.num_banners = len(listdir('files/assets/images/Drama/banners')) + 1 -else: g.num_banners = None +if SITE_NAME == 'Drama': num_banners = len(listdir('files/assets/images/Drama/banners')) + 1 +else: num_banners = None @app.get("/post/") def slash_post(): @@ -207,7 +207,7 @@ def front_all(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}home.html", v=v, listing=posts, next_exists=next_exists, sort=sort, t=t, page=page) + return render_template(f"{template}home.html", v=v, listing=posts, num_banners=num_banners, next_exists=next_exists, sort=sort, t=t, page=page) diff --git a/files/templates/sidebar_Drama.html b/files/templates/sidebar_Drama.html index 6cf56323d..181e71e5c 100644 --- a/files/templates/sidebar_Drama.html +++ b/files/templates/sidebar_Drama.html @@ -1,5 +1,5 @@