Skip to content

Commit

Permalink
Default value None
Browse files Browse the repository at this point in the history
  • Loading branch information
dyve committed Apr 22, 2024
1 parent d664864 commit 883a0d4
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/settings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ The ``BOOTSTRAP5`` dict variable contains these settings and defaults:
"theme_url": None,
# Theme color: light, dark https://getbootstrap.com/docs/5.3/customize/color-modes/
"color_mode": "dark",
"color_mode": None,
# Put JavaScript in the HEAD section of the HTML document (only relevant if you use bootstrap5.html).
'javascript_in_head': False,
Expand Down
1 change: 0 additions & 1 deletion example/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,5 +155,4 @@
"error_css_class": "django_bootstrap5-error",
"required_css_class": "django_bootstrap5-required",
"javascript_in_head": True,
"color_mode": "dark",
}
2 changes: 1 addition & 1 deletion src/django_bootstrap5/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"crossorigin": "anonymous",
},
"theme_url": None,
"color_mode": "light",
"color_mode": None,
"javascript_in_head": False,
"wrapper_class": "mb-3",
"inline_wrapper_class": "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
{% load django_bootstrap5 %}
{% load i18n %}
{% get_current_language as LANGUAGE_CODE %}
<html lang="{{ LANGUAGE_CODE|default:'en_us' }}" data-bs-theme="{{ 'color_mode'|bootstrap_setting }}">

<html lang="{{ LANGUAGE_CODE|default:'en_us' }}"{% with color_mode='color_mode'|bootstrap_setting %}{% if color_mode %} data-bs-theme="{{ color_mode }}"{% endif %}{% endwith %}>
<head>

<!-- Required meta tags -->
Expand Down

0 comments on commit 883a0d4

Please sign in to comment.