django-unfold 0.20.5__py3-none-any.whl → 0.21.0__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
@@ -7,7 +7,9 @@
7
7
  {% include "unfold/helpers/label.html" with text=environment.0 type=environment.1 %}
8
8
  {% endif %}
9
9
 
10
- {% include "unfold/helpers/theme_switch.html" %}
10
+ {% if not theme %}
11
+ {% include "unfold/helpers/theme_switch.html" %}
12
+ {% endif %}
11
13
 
12
14
  {% include "unfold/helpers/account_links.html" %}
13
15
  </div>
@@ -12,7 +12,7 @@
12
12
  {% capture as actions_items silent %}{% block actions-items %}{% endblock %}{% endcapture %}
13
13
 
14
14
  <!DOCTYPE html>
15
- <html lang="{{ LANGUAGE_CODE|default:"en-us" }}" dir="{{ LANGUAGE_BIDI|yesno:"rtl,ltr,auto" }}" x-data="{ adminTheme: $persist('auto').as('adminTheme') }" x-bind:class="{'dark': adminTheme === 'dark' || (adminTheme === 'auto' && window.matchMedia('(prefers-color-scheme: dark)').matches)}" x-cloak>
15
+ <html lang="{{ LANGUAGE_CODE|default:"en-us" }}" dir="{{ LANGUAGE_BIDI|yesno:"rtl,ltr,auto" }}" {% if theme %}class="{{ theme }}"{% else %}x-data="{ adminTheme: $persist('auto').as('adminTheme') }" x-bind:class="{'dark': adminTheme === 'dark' || (adminTheme === 'auto' && window.matchMedia('(prefers-color-scheme: dark)').matches)}" x-cloak{% endif %}>
16
16
 
17
17
  <head>
18
18
  <title>{% block title %}{% endblock %}</title>