Added support for different spellings for theme color

This commit is contained in:
squidfunk 2018-06-18 10:19:07 +02:00
parent 4d7f77e88b
commit 602de62ae3
2 changed files with 8 additions and 4 deletions

View File

@ -54,8 +54,10 @@
{% endif %}
{% if palette.primary %}
{% import "partials/palette.html" as map %}
{% set color = map.primary(palette.primary) %}
<meta name="theme-color" content="{{ color }}">
{% set primary = map.primary(
palette.primary | replace(" ", "-") | lower
) %}
<meta name="theme-color" content="{{ primary }}">
{% endif %}
{% endblock %}
{% block libs %}

View File

@ -110,8 +110,10 @@
<!-- Theme-color meta tag for Android -->
{% if palette.primary %}
{% import "partials/palette.html" as map %}
{% set color = map.primary(palette.primary) %}
<meta name="theme-color" content="{{ color }}" />
{% set primary = map.primary(
palette.primary | replace(" ", "-") | lower
) %}
<meta name="theme-color" content="{{ primary }}" />
{% endif %}
{% endblock %}