diff --git a/files/__main__.py b/files/__main__.py index 8be2d40c7..27abf0b9a 100644 --- a/files/__main__.py +++ b/files/__main__.py @@ -34,11 +34,11 @@ app.config['SEND_FILE_MAX_AGE_DEFAULT'] = 3153600 app.config["SESSION_COOKIE_NAME"] = "session_" + environ.get("SITE_NAME").strip().lower() app.config["VERSION"] = "1.0.0" app.config['MAX_CONTENT_LENGTH'] = 16 * 1024 * 1024 -app.config["SESSION_COOKIE_SECURE"] = True +app.config["SESSION_COOKIE_SECURE"] = True app.config["SESSION_COOKIE_SAMESITE"] = "Lax" app.config["PERMANENT_SESSION_LIFETIME"] = 60 * 60 * 24 * 365 app.config["DEFAULT_COLOR"] = environ.get("DEFAULT_COLOR", "ff0000").strip() -app.config["DEFAULT_THEME"] = environ.get("DEFAULT_THEME", "midnight").strip() +app.config["DEFAULT_THEME"] = "TheMotte" app.config["FORCE_HTTPS"] = 1 app.config["UserAgent"] = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36" app.config["HCAPTCHA_SITEKEY"] = environ.get("HCAPTCHA_SITEKEY","").strip() diff --git a/files/assets/css/TheMotte.css b/files/assets/css/TheMotte.css new file mode 100644 index 000000000..302e6c25f --- /dev/null +++ b/files/assets/css/TheMotte.css @@ -0,0 +1,85 @@ +@charset "UTF-8"; + + +:root { + --dark: #c7c7c7; + --secondary: #c7c7c7; + --gray: #c7c7c7; + --gray-300: #c7c7c7; + --gray-400: #cfcfcf; + --gray-500: #ffffff; + --gray-600: #ffffff; + --gray-700: #ffffff; + --gray-800: #ffffff; + --gray-900: #ffffff; + --light: #ffffff; + --muted: #1e1e1e; + --gray-100: #1e1e1e; + --gray-200: #1e1e1e; + --white: #1e1e1e; + --black: #303030; + --background: #ffffff; +} + +* { + border-color: var(--primary); +} + +.border { + border-color: var(--primary) !important; +} + +.form-control { + background: transparent; + border-color: var(--primary) !important; +} + +.btn { + background: transparent; + border-color: var(--primary) !important; +} + +.form-control:disabled, .form-control[readonly] { + background: transparent; + border-color: var(--primary) !important; +} + +.btn-success { + border-color: #38A169 !important; +} + +.btn-danger { + border-color: #E53E3E !important; +} + +#frontpage .pseudo-submit-form.card .card-body .form-control { + border-color: transparent !important; +} + +.btn-lg { + border-color: transparent !important; +} + +pre { + color: #CFCFCF; +} + +.transparent { + background: None !important; +} + +blockquote { + color: var(--gray-400); +} + +#profilestuff > * { + color: var(--gray-400) !important; +} + +.comment-anchor:target, .unread { + background: #00000055 !important; +} + +#frontpage .post-title a:visited, .visited { + color: #7a7a7a !important; +} \ No newline at end of file diff --git a/files/classes/user.py b/files/classes/user.py index a5154aa1e..d177cbbd8 100644 --- a/files/classes/user.py +++ b/files/classes/user.py @@ -22,7 +22,8 @@ from files.helpers.security import * import random from os import environ, remove, path -defaulttheme = environ.get("DEFAULT_THEME", "midnight").strip() + +defaulttheme = "TheMotte" defaulttimefilter = environ.get("DEFAULT_TIME_FILTER", "all").strip() cardview = bool(int(environ.get("CARD_VIEW", 1))) @@ -631,4 +632,4 @@ class User(Base): def filter_words(self): l = [i.strip() for i in self.custom_filter_list.split('\n')] if self.custom_filter_list else [] l = [i for i in l if i] - return l \ No newline at end of file + return l diff --git a/files/routes/settings.py b/files/routes/settings.py index d113ef605..53e486800 100644 --- a/files/routes/settings.py +++ b/files/routes/settings.py @@ -278,7 +278,9 @@ def settings_profile_post(v): theme = request.values.get("theme") if theme: - if theme in {"dramblr", "reddit", "classic", "classic_dark", "transparent", "win98", "dark", "light", "coffee", "tron", "4chan", "midnight"}: + if theme in {"TheMotte", "dramblr", "reddit", "classic", "classic_dark", + "transparent", "win98", "dark", "light", "coffee", "tron", "4chan", + "midnight"}: if theme == "transparent" and not v.background: return {"error": "You need to set a background to use the transparent theme!"} v.theme = theme diff --git a/files/templates/settings_profile.html b/files/templates/settings_profile.html index 6b0ae14f6..2c513f3d3 100644 --- a/files/templates/settings_profile.html +++ b/files/templates/settings_profile.html @@ -77,7 +77,7 @@