force transparent theme on userprofiles with a profile background
parent
5b870f06af
commit
d781c853f8
|
@ -1,5 +1,3 @@
|
|||
@import 'midnight.css?v=4033';
|
||||
|
||||
:root {
|
||||
--light: transparent;
|
||||
--gray-600: transparent;
|
||||
|
|
|
@ -423,7 +423,7 @@
|
|||
<button type="button" class="btn btn-secondary" onclick="toggle()" {% if v.id == u.id %}style="margin-bottom:0!important;padding:0.3rem 0.75rem!important"{% endif %}>Toggle Anthem</button>
|
||||
{% endif %}
|
||||
|
||||
{% if v and v.id == u.id and (v.profile_background or v.theme == 'transparent') %}
|
||||
{% if v and v.id == u.id %}
|
||||
<div>
|
||||
<form class="mt-3" id="upload-profile-background-mobile" action="/settings/profile_background" method="post" enctype="multipart/form-data">
|
||||
<input type="hidden" name="formkey" value="{{v|formkey}}">
|
||||
|
|
|
@ -105,6 +105,7 @@
|
|||
{% endmacro %}
|
||||
|
||||
{% macro stylesheets(include_user_css) %}
|
||||
{% set transparent = False %}
|
||||
<link rel="stylesheet" href="{{'css/main.css' | asset}}">
|
||||
<link id="favicon" rel="icon" type="image/webp" href="/icon.webp?v=1">
|
||||
{% if v %}
|
||||
|
@ -117,6 +118,10 @@
|
|||
</style>
|
||||
{% endif %}
|
||||
{% if include_user_css and not EVENT_STYLES %}
|
||||
{% if v.theme == 'transparent' %}
|
||||
{% set transparent = True %}
|
||||
<link rel="stylesheet" href="{{('css/midnight.css') | asset}}">
|
||||
{% endif %}
|
||||
<link rel="stylesheet" href="{{('css/'~v.theme~'.css') | asset}}">
|
||||
{% if v.css and not request.path.startswith('/settings/css') %}
|
||||
<style>
|
||||
|
@ -136,6 +141,11 @@
|
|||
{% else %}
|
||||
{{default_theme()}}
|
||||
{% endif %}
|
||||
|
||||
{% if not transparent and '@' in request.path and u and u.profile_background %}
|
||||
<link rel="stylesheet" href="{{('css/transparent.css') | asset}}">
|
||||
{% endif %}
|
||||
|
||||
<link rel="stylesheet" href="{{'css/awards.css' | asset}}">
|
||||
|
||||
{% if sub and sub.css and not request.path.endswith('settings') and not request.values.get('nocss') %}
|
||||
|
@ -184,6 +194,10 @@
|
|||
|
||||
{% macro default_theme() %}
|
||||
<style>:root{--primary:#{{DEFAULT_COLOR}}}</style>
|
||||
{% if DEFAULT_THEME == 'transparent' %}
|
||||
{% set transparent = True %}
|
||||
<link rel="stylesheet" href="{{('css/midnight.css') | asset}}">
|
||||
{% endif %}
|
||||
<link rel="stylesheet" href="{{('css/'~DEFAULT_THEME~'.css') | asset}}">
|
||||
{% endmacro %}
|
||||
|
||||
|
|
Loading…
Reference in New Issue