From 79780f076951aad5aa68ca06c57fc33afc2323b8 Mon Sep 17 00:00:00 2001 From: Ville Rantanen Date: Sun, 23 Jul 2023 22:11:15 +0300 Subject: [PATCH] allow user css --- main.py | 2 +- templates/base.html | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index d4842bb..f263178 100644 --- a/main.py +++ b/main.py @@ -34,12 +34,12 @@ config = Config() config.registration_enabled, config.login_required ) = db.get_config() +config.user_css = os.path.exists(os.path.join(app.static_folder, 'user.css')) if config.version != VERSION: print(f"Incompatible version {config.version} (expected {VERSION})") sys.exit(1) - class Role: USER = 0 MODERATOR = 1 diff --git a/templates/base.html b/templates/base.html index df21e1a..1daf43a 100644 --- a/templates/base.html +++ b/templates/base.html @@ -5,6 +5,9 @@ + {%- if config.server_name -%} + + {%- endif -%}