remotes/1693045480750635534/spooky-22
Aevann1 2022-03-26 20:30:18 +02:00
parent 20405c7f8f
commit 9623ce5f4e
13 changed files with 24 additions and 25 deletions

View File

@ -52,6 +52,7 @@ def settings_profile_post(v):
if request.values.get("background", v.background) != v.background:
updated = True
v.background = request.values.get("background")
v.theme = 'transparent'
elif request.values.get("slurreplacer", v.slurreplacer) != v.slurreplacer:
updated = True
@ -325,9 +326,7 @@ def settings_profile_post(v):
theme = request.values.get("theme")
if theme:
if theme in {"dramblr","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!"}
if theme in {"dramblr", "classic", "classic_dark", "win98", "dark", "light", "coffee", "tron", "4chan", "midnight"}:
v.theme = theme
if theme == "win98": v.themecolor = "30409f"
updated = True

View File

@ -15,7 +15,7 @@
{% if v %}
<style>:root{--primary:#{{v.themecolor}}}</style>
<link rel="stylesheet" href="/static/assets/css/main.css?v=200"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?v=31">
<link rel="stylesheet" href="/static/assets/css/main.css?v=201"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?v=32">
{% if v.agendaposter %}
<style>
html {
@ -39,7 +39,7 @@
{% endif %}
{% else %}
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
<link rel="stylesheet" href="/static/assets/css/main.css?v=200"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=31">
<link rel="stylesheet" href="/static/assets/css/main.css?v=201"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=32">
{% endif %}
</head>

View File

@ -14,8 +14,8 @@
<title>Chat</title>
<style>:root{--primary:#{{v.themecolor}}}</style>
<link rel="stylesheet" href="/static/assets/css/main.css?v=200">
<link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?v=31">
<link rel="stylesheet" href="/static/assets/css/main.css?v=201">
<link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?v=32">
{% if v.css %}
<link rel="stylesheet" href="/@{{v.username}}/css">
{% endif %}

View File

@ -7,8 +7,8 @@
<script src="/static/assets/js/bootstrap.js?v=245"></script>
{% if v %}
<style>:root{--primary:#{{v.themecolor}}}</style>
<link rel="stylesheet" href="/static/assets/css/main.css?v=200">
<link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?v=31">
<link rel="stylesheet" href="/static/assets/css/main.css?v=201">
<link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?v=32">
{% if v.agendaposter %}
<style>
html {
@ -32,8 +32,8 @@
{% endif %}
{% else %}
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
<link rel="stylesheet" href="/static/assets/css/main.css?v=200">
<link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=31">
<link rel="stylesheet" href="/static/assets/css/main.css?v=201">
<link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=32">
{% endif %}
{% if sub and sub.css and not request.path.endswith('settings') %}

View File

@ -6,7 +6,7 @@
{% block content %}
{% if v %}
<style>:root{--primary:#{{v.themecolor}}}</style>
<link rel="stylesheet" href="/static/assets/css/main.css?v=200"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?v=31">
<link rel="stylesheet" href="/static/assets/css/main.css?v=201"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?v=32">
{% if v.agendaposter %}
<style>
html {
@ -30,7 +30,7 @@
{% endif %}
{% else %}
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
<link rel="stylesheet" href="/static/assets/css/main.css?v=200"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=31">
<link rel="stylesheet" href="/static/assets/css/main.css?v=201"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=32">
{% endif %}
<div class="row justify-content-around">

View File

@ -18,8 +18,8 @@
{% endblock %}
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
<link rel="stylesheet" href="/static/assets/css/main.css?v=200">
<link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=31">
<link rel="stylesheet" href="/static/assets/css/main.css?v=201">
<link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=32">
</head>

View File

@ -14,7 +14,7 @@
<title>2-Step Login - {{SITE_NAME}}</title>
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
<link rel="stylesheet" href="/static/assets/css/main.css?v=200"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=31">
<link rel="stylesheet" href="/static/assets/css/main.css?v=201"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=32">
</head>

View File

@ -34,7 +34,7 @@
<style>:root{--primary:#{{v.themecolor}}}</style>
<link rel="stylesheet" href="/static/assets/css/main.css?v=190"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?v=31">
<link rel="stylesheet" href="/static/assets/css/main.css?v=190"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?v=32">
{% if v.agendaposter %}
<style>
html {

View File

@ -39,10 +39,10 @@
{% if v %}
<style>:root{--primary:#{{v.themecolor}}}</style>
<link rel="stylesheet" href="/static/assets/css/main.css?v=200"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?v=31">
<link rel="stylesheet" href="/static/assets/css/main.css?v=201"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?v=32">
{% else %}
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
<link rel="stylesheet" href="/static/assets/css/main.css?v=200"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=31">
<link rel="stylesheet" href="/static/assets/css/main.css?v=201"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=32">
{% endif %}
</head>

View File

@ -115,7 +115,7 @@
<p>Change the theme for the website.</p>
<div class="input-group mb2">
<select autocomplete="off" id='theme' class="form-control" form="profile-settings" name="theme" onchange="post_toast(this,'/settings/profile?theme='+document.getElementById('theme').value, '1')">
{% for entry in ["dramblr","classic","classic_dark","transparent", "win98", "dark", "light", "coffee", "tron", "4chan", "midnight"] %}
{% for entry in ["dramblr", "classic", "classic_dark",, "win98", "dark", "light", "coffee", "tron", "4chan", "midnight"] %}
<option value="{{entry}}" {% if v.theme==entry %} selected {% endif %}>
{{entry}}
</option>

View File

@ -31,7 +31,7 @@
<title>{% if ref_user %}{{ref_user.username}} invites you to {{SITE_NAME}}{% else %}Sign up - {{SITE_NAME}}{% endif %}</title>
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
<link rel="stylesheet" href="/static/assets/css/main.css?v=200"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=31">
<link rel="stylesheet" href="/static/assets/css/main.css?v=201"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=32">
</head>

View File

@ -32,7 +32,7 @@
<title>{% if ref_user %}{{ref_user.username}} invites you to {{SITE_NAME}}{% else %}{{SITE_NAME}}{% endif %}</title>
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
<link rel="stylesheet" href="/static/assets/css/main.css?v=200"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=31">
<link rel="stylesheet" href="/static/assets/css/main.css?v=201"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=32">
</head>

View File

@ -26,7 +26,7 @@
{% block stylesheets %}
{% if v %}
<style>:root{--primary:#{{v.themecolor}}}</style>
<link rel="stylesheet" href="/static/assets/css/main.css?v=200"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?v=31">
<link rel="stylesheet" href="/static/assets/css/main.css?v=201"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?v=32">
{% if v.agendaposter %}
<style>
html {
@ -50,8 +50,8 @@
{% endif %}
{% else %}
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
<link rel="stylesheet" href="/static/assets/css/main.css?v=200">
<link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=31">
<link rel="stylesheet" href="/static/assets/css/main.css?v=201">
<link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=32">
{% endif %}
{% endblock %}