{%- extends "!layout.html" %}
{#
This template exists as a way to implement a language menu just as what
"Read The Docs" does.
#}
{% block navigation %}
{% block menu %}
{#
The singlehtml builder doesn't handle this toctree call when the
toctree is empty. Skip building this for now.
#}
{% if 'singlehtml' not in builder %}
{% if 'zh' in pagename %}
{% set global_toc = toctree_for('zh/index',
maxdepth=theme_navigation_depth|int,
collapse=theme_collapse_navigation|tobool,
includehidden=False,
titles_only=theme_titles_only|tobool) %}
{% else %}
{% set global_toc = toctree(maxdepth=theme_navigation_depth|int,
collapse=theme_collapse_navigation|tobool,
includehidden=False,
titles_only=theme_titles_only|tobool) %}
{% endif %}
{% endif %}
{% if global_toc %}
{{ global_toc }}
{% else %}