diff --git a/files/assets/css/transparent.css b/files/assets/css/transparent.css deleted file mode 100644 index cc2b09f31..000000000 --- a/files/assets/css/transparent.css +++ /dev/null @@ -1,76 +0,0 @@ -@charset "UTF-8"; - -:root { - --dark: #383838; - --secondary: #383838; - --white: #E1E1E1; - --black: #CFCFCF; - --light: transparent; - --muted: #E1E1E1; - --gray: #383838; - --gray-100: #E1E1E1; - --gray-200: #E1E1E1; - --gray-300: #383838; - --gray-400: #303030; - --gray-500: #21262d; - --gray-600: transparent; - --gray-700: transparent; - --gray-800: transparent; - --gray-900: transparent; - --background: #21262d; -} - - - -* { - border-color: var(--primary); -} - -.border { - border-color: var(--primary) !important; -} - -.form-control { - border-color: var(--primary) !important; -} - -.btn { - border-color: var(--primary) !important; -} - -.form-control:disabled, .form-control[readonly] { - border-color: var(--primary) !important; -} - -.btn-success { - border-color: #38A169 !important; -} - -.btn-danger { - border-color: #E53E3E !important; -} - -pre { - color: #CFCFCF; -} - -.container { - background: rgba(28, 34, 41, 0.90) !important; - border-radius: 0 !important; -} - -.dropdown-menu { - background-color: var(--gray-500); -} - -.form-inline.search .form-control:active, .form-inline.search .form-control:focus { - background-color: var(--gray-500); -} - -.form-control:focus, .form-control:active { - background-color: var(--gray-500); -} - -#frontpage .post-title a:visited, .visited { - color: #7a7a7a !important; -} diff --git a/files/assets/images/backgrounds/space/1.webp b/files/assets/images/backgrounds/space/1.webp deleted file mode 100644 index 13e8ba834..000000000 Binary files a/files/assets/images/backgrounds/space/1.webp and /dev/null differ diff --git a/files/classes/user.py b/files/classes/user.py index c9ae82bc2..ee3bbace4 100644 --- a/files/classes/user.py +++ b/files/classes/user.py @@ -41,7 +41,6 @@ class User(Base): id = Column(Integer, primary_key=True) username = Column(String(length=255), nullable=False) namecolor = Column(String(length=6), default=DEFAULT_COLOR, nullable=False) - background = Column(String) customtitle = Column(String) customtitleplain = deferred(Column(String)) titlecolor = Column(String(length=6), default=DEFAULT_COLOR, nullable=False) diff --git a/files/helpers/const.py b/files/helpers/const.py index 80f4e1e2e..4f641a717 100644 --- a/files/helpers/const.py +++ b/files/helpers/const.py @@ -37,8 +37,8 @@ ROLES={} LEADERBOARD_LIMIT: Final[int] = 25 -THEMES = {"TheMotte", "dramblr", "reddit", "transparent", "win98", "dark", - "light", "coffee", "tron", "4chan", "midnight"} +THEMES = ["TheMotte", "dramblr", "reddit", "win98", "dark", + "light", "coffee", "tron", "4chan", "midnight"] SORTS_COMMON = { "top": 'fa-arrow-alt-circle-up', "bottom": 'fa-arrow-alt-circle-down', diff --git a/files/routes/settings.py b/files/routes/settings.py index af5b45a3e..ee7e78912 100644 --- a/files/routes/settings.py +++ b/files/routes/settings.py @@ -22,26 +22,13 @@ tiers={ "(LlamaBean)": 1, } -@app.post("/settings/removebackground") -@limiter.limit("1/second;30/minute;200/hour;1000/day") -@auth_required -def removebackground(v): - v.background = None - g.db.add(v) - g.db.commit() - return {"message": "Background removed!"} - @app.post("/settings/profile") @limiter.limit("1/second;30/minute;200/hour;1000/day") @auth_required def settings_profile_post(v): updated = False - if request.values.get("background", v.background) != v.background: - updated = True - v.background = request.values.get("background") - - elif request.values.get("reddit", v.reddit) != v.reddit: + if request.values.get("reddit", v.reddit) != v.reddit: reddit = request.values.get("reddit") if reddit in {'old.reddit.com', 'reddit.com', 'i.reddit.com', 'teddit.net', 'libredd.it', 'unddit.com'}: updated = True @@ -226,10 +213,11 @@ def settings_profile_post(v): theme = request.values.get("theme") if theme: if theme in THEMES: - if theme == "transparent" and not v.background: - abort(400, "You need to set a background to use the transparent theme!") v.theme = theme - if theme == "win98": v.themecolor = "30409f" + if theme == "win98": + v.themecolor = "30409f" + else: + v.themecolor = "fff" updated = True else: abort(400) @@ -285,7 +273,6 @@ def changelogsub(v): @limiter.limit("1/second;30/minute;200/hour;1000/day") @auth_required def namecolor(v): - color = str(request.values.get("color", "")).strip() if color.startswith('#'): color = color[1:] if len(color) != 6: return render_template("settings_security.html", v=v, error="Invalid color code") @@ -298,7 +285,6 @@ def namecolor(v): @limiter.limit("1/second;30/minute;200/hour;1000/day") @auth_required def themecolor(v): - themecolor = str(request.values.get("themecolor", "")).strip() if themecolor.startswith('#'): themecolor = themecolor[1:] if len(themecolor) != 6: return render_template("settings_security.html", v=v, error="Invalid color code") @@ -311,7 +297,6 @@ def themecolor(v): @limiter.limit("1/second;30/minute;200/hour;1000/day") @auth_required def titlecolor(v): - titlecolor = str(request.values.get("titlecolor", "")).strip() if titlecolor.startswith('#'): titlecolor = titlecolor[1:] if len(titlecolor) != 6: return render_template("settings_profile.html", v=v, error="Invalid color code") diff --git a/files/templates/default.html b/files/templates/default.html index ca56f62b8..b988b68ad 100644 --- a/files/templates/default.html +++ b/files/templates/default.html @@ -213,8 +213,7 @@ -
- + {% include "header.html" %} {% block Banner %} diff --git a/files/templates/settings.html b/files/templates/settings.html index 6bde7aeed..3684b55ce 100644 --- a/files/templates/settings.html +++ b/files/templates/settings.html @@ -43,15 +43,11 @@ {% endif %} - - + {% include "header.html" %}Change the theme for the website.
Change the background for the website.
-Invite a friend.
-Subscribe to the {{SITE_TITLE}} RSS feed.
-Edit how others see you on {{SITE_TITLE}}.
-Your original username will always stay reserved for you: {{v.original_username}}
Or type a color code: