mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Fixed theme breaking when no palette is defined
This commit is contained in:
@@ -33,6 +33,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{% if config.theme.palette %}
|
||||||
{% if not config.theme.palette is mapping %}
|
{% if not config.theme.palette is mapping %}
|
||||||
<form class="md-header__option" data-md-component="palette">
|
<form class="md-header__option" data-md-component="palette">
|
||||||
{% for option in config.theme.palette %}
|
{% for option in config.theme.palette %}
|
||||||
@@ -48,6 +49,7 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
</form>
|
</form>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
{% if config.extra.alternate %}
|
{% if config.extra.alternate %}
|
||||||
<div class="md-header__option">
|
<div class="md-header__option">
|
||||||
<div class="md-select">
|
<div class="md-select">
|
||||||
|
|||||||
@@ -72,6 +72,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Color palette -->
|
<!-- Color palette -->
|
||||||
|
{% if config.theme.palette %}
|
||||||
{% if not config.theme.palette is mapping %}
|
{% if not config.theme.palette is mapping %}
|
||||||
<form class="md-header__option" data-md-component="palette">
|
<form class="md-header__option" data-md-component="palette">
|
||||||
{% for option in config.theme.palette %}
|
{% for option in config.theme.palette %}
|
||||||
@@ -106,6 +107,7 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
</form>
|
</form>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<!-- Site language selector -->
|
<!-- Site language selector -->
|
||||||
{% if config.extra.alternate %}
|
{% if config.extra.alternate %}
|
||||||
|
|||||||
Reference in New Issue
Block a user