on master help sign in
Docs navigation opens drawer, bolds current page
e99811bMatilde Park
templates/partials/navigation-docs.html+29−6
@@ -20,31 +20,54 @@
20 {% set index = get_section(path="docs/_index.md") %}
20 {% set index = get_section(path="docs/_index.md") %}
21 {% for s in index.subsections %}
21 {% for s in index.subsections %}
22 {% set subsection = get_section(path=s) %}
22 {% set subsection = get_section(path=s) %}
23+ <details {% if current_url is containing(subsection.path) %}
24+ open
25+ {% endif %}
23− <details class="mt1">
26+ class="mt1">
24 <summary>{{ subsection.title }}</summary>
27 <summary>{{ subsection.title }}</summary>
25 {% if subsection.pages %}
28 {% if subsection.pages %}
26 {% for page in subsection.pages %}
29 {% for page in subsection.pages %}
27 <li class="ml2 mt1">
30 <li class="ml2 mt1">
31+ <a
32+ {% if current_url == page.permalink %}
33+ class="fw6"
34+ {% endif %}
28− <a href="{{ page.permalink}}">
35+ href="{{ page.permalink }}">
29 {{ page.title }}
36 {{ page.title }}
30 </a>
37 </a>
31 </li>
38 </li>
32 {% endfor %}
39 {% endfor %}
33 {% for y in subsection.subsections %}
40 {% for y in subsection.subsections %}
34 {% set subsubsection = get_section(path=y) %}
41 {% set subsubsection = get_section(path=y) %}
42+ <details {% if current_url is containing(subsubsection.path) %}
43+ open
44+ {% endif %}
35− <details class="ml2 mt1">
45+ class="ml2 mt1">
36 <summary>{{ subsubsection.title }}</summary>
46 <summary>{{ subsubsection.title }}</summary>
37 {% if subsubsection.pages %}
47 {% if subsubsection.pages %}
38 {% for page in subsubsection.pages %}
48 {% for page in subsubsection.pages %}
49+ <li class="ml2 mt1">
50+ <a
51+ {% if current_url == page.permalink %}
52+ class="fw6"
53+ {% endif %}
39− <li class="ml2 mt1"><a href="{{ page.permalink }}">{{ page.title }}</a></li>
54+ href="{{ page.permalink }}">{{ page.title }}</a></li>
40 {% endfor %}
55 {% endfor %}
41 {% for x in subsubsection.subsections %}
56 {% for x in subsubsection.subsections %}
42 {% set subsubsubsection = get_section(path=x) %}
57 {% set subsubsubsection = get_section(path=x) %}
58+ <details {% if current_url is containing(subsubsubsection.path) %}
59+ open
60+ {% endif %}
43− <details class="ml2 mt1">
61+ class="ml2 mt1">
44 <summary>{{ subsubsubsection.title }}</summary>
62 <summary>{{ subsubsubsection.title }}</summary>
45 {% if subsubsubsection.pages %}
63 {% if subsubsubsection.pages %}
46 {% for page in subsubsubsection.pages %}
64 {% for page in subsubsubsection.pages %}
65+ <li class="ml2 mt1">
66+ <a
67+ {% if current_url == page.permalink %}
68+ class="fw6"
69+ {% endif %}
47− <li class="ml2 mt1"><a href="{{ page.permalink }}">{{ page.title }}</a></li>
70+ href="{{ page.permalink }}">{{ page.title }}</a></li>
48 {% endfor %}
71 {% endfor %}
49 {% endif %}
72 {% endif %}
50 </details>
73 </details>