Improve single page mode

This commit is contained in:
Ivan Blinkov 2018-02-21 20:23:49 +03:00
parent 5cfc36371b
commit 1b3db76a72
5 changed files with 15 additions and 2 deletions

View File

@ -110,3 +110,8 @@ h1, h2, h3, .md-logo {
font-size: 3rem;
font-family: 'Yandex Sans Display Web', Arial, sans-serif;
}
.md-content__icon:hover {
text-decoration: none !important;
color: #08f !important;
}

View File

@ -134,8 +134,12 @@
<div class="md-content">
<article class="md-content__inner md-typeset">
{% block content %}
{% if page.edit_url %}
<a href="{{ page.edit_url }}" title="{{ lang.t('edit.link.title') }}" class="md-icon md-content__icon">&#xE3C9;</a>
{% if config.single_page %}
<a href="{{ config.repo_url }}tree/master/docs" title="{{ lang.t('edit.link.title') }}" class="md-icon md-content__icon">&#xE3C9;</a>
{% else %}
{% if page.edit_url %}
<a href="{{ page.edit_url }}" title="{{ lang.t('edit.link.title') }}" class="md-icon md-content__icon">&#xE3C9;</a>
{% endif %}
{% endif %}
{% if not "\x3ch1" in page.content %}
<h1>{{ page.title | default(config.site_name, true)}}</h1>

View File

@ -28,6 +28,7 @@
</li>
</ul>
{% if not config.single %}
<ul class="md-nav__list" data-md-scrollfix>
{% for nav_item in nav %}
{% set path = "nav-" + loop.index | string %}
@ -35,4 +36,5 @@
{% include "partials/nav-item.html" %}
{% endfor %}
</ul>
{% endif %}
</nav>

View File

@ -4,6 +4,7 @@ copyright: ©20162018 Yandex LLC
docs_dir: en_single_page
site_dir: build/docs/en/single
use_directory_urls: false
single_page: true
repo_name: 'yandex/ClickHouse'
repo_url: 'https://github.com/yandex/ClickHouse/'

View File

@ -4,6 +4,7 @@ copyright: ©20162018 Yandex LLC
docs_dir: ru_single_page
site_dir: build/docs/ru/single
use_directory_urls: false
single_page: true
repo_name: 'yandex/ClickHouse'
repo_url: 'https://github.com/yandex/ClickHouse/'