ClickHouse/docs/tools/mkdocs-material-theme/partials/nav.html

47 lines
1.8 KiB
HTML

<nav class="md-nav md-nav--primary" data-md-level="0">
<label class="md-nav__title md-nav__title--site" for="drawer">
{{ config.site_name }}
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item md-nav__item--active">
<script type="text/javascript">
if (window.location.pathname.indexOf('/ru/') >= 0) {
if (window.location.pathname.indexOf('/single/') >= 0) {
document.write("<a href=\"{{ base_url }}/../\" class=\"md-nav__link md-nav__link--active\">Многостраничная версия</a>")
} else {
document.write("<a href=\"{{ base_url }}/single/\" class=\"md-nav__link md-nav__link--active\">Одностраничная версия</a>")
}
}else{
if (window.location.pathname.indexOf('/single/') >= 0) {
document.write("<a href=\"{{ base_url }}/../\" class=\"md-nav__link md-nav__link--active\">Multi page version</a>")
}else{
document.write("<a href=\"{{ base_url }}/single/\" class=\"md-nav__link md-nav__link--active\">Single page version</a>")
}
}
</script>
</li>
<li class="md-nav__item md-nav__item--active">
<a href="{{ config.repo_url }}" rel="external nofollow" target="_blank" class="md-nav__link">
<script type="text/javascript">
if (window.location.pathname.indexOf('/ru/') >= 0) {
document.write('Исходники ClickHouse');
} else {
document.write('ClickHouse sources');
}
</script>
</a>
</li>
</ul>
{% if not config.extra.single_page %}
<ul class="md-nav__list" data-md-scrollfix>
{% for nav_item in nav %}
{% set path = "nav-" + loop.index | string %}
{% set level = 1 %}
{% include "partials/nav-item.html" %}
{% endfor %}
</ul>
{% endif %}
</nav>