{%- if i18n_config %} {%- set i18n_theme = namespace(default="", languages=dict()) %} {%- if 'default_language' in i18n_config %} {%- set i18n_theme.default = i18n_config.default_language %} {%- for lang, display in config.plugins.i18n.config.languages.items() %} {%- set _ = i18n_theme.languages.update({lang: display.name }) %} {%- endfor %} {% else %} {%- for lang in i18n_config.languages %} {%- if lang.default %} {%- set i18n_theme.default = lang.locale %} {%- endif %} {%- set _ = i18n_theme.languages.update({lang.locale: lang.name }) %} {%- endfor %} {%- endif %} {%- endif %} {%- block site_meta %} {% if page and page.is_homepage %}{% endif %} {% if config.site_author %}{% endif %} {% if page and page.canonical_url %}{% endif %} {% if config.theme.favicon %} {%- else %}{% endif %} {%- if i18n_config %} {%- for lang, name in i18n_theme.languages.items() %} {%- if lang != i18n_page_locale %} {%- if lang == i18n_theme.default %} {%- elif i18n_page_locale == i18n_theme.default %} {%- else %} {%- endif %} {%- endif %} {%- endfor %} {%- endif %} {%- if config.theme.manifest %} {%- if i18n_config and i18n_page_locale != i18n_theme.default %} {%- else %} {%- endif %} {%- endif %} {%- endblock %} {%- block htmltitle %} {% if page.title %}{{ page.title }} - {% endif %}{{ config.site_name }} {%- endblock %} {%- block styles %} {%- if page_theme %} {%- else %} {%- endif %} {%- for path in config.extra_css %} {%- endfor %} {%- endblock %} {%- block libs %} {%- endblock %} {%- block extrahead %} {% endblock %} {%- if config.theme.extlink %} {%- endif %} {%- if 'i18n' in config.plugins %} {%- endif %} {%- if 'search' in config.plugins %} {%- endif %} {%- if 'encryptcontent' in config.plugins %} {%- endif %}
{%- if config.theme.logo %} {%- else %} {%- endif %}
 
{% if page.title %}{% if page.meta.title %}{{ page.meta.title }}{% else %}{{ page.title }}{% endif %}{% endif %}
{%- if 'search' in config.plugins %} {%- endif %} {%- block top_buttons %} {%- endblock %}
{%- if config.theme.logo %}
{%- endif %}
 
{% if page.title %}{% if page.meta.title %}{{ page.meta.title }}{% else %}{{ page.title }}{% endif %}{% endif %}
{%- block site_nav %} {%- if nav|length>1 %}
{%- endif %} {%- endblock %} {%- set toc_check = namespace(anchors=0) %} {%- for toc_item in page.toc %} {%- set toc_check.anchors = toc_check.anchors + 1 %} {%- for toc_item in toc_item.children %} {% set toc_check.anchors = toc_check.anchors + 1 %} {%- endfor %} {%- endfor %} {%- if toc_check.anchors > 1 and config.theme.toc_sidebar %} {%- endif %}
{%- if toc_check.anchors > 1 %}
{%- for toc_item in page.toc %} {{ toc_item.title }} {%- for toc_item in toc_item.children %} {{ toc_item.title }} {%- for toc_item in toc_item.children %} {{ toc_item.title }} {%- endfor %} {%- endfor %} {%- endfor %}
{%- endif %} {%- if i18n_config %}
{%- for lang, name in i18n_theme.languages.items() %} {%- if lang == i18n_page_locale %} {%- set langcolor = "w3-theme-l2" %} {%- else %} {%- set langcolor = "w3-theme-l4" %} {%- endif %} {%- if lang == i18n_theme.default %} {{ name }} {%- elif i18n_page_locale == i18n_theme.default %} {{ name }} {%- else %} {{ name }} {%- endif %} {%- endfor %}
{%- endif %}
{%- block content %} {{ page.content }} {%- endblock %} {%- if 'search' in config.plugins %}
 
{%- endif %}
{%- if config.theme.zoom_img %}
{%- endif %} {%- block footer %} {%- endblock %}
{%- block scripts %} {%- for script in config.extra_javascript %} {%- if script.path %} {# Detected MkDocs 1.5+ which has `script.path` and `script_tag` #} {{ script | script_tag }} {%- else %} {# Fallback - examine the file name directly #} {%- endif %} {%- endfor %} {%- if config.theme.serviceworker %} {%- endif %} {%- endblock %} {%- block exec_script %} {%- endblock %} {% if page and page.is_homepage %} {% endif %}