From bf8be26e0a1639a67337f859ec78033f3e7c98c6 Mon Sep 17 00:00:00 2001 From: squidfunk Date: Wed, 24 Feb 2016 12:40:02 +0100 Subject: [PATCH] Fixed #9: Text for prev/next footer navigation should be customizable --- CHANGELOG | 5 +++++ material/base.html | 26 ++++++++------------------ material/drawer.html | 12 ++++++------ material/footer.html | 8 ++++++-- material/header.html | 16 +++++++--------- material/nav.html | 5 ++--- mkdocs.yml | 5 ++++- src/base.html | 26 ++++++++------------------ src/drawer.html | 16 +++++++--------- src/footer.html | 8 ++++++-- src/header.html | 20 +++++++++----------- src/nav.html | 5 ++--- 12 files changed, 70 insertions(+), 82 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index abaf47642..221cda758 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,8 @@ +mkdocs-material-0.x.x (2016-xx-xx) + + * Fixed #9: Text for prev/next footer navigation should be customizable + * Refactored templates (replaced if/else with modifiers where possible) + mkdocs-material-0.1.3 (2016-02-21) * Fixed #3: Ordered lists within an unordered list have ::before content diff --git a/material/base.html b/material/base.html index a38ef8e8f..83fdfec07 100644 --- a/material/base.html +++ b/material/base.html @@ -34,7 +34,7 @@ {% if config.extra.logo %} {% endif %} - {% set icon = icon | default('assets/images/favicon-e565ddfa3b.ico') %} + {% set icon = icon | default("assets/images/favicon-e565ddfa3b.ico") %} - {% if config.extra.font != 'none' %} - {% set text = 'Ubuntu' %} - {% if config.extra.font and config.extra.font.text %} - {% set text = config.extra.font.text %} - {% endif %} - {% set code = 'Ubuntu Mono' %} - {% if config.extra.font and config.extra.font.code %} - {% set code = config.extra.font.code %} - {% endif %} + {% if config.extra.font != "none" %} + {% set text = config.extra.get("font", {}).text | default("Ubuntu") %} + {% set code = config.extra.get("font", {}).code | default("Ubuntu Mono") %} {% set font = text + ':400,700|' + code | replace(' ', '+') %}