mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Added support for different spellings for theme color
This commit is contained in:
parent
4d7f77e88b
commit
602de62ae3
@ -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 %}
|
||||
|
@ -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 %}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user