{#- Overrides Zensical's language menu with a one-click toggle, styled like the palette toggle beside it. Each language is deployed under its own site root with the same versions and page paths, so a click swaps the current root for the other one and keeps the version, page, and anchor. The roots come from the versionless `site_url` of each `extra.alternate` entry, because mike adds the version to `config.site_url`. Without JavaScript, or on a path outside the current root, the button opens the other language's home page. -#} {%- set icon = config.theme.icon.alternate or "material/translate" -%} {%- set current = config.extra.alternate | selectattr("lang", "equalto", config.theme.language) | first -%} {%- for alt in config.extra.alternate if alt.lang != config.theme.language %}
{%- endfor %}