Allowed to override primary and accent colors more easily

This commit is contained in:
squidfunk 2022-11-11 17:30:22 +01:00
parent 078a411a22
commit c62ff2c283

View File

@ -34,7 +34,7 @@
{% endif %} {% endif %}
{% endblock %} {% endblock %}
{% block styles %} {% block styles %}
<link rel="stylesheet" href="{{ 'assets/stylesheets/main.20d9efc8.min.css' | url }}"> <link rel="stylesheet" href="{{ 'assets/stylesheets/main.472b142f.min.css' | url }}">
{% if config.theme.palette %} {% if config.theme.palette %}
{% set palette = config.theme.palette %} {% set palette = config.theme.palette %}
<link rel="stylesheet" href="{{ 'assets/stylesheets/palette.08040f6c.min.css' | url }}"> <link rel="stylesheet" href="{{ 'assets/stylesheets/palette.08040f6c.min.css' | url }}">
@ -81,9 +81,9 @@
{% if not palette is mapping %} {% if not palette is mapping %}
{% set palette = palette | first %} {% set palette = palette | first %}
{% endif %} {% endif %}
{% set scheme = palette.scheme | d("default", true) %} {% set scheme = palette.scheme | d("default", true) %}
{% set primary = palette.primary | d("indigo", true) %} {% set primary = palette.primary %}
{% set accent = palette.accent | d("indigo", true) %} {% set accent = palette.accent %}
<body dir="{{ direction }}" data-md-color-scheme="{{ scheme | replace(' ', '-') }}" data-md-color-primary="{{ primary | replace(' ', '-') }}" data-md-color-accent="{{ accent | replace(' ', '-') }}"> <body dir="{{ direction }}" data-md-color-scheme="{{ scheme | replace(' ', '-') }}" data-md-color-primary="{{ primary | replace(' ', '-') }}" data-md-color-accent="{{ accent | replace(' ', '-') }}">
{% else %} {% else %}
<body dir="{{ direction }}"> <body dir="{{ direction }}">