diff --git a/docs/customization.md b/docs/customization.md index 3b6311cf7..00cdbcbe0 100644 --- a/docs/customization.md +++ b/docs/customization.md @@ -98,16 +98,14 @@ The directory layout of the Material theme is as follows: │ ├─ javascripts/ # JavaScript │ └─ stylesheets/ # Stylesheets ├─ partials/ -│ ├─ fonts.html # Webfont definitions │ ├─ footer.html # Footer bar │ ├─ header.html # Header bar -│ ├─ i18n.html # Localized labels +│ ├─ language.html # Localized labels │ ├─ nav-item.html # Main navigation item │ ├─ nav.html # Main navigation │ ├─ search.html # Search box │ ├─ social.html # Social links │ ├─ source.html # Repository information -│ ├─ svgs.html # Inline SVG definitions │ ├─ toc-item.html # Table of contents item │ └─ toc.html # Table of contents ├─ 404.html # 404 error page diff --git a/docs/getting-started.md b/docs/getting-started.md index 1d770d6b9..fdd2fee65 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -281,8 +281,8 @@ google_analytics: ### Localization L10N In order to localize the labels (e.g. *Previous* and *Next* in the footer), -you can override the file `partials/i18n.html` to provide your own translations -inside the macro `t`: +you can override the file `partials/language.html` to provide your own +translations inside the macro `t`: ``` jinja {% macro t(key) %}{{ { diff --git a/material/base.html b/material/base.html index 1d2d05cfd..7ad657477 100644 --- a/material/base.html +++ b/material/base.html @@ -1,4 +1,4 @@ -{% import "partials/i18n.html" as i18n %} +{% import "partials/language.html" as lang %} @@ -34,7 +34,15 @@ {% endblock %} {% block fonts %} - {% include "partials/fonts.html" %} + {% if config.extra.font != "none" %} + {% set text = config.extra.get("font", {}).text | default("Roboto") %} + {% set code = config.extra.get("font", {}).code + | default("Roboto Mono") %} + {% set font = text + ':300,400,400i,700|' + code | replace(' ', '+') %} + + + {% endif %} + {% endblock %} {% block styles %} @@ -55,7 +63,18 @@ {% else %} {% endif %} - {% include "partials/svgs.html" %} + + + {% set platform = config.extra.repo_icon or config.repo_url %} + {% if "github" in platform %} + {% include "assets/images/icons/github-1da075986e.svg" %} + {% elif "gitlab" in platform %} + {% include "assets/images/icons/gitlab-5ad3f9f9e5.svg" %} + {% elif "bitbucket" in platform %} + {% include "assets/images/icons/bitbucket-670608a71a.svg" %} + {% endif %} + + @@ -88,7 +107,7 @@
{% if config.edit_uri %} - edit + edit {% endif %} {% block content %} {% if not "\x3ch1 id=" in page.content %} diff --git a/material/partials/fonts.html b/material/partials/fonts.html deleted file mode 100644 index 39f7aea82..000000000 --- a/material/partials/fonts.html +++ /dev/null @@ -1,8 +0,0 @@ -{% if config.extra.font != "none" %} - {% set text = config.extra.get("font", {}).text | default("Roboto") %} - {% set code = config.extra.get("font", {}).code | default("Roboto Mono") %} - {% set font = text + ':300,400,400i,700|' + code | replace(' ', '+') %} - - -{% endif %} - diff --git a/material/partials/footer.html b/material/partials/footer.html index 5a063b2e2..4c39d0e01 100644 --- a/material/partials/footer.html +++ b/material/partials/footer.html @@ -1,4 +1,4 @@ -{% import "partials/i18n.html" as i18n %} +{% import "partials/language.html" as lang %}