fix wallpaper flashing and dedup background css

pull/29/head
Aevann1 2022-11-28 08:12:10 +02:00
parent 3183e0a28e
commit 55b9f7286d
4 changed files with 18 additions and 3 deletions

View File

@ -1,5 +1,5 @@
{%- extends 'root.html' -%}
{% block body_attributes %}id="{% if request.path != '/comments' %}{% block pagetype %}frontpage{% endblock %}{% endif %}" {% if SITE_NAME == 'rDrama' and v and (v.is_banned or v.agendaposter) %}style="overflow-x: hidden;background:url(/assets/images/backgrounds/anime/1.webp?v=3) center center fixed; background-color: var(--background)"{% elif v and v.background %}style="{% if path != '/formatting' %}overflow-x: hidden; {% endif %} background:url(/assets/images/backgrounds/{{v.background}}?v=3) center center fixed; background-color: var(--background){% if 'anime' not in v.background %};background-size: cover{% endif %}"{% elif not v %}style="{% if path != '/formatting' %}overflow-x: hidden; {% endif %} background:url(/assets/images/backgrounds/glitter/1.webp?v=3) center center fixed; background-color: var(--background);background-size: cover"{% endif %}{% endblock %}
{% block body_attributes %}id="{% if request.path != '/comments' %}{% block pagetype %}frontpage{% endblock %}{% endif %}"{% endblock %}
{% block body %}
{% block banner %}
{% include "modals/expanded_image.html" %}

View File

@ -23,5 +23,20 @@
</head>
<body {% block body_attributes %}id="{%block pagetype %}{% endblock %}"{% endblock %}>
{% block body required %}{% endblock %}
<style>
body {
{% if SITE_NAME == 'rDrama' and (not v or v.is_banned or v.agendaposter) %}
background:url(/assets/images/backgrounds/glitter/1.webp?v=3) center center fixed;
background-color: var(--background);
background-size: cover;
{% elif v and v.background %}
background:url(/assets/images/backgrounds/{{v.background}}?v=3) center center fixed;
background-color: var(--background);
{% if 'anime' not in v.background %}
background-size: cover;
{% endif %}
{% endif %}
}
</style>
</body>
</html>

View File

@ -1,7 +1,7 @@
{%- extends 'root.html' -%}
{% import 'settings/common.html' as common with context %}
{% block pagetitle %}Settings{% endblock %}
{% block body_attributes %}id="settings" {% if SITE_NAME == 'rDrama' and v and (v.is_banned or v.agendaposter) %}style="overflow-x: hidden;background:url(/assets/images/backgrounds/anime/1.webp?v=3) center center fixed; background-color: var(--background)"{% elif v and v.background %}style="overflow-x: hidden;background:url(/assets/images/backgrounds/{{v.background}}?v=3) center center fixed; background-color: var(--background){% if 'anime' not in v.background %};background-size: cover{% endif %}"{% endif %}{% endblock %}
{% block body_attributes %}id="settings"{% endblock %}
{% block body %}
{% include "header.html" %}
<div class="container">

View File

@ -1,6 +1,6 @@
{%- extends 'root.html' -%}
{% block pagetitle %}User List{% endblock %}
{% block body_attributes %}id="settings2" {% if SITE_NAME == 'rDrama' and v and (v.is_banned or v.agendaposter) %}style="overflow-x: hidden;background:url(/assets/images/backgrounds/anime/1.webp?v=3) center center fixed; background-color: var(--background)"{% elif v and v.background %}style="overflow-x: hidden;background:url(/assets/images/backgrounds/{{v.background}}?v=3) center center fixed; background-color: var(--background){% if 'anime' not in v.background %};background-size: cover{% endif %}"{% endif %}{% endblock %}
{% block body_attributes %}id="settings2"{% endblock %}
{% block body %}
{% include "header.html" %}
{% block subNav %}