ClickHouse/docs/tools/mkdocs-material-theme/partials/nav.html
Ivan Blinkov ba1393fbbd Refactoring of documentation infrastructure to get rid of a lots of copypaste (#2616)
* Clean up docs folder by moving all build-related tools to subdirectory

* Remove unused script

* Remove unused script #2

* Some refactoring in concatenate.py

* Rewrite build.sh in Python

- Get rid of half of copypaste in yml files
- Draft of redirects support

* Actually include redirects.conf

* copy conf too

* Keep H1 the same in single page docs

* fix some paths

* Keep only pages index in yaml

* Workaround for missing jQuery

* Delay docs init
2018-07-09 22:59:07 +03:00

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>