remotes/1693045480750635534/spooky-22
Aevann1 2022-05-20 20:45:12 +02:00
parent 9c978a13ac
commit aed84df4ad
3 changed files with 9 additions and 3 deletions

View File

@ -88,7 +88,7 @@ def before_request():
with open('site_settings.json', 'r') as f:
app.config['SETTINGS'] = json.load(f)
# if request.host != app.config["SERVER_NAME"]: return {"error":"Unauthorized host provided."}, 401
if request.host != app.config["SERVER_NAME"]: return {"error":"Unauthorized host provided."}, 401
if request.headers.get("CF-Worker"): return {"error":"Cloudflare workers are not allowed to access this website."}, 401
if not app.config['SETTINGS']['Bots'] and request.headers.get("Authorization"): abort(503)

View File

@ -188,6 +188,7 @@ class User(Base):
@property
@lazy
def is_cakeday(self):
if SITE_NAME != 'rDrama': return False
if time.time() - self.created_utc > 363 * 86400:
date = time.strftime("%d %b", time.gmtime(self.created_utc))
now = time.strftime("%d %b", time.gmtime())

View File

@ -27,8 +27,13 @@
</div>
{% endif %}
<div class="navbar navbar-expand-md navbar-light" id="navbar" style="background: url('/assets/images/balloons.webp') !important;">
<div class="container-fluid" style="padding:0; background: transparent !important">
{% if SITE_NAME == 'rDrama' %}
<div class="navbar navbar-expand-md navbar-light" id="navbar" style="background: url('/assets/images/balloons.webp') !important;">
<div class="container-fluid" style="padding:0; background: transparent !important">
{% else %}
<div class="navbar navbar-expand-md navbar-light" id="navbar">
<div class="container-fluid" style="padding:0;">
{% endif %}
<a href="/" class="navbar-brand mr-auto {% if SITE_NAME in ('PCM','WPD') and not sub %}flex-grow-1{% endif %}">
{% if SITE_NAME == 'rDrama' %} {# birthgay only #}
<img alt="header icon" height=33 src="/assets/images/emojis/marseyparty.webp?v=birthgay">