Fixed theme breaking when no palette is defined

This commit is contained in:
squidfunk 2023-04-24 14:48:48 +02:00
parent 0028518f1a
commit f0d506c446
No known key found for this signature in database
GPG Key ID: 5ED40BC4F9C436DF
2 changed files with 49 additions and 45 deletions

View File

@ -33,6 +33,7 @@
</div>
</div>
</div>
{% if config.theme.palette %}
{% if not config.theme.palette is mapping %}
<form class="md-header__option" data-md-component="palette">
{% for option in config.theme.palette %}
@ -48,6 +49,7 @@
{% endfor %}
</form>
{% endif %}
{% endif %}
{% if config.extra.alternate %}
<div class="md-header__option">
<div class="md-select">

View File

@ -72,6 +72,7 @@
</div>
<!-- Color palette -->
{% if config.theme.palette %}
{% if not config.theme.palette is mapping %}
<form class="md-header__option" data-md-component="palette">
{% for option in config.theme.palette %}
@ -106,6 +107,7 @@
{% endfor %}
</form>
{% endif %}
{% endif %}
<!-- Site language selector -->
{% if config.extra.alternate %}