From f074335f642e9a41741f6071db0401ea221bdcad Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sat, 9 Oct 2021 09:21:22 +0200 Subject: [PATCH] dsfdsf --- compilecss.py | 7 ------- files/classes/user.py | 2 +- files/classes/userblock.py | 10 +--------- files/routes/settings.py | 3 --- files/templates/settings_profile.html | 4 ++-- files/templates/submission.html | 2 +- 6 files changed, 5 insertions(+), 23 deletions(-) delete mode 100644 compilecss.py diff --git a/compilecss.py b/compilecss.py deleted file mode 100644 index 923a70f22..000000000 --- a/compilecss.py +++ /dev/null @@ -1,7 +0,0 @@ -for theme in ['transparent', 'win98', 'midnight', 'dark', 'light', 'coffee', 'tron', '4chan']: - with open(f"./files/assets/css/{theme}_ff66ac.css", encoding='utf-8') as t: - text = t.read() - for color in ['ff66ac','805ad5','62ca56','38a169','80ffff','2a96f3','62ca56','eb4963','ff0000','f39731','30409f','3e98a7','e4432d','7b9ae4','ec72de','7f8fa6', 'f8db58']: - newtext = text.replace("ff66ac", color).replace("ff4097", color).replace("ff1a83", color).replace("ff3390", color).replace("rgba(255, 102, 172, 0.25)", color) - with open(f"./files/assets/css/{theme}_{color}.css", encoding='utf-8', mode='w') as nt: - nt.write(newtext) \ No newline at end of file diff --git a/files/classes/user.py b/files/classes/user.py index 9b2c17e02..dd5030171 100644 --- a/files/classes/user.py +++ b/files/classes/user.py @@ -18,7 +18,7 @@ import random site = environ.get("DOMAIN").strip() site_name = environ.get("SITE_NAME").strip() -defaulttheme = environ.get("DEFAULT_THEME", "light").strip() +defaulttheme = environ.get("DEFAULT_THEME", "midnight").strip() defaultcolor = environ.get("DEFAULT_COLOR", "fff").strip() defaulttimefilter = environ.get("DEFAULT_TIME_FILTER", "all").strip() cardview = bool(int(environ.get("CARD_VIEW", 1))) diff --git a/files/classes/userblock.py b/files/classes/userblock.py index b9be3092f..9a3ab1d70 100644 --- a/files/classes/userblock.py +++ b/files/classes/userblock.py @@ -1,8 +1,6 @@ from sqlalchemy import * from sqlalchemy.orm import relationship from files.__main__ import Base -from files.helpers.lazy import lazy -import time class UserBlock(Base): @@ -15,10 +13,4 @@ class UserBlock(Base): target = relationship("User", primaryjoin="User.id==UserBlock.target_id", viewonly=True) def __repr__(self): - - return f"" - - @property - @lazy - def created_date(self): - return time.strftime("%d %b %Y", time.gmtime(self.created_utc)) \ No newline at end of file + return f"" \ No newline at end of file diff --git a/files/routes/settings.py b/files/routes/settings.py index 8eb5ccac6..f4c0b2ee0 100644 --- a/files/routes/settings.py +++ b/files/routes/settings.py @@ -199,9 +199,6 @@ def settings_profile_post(v): theme = request.values.get("theme") if theme: v.theme = theme - if theme == "coffee" or theme == "4chan": v.themecolor = "38a169" - elif theme == "tron": v.themecolor = "80ffff" - elif theme == "win98": v.themecolor = "30409f" updated = True quadrant = request.values.get("quadrant") diff --git a/files/templates/settings_profile.html b/files/templates/settings_profile.html index 2a249b978..9af7b886c 100644 --- a/files/templates/settings_profile.html +++ b/files/templates/settings_profile.html @@ -97,9 +97,9 @@