diff options
author | sptaule <lecas83@gmail.com> | 2022-01-26 14:44:47 +0100 |
---|---|---|
committer | sptaule <lecas83@gmail.com> | 2022-01-26 14:44:47 +0100 |
commit | e0977c983abff89ac3a9e37f616399dc0b6c61c7 (patch) | |
tree | 51aec127e129ad291063d745904bbe43d906a44d /templates/partials/doc/global_toc.html | |
parent | ee4d6a01e16ac53fa3e48340a47455281d5f6bc0 (diff) | |
download | garagehq.deuxfleurs.fr-e0977c983abff89ac3a9e37f616399dc0b6c61c7.tar.gz garagehq.deuxfleurs.fr-e0977c983abff89ac3a9e37f616399dc0b6c61c7.zip |
Fix doc links & added noJS support for the doc
Diffstat (limited to 'templates/partials/doc/global_toc.html')
-rw-r--r-- | templates/partials/doc/global_toc.html | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/templates/partials/doc/global_toc.html b/templates/partials/doc/global_toc.html new file mode 100644 index 0000000..ebad287 --- /dev/null +++ b/templates/partials/doc/global_toc.html @@ -0,0 +1,34 @@ +<aside id="global_toc" class="col-span-1 h-max bg-gray-100 shadow-inner border-r border-t border-gray-200"> + {% if section.subsections %} + <ul class="space-y-2 py-0.5 px-6 py-3 list-none"> + {% for subsec in section.subsections %} + {% set h1 = get_section(path=subsec) %} + <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"> + {{ h1.title }} + </a> + {% if h1.pages %} + <input type="checkbox" id="btn-{{ h1.title | slugify }}" class="deploySubMenu"/> + <label for="btn-{{ h1.title | slugify }}" class="absolute top-0 right-0.5 bg-garage-orange bg-opacity-10 border-l border-garage-orange border-opacity-20 cursor-pointer inline-block px-3 py-1" style="margin-top:0.08rem;"> + <svg class="arrow w-6 h-6 text-garage-gray group-hover:text-garage-orange transform rotate-90" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"></path></svg> + </label> + <ul class="subMenu border-l border-garage-orange space-y-0.5"> + {% for h2 in h1.pages %} + <li> + <a + href="{{ h2.permalink | safe }}" + class="docPage block pl-2 py-1 border-l-4 rounded-r border-opacity-0 hover:bg-garage-orange hover:bg-opacity-20 + {% if current_path == h2.path %} activePage text-garage-orange font-semibold border-opacity-100 border-garage-orange {% endif %}"> + {{ h2.title }} + </a> + </li> + {% endfor %} + </ul> + {% endif %} + </li> + {% endfor %} + </ul> + {% endif %} +</aside>
\ No newline at end of file |