allow user css

This commit is contained in:
Ville Rantanen
2023-07-23 22:11:15 +03:00
parent 9437e64936
commit 79780f0769
2 changed files with 4 additions and 1 deletions

View File

@@ -34,12 +34,12 @@ config = Config()
config.registration_enabled, config.registration_enabled,
config.login_required config.login_required
) = db.get_config() ) = db.get_config()
config.user_css = os.path.exists(os.path.join(app.static_folder, 'user.css'))
if config.version != VERSION: if config.version != VERSION:
print(f"Incompatible version {config.version} (expected {VERSION})") print(f"Incompatible version {config.version} (expected {VERSION})")
sys.exit(1) sys.exit(1)
class Role: class Role:
USER = 0 USER = 0
MODERATOR = 1 MODERATOR = 1

View File

@@ -5,6 +5,9 @@
<meta name="generator" content="Agreper - minimal, no-JS forum software"> <meta name="generator" content="Agreper - minimal, no-JS forum software">
<meta content="utf-8" http-equiv="encoding"> <meta content="utf-8" http-equiv="encoding">
<link rel=stylesheet href="{{ url_for('static', filename='theme.css') }}"> <link rel=stylesheet href="{{ url_for('static', filename='theme.css') }}">
{%- if config.server_name -%}
<link rel=stylesheet href="{{ url_for('static', filename='user.css') }}">
{%- endif -%}
</head> </head>
<body> <body>
<nav> <nav>