diff --git a/docs/customization.md b/docs/customization.md index b52797dcd..34b28d497 100644 --- a/docs/customization.md +++ b/docs/customization.md @@ -100,6 +100,7 @@ assets may also be put in the `overrides` directory: │ │ └─ analytics.html # Analytics setup │ ├─ languages/ # Translation languages │ ├─ actions.html # Actions +│ ├─ alternate.html # Translation language selector │ ├─ comments.html # Comment system (empty by default) │ ├─ consent.html # Consent │ ├─ content.html # Page content @@ -113,6 +114,7 @@ assets may also be put in the `overrides` directory: │ ├─ nav.html # Main navigation │ ├─ nav-item.html # Main navigation item │ ├─ pagination.html # Pagination (used for blog) +│ ├─ palette.html # Color palette toggle │ ├─ post.html # Blog post excerpt │ ├─ search.html # Search interface │ ├─ social.html # Social links diff --git a/material/partials/alternate.html b/material/partials/alternate.html new file mode 100644 index 000000000..4492d6576 --- /dev/null +++ b/material/partials/alternate.html @@ -0,0 +1,22 @@ +{#- + This file was automatically generated - do not edit +-#} +
+
+ {% set icon = config.theme.icon.alternate or "material/translate" %} + +
+ +
+
+
diff --git a/material/partials/header.html b/material/partials/header.html index f35aa254c..86311ad30 100644 --- a/material/partials/header.html +++ b/material/partials/header.html @@ -36,41 +36,11 @@ {% if config.theme.palette %} {% if not config.theme.palette is mapping %} -
- {% for option in config.theme.palette %} - {% set scheme = option.scheme | d("default", true) %} - {% set primary = option.primary | d("indigo", true) %} - {% set accent = option.accent | d("indigo", true) %} - - {% if option.toggle %} - - {% endif %} - {% endfor %} -
+ {% include "partials/palette.html" %} {% endif %} {% endif %} {% if config.extra.alternate %} -
-
- {% set icon = config.theme.icon.alternate or "material/translate" %} - -
- -
-
-
+ {% include "partials/alternate.html" %} {% endif %} {% if "material/search" in config.plugins %}