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/page_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/page_toc.html')
-rw-r--r-- | templates/partials/doc/page_toc.html | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/templates/partials/doc/page_toc.html b/templates/partials/doc/page_toc.html new file mode 100644 index 0000000..172e0ce --- /dev/null +++ b/templates/partials/doc/page_toc.html @@ -0,0 +1,33 @@ +<aside class="hidden 2xl:block fixed right-0 bottom-1/2 transform translate-y-1/2 col-span-1 h-auto bg-gray-100 rounded-l-lg shadow-inner"> + {% if page.toc %} + <div class="w-full flex items-center justify-center py-1.5 bg-gray-200 rounded-tl-lg"> + <span class="uppercase tracking-wide text-xs text-garage-gray">Page content</span> + </div> + <ol class="text-sm space-y-0.5 py-0.5 px-8 py-3 list-decimal"> + {% for h1 in page.toc %} + <li> + <a href="{{ h1.permalink | safe }}" class="font-semibold bg-gradient-to-r from-garage-gray to-garage-orange text-transparent bg-clip-text transition-all hover:text-garage-orange">{{ h1.title }}</a> + {% if h1.children %} + <ul class="space-y-0.5 py-0.5"> + {% for h2 in h1.children %} + <li> + <a + href="{{ h2.permalink | safe }}" + id="link-{{ h2.id | safe }}" + class="toc text-gray-700 hover:text-garage-orange"> + {{ h2.title }} + </a> + </li> + {% endfor %} + </ul> + {% endif %} + </li> + {% endfor %} + </ol> + {% endif %} + <div class="bg-gray-100 rounded-bl-lg"> + {% if page.earlier or page.later or page.lighter or page.heavier %} + {% include "partials/doc/pagination.html" %} + {% endif %} + </div> +</aside>
\ No newline at end of file |