diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/documentation.html | 11 | ||||
-rw-r--r-- | templates/partials/doc/global_toc.html | 11 |
2 files changed, 15 insertions, 7 deletions
diff --git a/templates/documentation.html b/templates/documentation.html index 55a5c61..154df5f 100644 --- a/templates/documentation.html +++ b/templates/documentation.html @@ -1,11 +1,13 @@ {% extends 'base.html' %} {% block title %} - {{ config.title }} | {{ page.title }} + {{ config.title }} | {% if page %}{{ page.title }}{% else %}{{ section.title }}{% endif %} {% endblock %} {% block content %} - {% set section = get_section(path="documentation/_index.md") %} + {% if not page %} + {% set page = section %} + {% endif %} <section id="documentation-section" class="section overflow-x-hidden"> <div class="grid grid-cols-1 xl:grid-cols-5"> {% include "partials/doc/global_toc.html" %} @@ -45,7 +47,10 @@ {% endblock %} {% block custom_js %} + {% if not page %} + {% set page = section %} + {% endif %} {% if page.toc %} {% include "partials/doc/toc_script.html" %} {% endif %} -{% endblock %}
\ No newline at end of file +{% endblock %} diff --git a/templates/partials/doc/global_toc.html b/templates/partials/doc/global_toc.html index f739f49..277739c 100644 --- a/templates/partials/doc/global_toc.html +++ b/templates/partials/doc/global_toc.html @@ -1,3 +1,4 @@ + {% set section = get_section(path="documentation/_index.md") %} <aside id="global_toc" class="relative col-span-1 h-full bg-gray-100 shadow-inner border-r border-t border-gray-200"> {% if section.subsections %} <ul id="main-toc-menu" class="space-y-2 px-6 py-3 list-none"> @@ -6,8 +7,8 @@ {% for page in section.pages %} <a href="{{ page.permalink | safe }}" - class="docPage block pl-2 py-1 border-l rounded-r border-garage-orange hover:bg-garage-orange hover:bg-opacity-20 - {% if current_path == page.path %} activePage border-l-4 text-garage-orange font-semibold border-opacity-100 border-garage-orange {% endif %}"> + class="bg-white border border-garage-orange block p-1 rounded block font-semibold hover:bg-garage-orange hover:bg-opacity-20 + {% if current_path == page.path %} activePage text-garage-orange border-opacity-100 border-garage-orange {% endif %}"> {{ page.title }} </a> {% endfor %} @@ -18,7 +19,9 @@ <li class="relative"> <a href="{{ h1.permalink | safe }}" - class="bg-white border border-garage-orange block p-1 rounded-r rounded-tl font-semibold text-gray-800"> + class="bg-white border border-garage-orange block p-1 rounded-r rounded-tl font-semibold + {% if current_path == h1.path %} activePage text-garage-orange font-semibold border-opacity-100 border-garage-orange {% else %}text-gray-800{% endif %} + "> {{ h1.title }} </a> {% if h1.pages %} @@ -43,4 +46,4 @@ {% endfor %} </ul> {% endif %} -</aside>
\ No newline at end of file +</aside> |