1 less request, 1 less transaction, 1 less query
parent
bc12edb5b9
commit
d59f346f0b
|
@ -598,6 +598,9 @@ def settings_css(v):
|
|||
if v.agendaposter: return {"error": "Agendapostered users can't edit css!"}
|
||||
|
||||
css = request.values.get("css").strip().replace('\\', '').strip()[:4000]
|
||||
|
||||
if '</style>' in css.lower(): return {"error": "Please message @Aevann if you get this error"}
|
||||
|
||||
v.css = css
|
||||
g.db.add(v)
|
||||
|
||||
|
|
|
@ -40,7 +40,9 @@
|
|||
}
|
||||
</style>
|
||||
{% elif v.css %}
|
||||
<link rel="stylesheet" href="/{{v.id}}/css">
|
||||
<style>
|
||||
{{v.css | safe}}
|
||||
</style>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<style>:root{--primary:#{{DEFAULT_COLOR}}</style>
|
||||
|
|
|
@ -19,7 +19,9 @@
|
|||
<link rel="stylesheet" href="{{asset('css/main.css')}}">
|
||||
<link rel="stylesheet" href="{{asset('css/' + v.theme + '.css')}}">
|
||||
{% if v.css %}
|
||||
<link rel="stylesheet" href="/{{v.id}}/css">
|
||||
<style>
|
||||
{{v.css | safe}}
|
||||
</style>
|
||||
{% endif %}
|
||||
|
||||
<style>
|
||||
|
|
|
@ -36,7 +36,9 @@
|
|||
}
|
||||
</style>
|
||||
{% elif v.css %}
|
||||
<link rel="stylesheet" href="/{{v.id}}/css">
|
||||
<style>
|
||||
{{v.css | safe}}
|
||||
</style>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<style>:root{--primary:#{{DEFAULT_COLOR}}</style>
|
||||
|
|
|
@ -27,7 +27,9 @@
|
|||
}
|
||||
</style>
|
||||
{% elif v.css %}
|
||||
<link rel="stylesheet" href="/{{v.id}}/css">
|
||||
<style>
|
||||
{{v.css | safe}}
|
||||
</style>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<style>:root{--primary:#{{DEFAULT_COLOR}}</style>
|
||||
|
|
|
@ -56,7 +56,9 @@
|
|||
}
|
||||
</style>
|
||||
{% elif v.css and not request.path.startswith('/settings/css') %}
|
||||
<link rel="stylesheet" href="/{{v.id}}/css">
|
||||
<style>
|
||||
{{v.css | safe}}
|
||||
</style>
|
||||
{% endif %}
|
||||
</head>
|
||||
|
||||
|
|
|
@ -49,7 +49,9 @@
|
|||
}
|
||||
</style>
|
||||
{% elif v.css %}
|
||||
<link rel="stylesheet" href="/{{v.id}}/css">
|
||||
<style>
|
||||
{{v.css | safe}}
|
||||
</style>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<style>:root{--primary:#{{DEFAULT_COLOR}}</style>
|
||||
|
|
Loading…
Reference in New Issue