Fixed #6: Include multiple color palettes via mkdocs.yml

This commit is contained in:
squidfunk
2016-02-24 16:24:32 +01:00
parent bf8be26e0a
commit 32a14cbb12
8 changed files with 251 additions and 6 deletions

View File

@@ -86,6 +86,12 @@
<link rel="stylesheet" type="text/css"
href="{{ base_url }}/assets/stylesheets/application.css" />
<!-- Extra palettes -->
{% if config.extra.palette %}
<link rel="stylesheet" type="text/css"
href="{{ base_url }}/assets/stylesheets/palettes.css" />
{% endif %}
<!-- Configure webfonts -->
{% if config.extra.font != "none" %}
{% set text = config.extra.get("font", {}).text | default("Ubuntu") %}
@@ -114,7 +120,15 @@
<!-- Custom header -->
{% block extrahead %}{% endblock %}
</head>
<body>
<!-- Define palette -->
{% set palette = config.extra.get("palette", {}) %}
{% set primary = palette.primary | replace(' ', '-') | lower %}
{% set accent = palette.accent | replace(' ', '-') | lower %}
<body class="
{% if primary %}palette-primary-{{ primary }}{% endif %}
{% if accent %}palette-accent-{{ accent }}{% endif %}
">
<!--
Sadly the jinja template engine is not very flexible - it doesn't support