From 1b3db76a7230285e1aa071dfee1dfdc6568d3869 Mon Sep 17 00:00:00 2001 From: Ivan Blinkov Date: Wed, 21 Feb 2018 20:23:49 +0300 Subject: [PATCH] Improve single page mode --- docs/mkdocs-material-theme/assets/stylesheets/custom.css | 5 +++++ docs/mkdocs-material-theme/base.html | 8 ++++++-- docs/mkdocs-material-theme/partials/nav.html | 2 ++ docs/mkdocs_en_single_page.yml | 1 + docs/mkdocs_ru_single_page.yml | 1 + 5 files changed, 15 insertions(+), 2 deletions(-) diff --git a/docs/mkdocs-material-theme/assets/stylesheets/custom.css b/docs/mkdocs-material-theme/assets/stylesheets/custom.css index a3f40bffeed..3892937b9fd 100644 --- a/docs/mkdocs-material-theme/assets/stylesheets/custom.css +++ b/docs/mkdocs-material-theme/assets/stylesheets/custom.css @@ -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; +} diff --git a/docs/mkdocs-material-theme/base.html b/docs/mkdocs-material-theme/base.html index 5dd9d9bca96..781d1232b40 100644 --- a/docs/mkdocs-material-theme/base.html +++ b/docs/mkdocs-material-theme/base.html @@ -134,8 +134,12 @@
{% block content %} - {% if page.edit_url %} - + {% if config.single_page %} + + {% else %} + {% if page.edit_url %} + + {% endif %} {% endif %} {% if not "\x3ch1" in page.content %}

{{ page.title | default(config.site_name, true)}}

diff --git a/docs/mkdocs-material-theme/partials/nav.html b/docs/mkdocs-material-theme/partials/nav.html index d694dc4d02d..5b55c88c2eb 100644 --- a/docs/mkdocs-material-theme/partials/nav.html +++ b/docs/mkdocs-material-theme/partials/nav.html @@ -28,6 +28,7 @@ + {% if not config.single %}
    {% for nav_item in nav %} {% set path = "nav-" + loop.index | string %} @@ -35,4 +36,5 @@ {% include "partials/nav-item.html" %} {% endfor %}
+ {% endif %} diff --git a/docs/mkdocs_en_single_page.yml b/docs/mkdocs_en_single_page.yml index 8b1cad8f3c3..23300e3b93a 100644 --- a/docs/mkdocs_en_single_page.yml +++ b/docs/mkdocs_en_single_page.yml @@ -4,6 +4,7 @@ copyright: ©2016–2018 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/' diff --git a/docs/mkdocs_ru_single_page.yml b/docs/mkdocs_ru_single_page.yml index da08b5f2390..07e30821c5d 100644 --- a/docs/mkdocs_ru_single_page.yml +++ b/docs/mkdocs_ru_single_page.yml @@ -4,6 +4,7 @@ copyright: ©2016–2018 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/'