mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-12-18 10:25:58 +01:00
Added support for different spellings for theme color
This commit is contained in:
parent
4d7f77e88b
commit
602de62ae3
@ -54,8 +54,10 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% if palette.primary %}
|
{% if palette.primary %}
|
||||||
{% import "partials/palette.html" as map %}
|
{% import "partials/palette.html" as map %}
|
||||||
{% set color = map.primary(palette.primary) %}
|
{% set primary = map.primary(
|
||||||
<meta name="theme-color" content="{{ color }}">
|
palette.primary | replace(" ", "-") | lower
|
||||||
|
) %}
|
||||||
|
<meta name="theme-color" content="{{ primary }}">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block libs %}
|
{% block libs %}
|
||||||
|
@ -110,8 +110,10 @@
|
|||||||
<!-- Theme-color meta tag for Android -->
|
<!-- Theme-color meta tag for Android -->
|
||||||
{% if palette.primary %}
|
{% if palette.primary %}
|
||||||
{% import "partials/palette.html" as map %}
|
{% import "partials/palette.html" as map %}
|
||||||
{% set color = map.primary(palette.primary) %}
|
{% set primary = map.primary(
|
||||||
<meta name="theme-color" content="{{ color }}" />
|
palette.primary | replace(" ", "-") | lower
|
||||||
|
) %}
|
||||||
|
<meta name="theme-color" content="{{ primary }}" />
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user