allow user css
This commit is contained in:
2
main.py
2
main.py
@@ -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
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
Reference in New Issue
Block a user