forked from rDrama/rDrama
dfs
parent
e8aa5a2ffa
commit
d620ee5ff9
|
@ -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': num_banners = len(listdir('files/assets/images/Drama/banners')) + 1
|
||||
else: num_banners = None
|
||||
if SITE_NAME == 'Drama': g.num_banners = len(listdir('files/assets/images/Drama/banners')) + 1
|
||||
else: g.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, num_banners=num_banners, listing=posts, next_exists=next_exists, sort=sort, t=t, page=page)
|
||||
return render_template(f"{template}home.html", v=v, listing=posts, next_exists=next_exists, sort=sort, t=t, page=page)
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div class="col sidebar text-left d-none d-lg-block pt-3 bg-white" style="max-width:300px">
|
||||
<img alt="banner" src="/static/assets/images/{{'SITE_NAME' | app_config}}/banners/{{range(1,num_banners)|random()}}.webp?a=4" width=100%>
|
||||
<img alt="banner" src="/static/assets/images/{{'SITE_NAME' | app_config}}/banners/{{range(1,g.num_banners)|random()}}.webp?a=4" width=100%>
|
||||
<a class="btn btn-primary btn-block mt-4" href="/submit">SUBMIT DRAMA!</a>
|
||||
<a class="btn btn-primary btn-block" href="/post/16583">EMOJI MEGATHREAD</a>
|
||||
<a class="btn btn-primary btn-block" href="/post/18459">BUGS/SUGGESTIONS MEGATHREAD</a>
|
||||
|
|
Loading…
Reference in New Issue