forked from rDrama/rDrama
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!"}
|
if v.agendaposter: return {"error": "Agendapostered users can't edit css!"}
|
||||||
|
|
||||||
css = request.values.get("css").strip().replace('\\', '').strip()[:4000]
|
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
|
v.css = css
|
||||||
g.db.add(v)
|
g.db.add(v)
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,9 @@
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
{% elif v.css %}
|
{% elif v.css %}
|
||||||
<link rel="stylesheet" href="/{{v.id}}/css">
|
<style>
|
||||||
|
{{v.css | safe}}
|
||||||
|
</style>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<style>:root{--primary:#{{DEFAULT_COLOR}}</style>
|
<style>:root{--primary:#{{DEFAULT_COLOR}}</style>
|
||||||
|
|
|
@ -19,7 +19,9 @@
|
||||||
<link rel="stylesheet" href="{{asset('css/main.css')}}">
|
<link rel="stylesheet" href="{{asset('css/main.css')}}">
|
||||||
<link rel="stylesheet" href="{{asset('css/' + v.theme + '.css')}}">
|
<link rel="stylesheet" href="{{asset('css/' + v.theme + '.css')}}">
|
||||||
{% if v.css %}
|
{% if v.css %}
|
||||||
<link rel="stylesheet" href="/{{v.id}}/css">
|
<style>
|
||||||
|
{{v.css | safe}}
|
||||||
|
</style>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
|
|
@ -36,7 +36,9 @@
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
{% elif v.css %}
|
{% elif v.css %}
|
||||||
<link rel="stylesheet" href="/{{v.id}}/css">
|
<style>
|
||||||
|
{{v.css | safe}}
|
||||||
|
</style>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<style>:root{--primary:#{{DEFAULT_COLOR}}</style>
|
<style>:root{--primary:#{{DEFAULT_COLOR}}</style>
|
||||||
|
|
|
@ -27,7 +27,9 @@
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
{% elif v.css %}
|
{% elif v.css %}
|
||||||
<link rel="stylesheet" href="/{{v.id}}/css">
|
<style>
|
||||||
|
{{v.css | safe}}
|
||||||
|
</style>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<style>:root{--primary:#{{DEFAULT_COLOR}}</style>
|
<style>:root{--primary:#{{DEFAULT_COLOR}}</style>
|
||||||
|
|
|
@ -56,7 +56,9 @@
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
{% elif v.css and not request.path.startswith('/settings/css') %}
|
{% elif v.css and not request.path.startswith('/settings/css') %}
|
||||||
<link rel="stylesheet" href="/{{v.id}}/css">
|
<style>
|
||||||
|
{{v.css | safe}}
|
||||||
|
</style>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,9 @@
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
{% elif v.css %}
|
{% elif v.css %}
|
||||||
<link rel="stylesheet" href="/{{v.id}}/css">
|
<style>
|
||||||
|
{{v.css | safe}}
|
||||||
|
</style>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<style>:root{--primary:#{{DEFAULT_COLOR}}</style>
|
<style>:root{--primary:#{{DEFAULT_COLOR}}</style>
|
||||||
|
|
Loading…
Reference in New Issue