diff --git a/pages/00.home/docs.ar.md b/pages/00.home/docs.ar.md index 61358300..ec257cab 100644 --- a/pages/00.home/docs.ar.md +++ b/pages/00.home/docs.ar.md @@ -5,6 +5,7 @@ taxonomy: category: docs routes: default: '/docs' +visible: false --- دليل واي يونوهوست YunoHost يرتكز أساسًا على ثلاثة محاور : diff --git a/pages/00.home/docs.de.md b/pages/00.home/docs.de.md index d542602b..618e23c0 100644 --- a/pages/00.home/docs.de.md +++ b/pages/00.home/docs.de.md @@ -5,6 +5,7 @@ taxonomy: category: docs routes: default: '/docs' +visible: false --- Die YunoHost Dokumentation ist in 2 Bereiche aufgeteilt: diff --git a/pages/00.home/docs.fr.md b/pages/00.home/docs.fr.md index 67447104..69225b9b 100644 --- a/pages/00.home/docs.fr.md +++ b/pages/00.home/docs.fr.md @@ -5,6 +5,7 @@ taxonomy: category: docs routes: default: '/docs' +visible: false --- ! This page is obsolete and should be reworked diff --git a/pages/00.home/docs.it.md b/pages/00.home/docs.it.md index 29d80c53..3107bd99 100644 --- a/pages/00.home/docs.it.md +++ b/pages/00.home/docs.it.md @@ -5,6 +5,7 @@ taxonomy: category: docs routes: default: '/docs' +visible: false --- La documentazione di YunoHost ha 2 differenti sezioni: diff --git a/pages/00.home/docs.md b/pages/00.home/docs.md index cd58d86e..1847e256 100644 --- a/pages/00.home/docs.md +++ b/pages/00.home/docs.md @@ -5,6 +5,7 @@ taxonomy: category: docs routes: default: '/docs' +visible: false --- ! This page is obsolete and should be reworked diff --git a/themes/yunohost-docs/css/custom.css b/themes/yunohost-docs/css/custom.css index 07b70940..56d1323f 100644 --- a/themes/yunohost-docs/css/custom.css +++ b/themes/yunohost-docs/css/custom.css @@ -2,15 +2,6 @@ background: none; } -.highlightable h5:first-of-type { - margin-top: 2rem; -} - -.highlightable h5 { - margin-top: 1rem; - color: #333; -} - #chapter { max-width: 80%; } @@ -114,11 +105,6 @@ h1, h2, h3, h4, h5, h6 { margin: 0; } -/* Hide home page in menu */ -.simplebar-content h5:first-child { - display: none; -} - @font-face { font-family: 'Source Sans Pro'; src: url('../fonts/SourceSansPro-Bold-webfont.eot'); diff --git a/themes/yunohost-docs/templates/docs.html.twig b/themes/yunohost-docs/templates/docs.html.twig deleted file mode 100644 index d95acaa4..00000000 --- a/themes/yunohost-docs/templates/docs.html.twig +++ /dev/null @@ -1,20 +0,0 @@ -{% set body_classes = body_classes ~ ' ' ~ page.header.body_classes %} -{% extends 'partials/base.html.twig' %} - -{% set tags = page.taxonomy.tag %} -{% if tags %} - {% set progress = page.collection({'items':{'@taxonomy':{'category': 'docs', 'tag': tags}},'order': {'by': 'default', 'dir': 'asc'}}) %} -{% else %} - {% set progress = page.collection({'items':{'@taxonomy':{'category': 'docs'}},'order': {'by': 'default', 'dir': 'asc'}}) %} -{% endif %} - -{% block content %} - {% include 'partials/toc.html.twig' %} - - {% include 'partials/page.html.twig' %} - - {% if github_config.note == true %} - {% include 'partials/github-note.html.twig' %} - {% endif %} - -{% endblock %} diff --git a/themes/yunohost-docs/templates/partials/base.html.twig b/themes/yunohost-docs/templates/partials/base.html.twig index dadb566b..e8076b09 100644 --- a/themes/yunohost-docs/templates/partials/base.html.twig +++ b/themes/yunohost-docs/templates/partials/base.html.twig @@ -22,11 +22,13 @@ {% do assets.addCss('theme://css-compiled/spectre'~compress) %} {% do assets.addCss('theme://css-compiled/theme'~compress) %} {% do assets.addCss('theme://css/custom.css') %} + {% do assets.addCss('theme://css/darkMode.css') %} {% endblock %} {% block javascripts %} {% do assets.addJs('jquery', 101) %} {% do assets.addJs('theme://js/learn4.js', { group:'bottom' }) %} + {% do assets.addJs('theme://js/darkMode.js', { group:'bottom' }) %} {% endblock %} {% block assets deferred %} diff --git a/themes/yunohost-docs/templates/partials/breadcrumbs.html.twig b/themes/yunohost-docs/templates/partials/breadcrumbs.html.twig deleted file mode 100644 index 2a2241f6..00000000 --- a/themes/yunohost-docs/templates/partials/breadcrumbs.html.twig +++ /dev/null @@ -1,38 +0,0 @@ -{% set crumbs = breadcrumbs.get() %} -{% set breadcrumbs_config = config.plugins.breadcrumbs %} -{% set divider = breadcrumbs_config.icon_divider_classes %} - -{% if crumbs|length > 1 or breadcrumbs_config.show_all %} -<div id="breadcrumbs" itemscope itemtype="http://schema.org/BreadcrumbList"> - {% if breadcrumbs_config.icon_home %} - <a href="{{ url("/") }}"><i class="{{ breadcrumbs_config.icon_home }}"></a></i><i class="{{ divider }}"></i> - {% endif %} - {% for crumb in crumbs %} - <span itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"> - {% if not loop.last %} - {% if crumb.routable %} - <a itemscope itemtype="http://schema.org/Thing" itemprop="item" href="{{ crumb.url }}" itemid="{{ crumb.url }}"> - <span itemprop="name">{{ crumb.menu }}</span> - </a> - {% else %} - <span itemscope itemtype="http://schema.org/Thing" itemprop="item" itemid="{{ crumb.url }}"> - <span itemprop="name">{{ crumb.menu }}</span> - </span> - {% endif %} - <i class="{{ divider }}"></i> - {% else %} - {% if breadcrumbs_config.link_trailing %} - <a itemscope itemtype="http://schema.org/Thing" itemprop="item" href="{{ crumb.url }}" itemid="{{ crumb.url }}"> - <span itemprop="name">{{ crumb.menu }}</span> - </a> - {% else %} - <span itemscope itemtype="http://schema.org/Thing" itemprop="item" itemid="{{ crumb.url }}"> - <span itemprop="name">{{ crumb.menu }}</span> - </span> - {% endif %} - {% endif %} - <meta itemprop="position" content="{{ loop.index }}" /> - </span> - {% endfor %} -</div> -{% endif %} diff --git a/themes/yunohost-docs/templates/partials/sidebar.html.twig b/themes/yunohost-docs/templates/partials/sidebar.html.twig index e75d7ef8..31f3f570 100644 --- a/themes/yunohost-docs/templates/partials/sidebar.html.twig +++ b/themes/yunohost-docs/templates/partials/sidebar.html.twig @@ -2,7 +2,7 @@ <div class="learn-brand"> <div id="header"> - <a id="logo" href="{{ theme_config.home_url ?: base_url_absolute }}">{% include 'partials/logo.html.twig' %}</a> + <a id="logo" href="{{ base_url_absolute }}">{% include 'partials/logo.html.twig' %}</a> <div class="searchbox"> <label for="search-by"><i class="fa fa-search"></i></label> <input id="search-by" type="text" placeholder="{{ 'THEME_LEARN4_SEARCH_DOCUMENTATION'|t }}" @@ -17,24 +17,14 @@ </div> <div class="learn-nav" data-simplebar> <div class="highlightable"> - {% if theme_config.top_level_version %} - {% for slug, ver in pages.children %} - {{ macros.version(ver) }} - <ul id="{{ slug }}" class="topics"> - {% if ver.activeChild or ver.active %} - {{ macros.loop(ver, '') }} - {% endif %} - </ul> - {% endfor %} - {% else %} - <ul class="topics"> - {% if theme_config.root_page %} - {{ macros.loop(page.find(theme_config.root_page), '') }} - {% else %} - {{ macros.loop(pages, '') }} - {% endif %} + {% for slug, ver in pages.children.visible %} + {{ macros.version(ver) }} + <ul id="{{ slug }}" class="topics"> + {% if ver.activeChild or ver.active %} + {{ macros.loop(ver, '') }} + {% endif %} </ul> - {% endif %} + {% endfor %} <hr /> <a class="side-tools padding" href="#" data-clear-history-toggle>