forked from MarseyWorld/MarseyWorld
sfd
parent
8064ffead1
commit
85baf70235
|
@ -364,6 +364,8 @@ def settings_profile_post(v):
|
||||||
|
|
||||||
theme = request.values.get("theme")
|
theme = request.values.get("theme")
|
||||||
if theme:
|
if theme:
|
||||||
|
if theme == "transparent" and not v.background:
|
||||||
|
return render_template(f"{template}settings_profile.html", v=v, error="You need to set a background to use the transparent theme!")
|
||||||
v.theme = theme
|
v.theme = theme
|
||||||
if theme == "win98": v.themecolor = "30409f"
|
if theme == "win98": v.themecolor = "30409f"
|
||||||
updated = True
|
updated = True
|
||||||
|
|
|
@ -111,12 +111,7 @@
|
||||||
<p>Change the theme for the website.</p>
|
<p>Change the theme for the website.</p>
|
||||||
<div class="input-group mb2">
|
<div class="input-group mb2">
|
||||||
<select autocomplete="off" id='theme' class="form-control" form="profile-settings" name="theme" onchange="post_toast('/settings/profile?theme='+document.getElementById('theme').value, '1')">
|
<select autocomplete="off" id='theme' class="form-control" form="profile-settings" name="theme" onchange="post_toast('/settings/profile?theme='+document.getElementById('theme').value, '1')">
|
||||||
{% if v.background %}
|
{% for entry in ["transparent", "win98", "dark", "light", "coffee", "tron", "4chan", "midnight"] %}
|
||||||
{% set entries = ["transparent", "win98", "dark", "light", "coffee", "tron", "4chan", "midnight"] %}
|
|
||||||
{% else %}
|
|
||||||
{% set entries = ["dark", "light", "win98", "coffee", "tron", "4chan", "midnight"] %}
|
|
||||||
{% endif %}
|
|
||||||
{% for entry in entries %}
|
|
||||||
<option value="{{entry}}" {% if v.theme==entry %} selected {% endif %}>
|
<option value="{{entry}}" {% if v.theme==entry %} selected {% endif %}>
|
||||||
{{entry}}
|
{{entry}}
|
||||||
</option>
|
</option>
|
||||||
|
|
Loading…
Reference in New Issue