From b94fabddb4078de56388731d003e8c5436a591ee Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sat, 11 Jun 2022 16:39:00 +0200 Subject: [PATCH] rDrama -> SITE_NAME --- files/routes/comments.py | 10 +++++----- files/templates/default.html | 4 ++-- files/templates/lottery.html | 8 ++++---- files/templates/sidebar_rDrama.html | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/files/routes/comments.py b/files/routes/comments.py index 39bea7bb5..f1118960b 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -222,17 +222,17 @@ def api_comment(v): if image == "": return {"error":"Image upload failed"} if v.admin_level > 2 and level == 1: if parent_post.id == 37696: - li = sorted(os.listdir('files/assets/images/rDrama/sidebar'), + li = sorted(os.listdir(f'files/assets/images/{SITE_NAME}/sidebar'), key=lambda e: int(e.split('.webp')[0]))[-1] num = int(li.split('.webp')[0]) + 1 - filename = f'files/assets/images/rDrama/sidebar/{num}.webp' + filename = f'files/assets/images/{SITE_NAME}/sidebar/{num}.webp' copyfile(oldname, filename) process_image(v.patron, filename, 400) elif parent_post.id == 37697: - li = sorted(os.listdir('files/assets/images/rDrama/banners'), + li = sorted(os.listdir(f'files/assets/images/{SITE_NAME}/banners'), key=lambda e: int(e.split('.webp')[0]))[-1] num = int(li.split('.webp')[0]) + 1 - filename = f'files/assets/images/rDrama/banners/{num}.webp' + filename = f'files/assets/images/{SITE_NAME}/banners/{num}.webp' copyfile(oldname, filename) process_image(v.patron, filename) elif parent_post.id == 37833: @@ -1083,4 +1083,4 @@ def handle_wordle_action(cid, v): g.db.add(comment) g.db.commit() - return {"response" : comment.wordle_html(v)} \ No newline at end of file + return {"response" : comment.wordle_html(v)} diff --git a/files/templates/default.html b/files/templates/default.html index 3f93c4bfb..dcfed20bb 100644 --- a/files/templates/default.html +++ b/files/templates/default.html @@ -260,9 +260,9 @@ {% if v and (v.is_banned or v.agendaposter) %} - site banner + site banner {% else %} - site banner + site banner {% endif %} {% else %} diff --git a/files/templates/lottery.html b/files/templates/lottery.html index bd132f296..79be86ab4 100644 --- a/files/templates/lottery.html +++ b/files/templates/lottery.html @@ -2,10 +2,10 @@
- +
@@ -62,7 +62,7 @@ data-bs-toggle="tooltip" data-bs-placement="bottom" height="13" - src="/assets/images/rDrama/coins.webp?v=2" + src="/assets/images/{{SITE_NAME}}/coins.webp?v=2" title="" aria-label="coins" data-bs-original-title="coins" @@ -123,7 +123,7 @@ data-bs-toggle="tooltip" data-bs-placement="bottom" height="13" - src="/assets/images/rDrama/coins.webp?v=2" + src="/assets/images/{{SITE_NAME}}/coins.webp?v=2" title="" aria-label="coins" data-bs-original-title="coins" diff --git a/files/templates/sidebar_rDrama.html b/files/templates/sidebar_rDrama.html index ccc8dc5a2..c5163a8d8 100644 --- a/files/templates/sidebar_rDrama.html +++ b/files/templates/sidebar_rDrama.html @@ -31,7 +31,7 @@ set VISITORS_HERE_FLAVOR = [ {% endif %} {% if v and (v.is_banned or v.agendaposter) %} - sidebar image + sidebar image {% else %} sidebar image {% endif %}