-
Notifications
You must be signed in to change notification settings - Fork 5
TOC expand-collapse icons - take 2 #664
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
9b70eb8
Update docs test
bmunkholm 90bf9ea
Ignore temp folders starting with _
bmunkholm 8b5b761
Introduce Furo TOC navigation with icons and individual section states
bmunkholm 65ea487
Update changes.rst
bmunkholm 4dac732
Update src/crate/theme/rtd/crate/static/js/custom.js
bmunkholm 8060996
Update src/crate/theme/rtd/crate/static/js/custom.js
bmunkholm 7b53501
Update docs/tests/index.rst
bmunkholm c980c1d
Update docs/tests/section1/index.rst
bmunkholm e674c25
Update src/crate/theme/rtd/sidebartoc.py
bmunkholm 3318b51
minor refactor
bmunkholm File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,3 +21,4 @@ dist | |
| eggs | ||
| node_modules* | ||
| yarn-error.log | ||
| _* | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| .. _tests: | ||
|
|
||
| ######################### | ||
| Navigation bar test pages | ||
| ######################### | ||
|
|
||
| 1. Clicking the title should expand the section and navigate to the section page | ||
| 2. Clicking just the icon should expand but not navigate to the section | ||
| 3. Clicking just the icon for an expanded section should collapse that section and leave other expanded sections expanded | ||
| 4. Hovering the mouse over an icon should show a fade background behind the icon | ||
| 5. Hovering the mouse over the title should show a fade background behind the title and the icon | ||
| 6. The current page should be highlighted in the navigation bar as the user navigates through the pages below. | ||
|
|
||
|
|
||
| **Pages:** | ||
|
|
||
| .. toctree:: | ||
| :titlesonly: | ||
| :glob: | ||
|
|
||
| section1/index | ||
| section2/index | ||
| * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| ######### | ||
| Section 1 | ||
| ######### | ||
|
|
||
| .. toctree:: | ||
| :maxdepth: 1 | ||
|
|
||
| subpage1 | ||
| subpage2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| ########## | ||
| Subpage 1 | ||
| ########## | ||
|
|
||
| Test subpage 1. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| ########## | ||
| Subpage 2 | ||
| ########## | ||
|
|
||
| Test subpage 2. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| ############ | ||
| Section 2 | ||
| ############ | ||
|
|
||
| .. toctree:: | ||
| :maxdepth: 1 | ||
|
|
||
| section21/index | ||
| subpage1 | ||
| subpage2 | ||
|
|
||
| Hi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| ############ | ||
| Section 2.1 | ||
| ############ | ||
|
|
||
| .. toctree:: | ||
| :maxdepth: 1 | ||
|
|
||
| subpage1 | ||
| subpage2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| ########## | ||
| Subpage 1 | ||
| ########## | ||
|
|
||
| Test subpage 1. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| ########## | ||
| Subpage 2 | ||
| ########## | ||
|
|
||
| Test subpage 2. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| ########## | ||
| Subpage 1 | ||
| ########## | ||
|
|
||
| Test subpage 1. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| ########## | ||
| Subpage 2 | ||
| ########## | ||
|
|
||
| Test subpage 2. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,171 +1,2 @@ | ||
| <ul class="toctree nav nav-list"> | ||
|
|
||
| {% if project == 'SQL 99' %} | ||
|
|
||
| <li class="current"> | ||
| <a class="current-active" href="{{ pathto(master_doc) }}">SQL-99 Complete, Really</a> | ||
| {{ toctree(maxdepth=2|toint, collapse=False, includehidden=theme_globaltoc_includehidden|tobool) }} | ||
| </li> | ||
|
|
||
| {% else %} | ||
|
|
||
| <!-- Search. --> | ||
| <li> | ||
| <div class="search-link"> | ||
| <div id="docsearch" style="min-height: 36px; margin-bottom: 20px;"></div> | ||
| </div> | ||
| </li> | ||
|
|
||
| <!-- Section A: --> | ||
| {% if project == 'CrateDB: Guide' %} | ||
| <!-- Show root index page in the Guide project selected if needed --> | ||
| {% if pagename == 'index' %} | ||
| <li class="current"> | ||
| <a class="current-active" href="{{ pathto(master_doc) }}">Overview</a> | ||
| </li> | ||
| {% else %} | ||
| <li class="navleft-item"><a href="{{ pathto(master_doc) }}">Overview</a></li> | ||
| {% endif %} | ||
| <!-- Show all remaining TOC entries in the root --> | ||
| <li class="current toctree-l0"> | ||
| {{ toctree(maxdepth=-1|toint, titles_only=True, collapse=True, includehidden=theme_globaltoc_includehidden|tobool) }} | ||
| </li> | ||
| {% else %} | ||
| <!-- Show Guide sections as links in other projects --> | ||
| <li class="navleft-item"><a href="/docs/guide/">Overview</a></li> | ||
| <li class="navleft-item"><a href="/docs/guide/start/">Getting Started</a></li> | ||
| <li class="navleft-item"><a href="/docs/guide/handbook/">Handbook</a></li> | ||
| {% endif %} | ||
|
|
||
| {% if project == 'CrateDB Cloud' %} | ||
| <li class="current"> | ||
| <a class="current-active" href="{{ pathto(master_doc) }}">CrateDB Cloud</a> | ||
| {{ toctree(maxdepth=-1|toint, titles_only=True, collapse=True, includehidden=theme_globaltoc_includehidden|tobool) }} | ||
| </li> | ||
| {% else %} | ||
| <li class="navleft-item"><a href="/docs/cloud/">CrateDB Cloud</a></li> | ||
| {% endif %} | ||
|
|
||
| {% if project == 'CrateDB: Reference' %} | ||
| <li class="current"> | ||
| <a class="current-active" href="{{ pathto(master_doc) }}">Reference Manual</a> | ||
| {{ toctree(maxdepth=-1|toint, titles_only=True, collapse=True, includehidden=theme_globaltoc_includehidden|tobool) }} | ||
| </li> | ||
| {% else %} | ||
| <li class="navleft-item"><a href="/docs/crate/reference/">Reference Manual</a></li> | ||
| {% endif %} | ||
|
|
||
| <!-- Section B. --> | ||
| {% if project == 'CrateDB: Admin UI' %} | ||
| <li class="current border-top"> | ||
| <a class="current-active" href="{{ pathto(master_doc) }}">Admin UI</a> | ||
| {{ toctree(maxdepth=-1|toint, titles_only=True, collapse=True, includehidden=theme_globaltoc_includehidden|tobool) }} | ||
| </li> | ||
| {% else %} | ||
| <li class="navleft-item border-top"><a href="/docs/crate/admin-ui/">Admin UI</a></li> | ||
| {% endif %} | ||
|
|
||
| {% if project == 'CrateDB: Crash CLI' %} | ||
| <li class="current"> | ||
| <a class="current-active" href="{{ pathto(master_doc) }}">CrateDB CLI</a> | ||
| {{ toctree(maxdepth=-1|toint, titles_only=True, collapse=False, includehidden=theme_globaltoc_includehidden|tobool) }} | ||
| </li> | ||
| {% else %} | ||
| <li class="navleft-item"><a href="/docs/crate/crash/">CrateDB CLI</a></li> | ||
| {% endif %} | ||
|
|
||
| {% if project == 'CrateDB Cloud: Croud CLI' %} | ||
| <li class="current"> | ||
| <a class="current-active" href="{{ pathto(master_doc) }}">Cloud CLI</a> | ||
| {{ toctree(maxdepth=-1|toint, titles_only=True, collapse=False, includehidden=theme_globaltoc_includehidden|tobool) }} | ||
| </li> | ||
| {% else %} | ||
| <li class="navleft-item"><a href="/docs/cloud/cli/">Cloud CLI</a></li> | ||
| {% endif %} | ||
|
|
||
| <li class="navleft-item"> | ||
| <a href="/docs/guide/connect/drivers.html">Database Drivers</a> | ||
| </li> | ||
| {% | ||
| set driver_projects = [ | ||
| 'CrateDB JDBC', 'CrateDB DBAL', 'CrateDB PDO', 'CrateDB Python', 'SQLAlchemy Dialect', 'CrateDB Npgsql' | ||
| ] | ||
| %} | ||
| {% if project in driver_projects or (project == 'CrateDB: Guide' and pagename.startswith('connect')) %} | ||
| <li> | ||
| <ul> | ||
| <!-- Section C. --> | ||
| {% if project == 'CrateDB JDBC' %} | ||
| <li class="current"> | ||
| <a class="current-active" href="{{ pathto(master_doc) }}">JDBC</a> | ||
| {{ toctree(maxdepth=-1|toint, titles_only=True, collapse=False, includehidden=theme_globaltoc_includehidden|tobool) }} | ||
| </li> | ||
| {% else %} | ||
| <li class="navleft-item"><a href="/docs/jdbc/">JDBC</a></li> | ||
| {% endif %} | ||
| {% if project == 'CrateDB DBAL' %} | ||
| <li class="current"> | ||
| <a class="current-active" href="{{ pathto(master_doc) }}">PHP DBAL</a> | ||
| {{ toctree(maxdepth=-1|toint, titles_only=True, collapse=False, includehidden=theme_globaltoc_includehidden|tobool) }} | ||
| </li> | ||
| {% else %} | ||
| <li class="navleft-item"><a href="/docs/dbal/">PHP DBAL</a></li> | ||
| {% endif %} | ||
| {% if project == 'CrateDB PDO' %} | ||
| <li class="current"> | ||
| <a class="current-active" href="{{ pathto(master_doc) }}">PHP PDO</a> | ||
| {{ toctree(maxdepth=-1|toint, titles_only=True, collapse=False, includehidden=theme_globaltoc_includehidden|tobool) }} | ||
| </li> | ||
| {% else %} | ||
| <li class="navleft-item"><a href="/docs/pdo/">PHP PDO</a></li> | ||
| {% endif %} | ||
| {% if project == 'CrateDB Python' %} | ||
| <li class="current"> | ||
| <a class="current-active" href="{{ pathto(master_doc) }}">Python</a> | ||
| {{ toctree(maxdepth=-1|toint, titles_only=True, collapse=False, includehidden=theme_globaltoc_includehidden|tobool) }} | ||
| </li> | ||
| {% else %} | ||
| <li class="navleft-item"><a href="/docs/python/">Python</a></li> | ||
| {% endif %} | ||
| {% if project == 'SQLAlchemy Dialect' %} | ||
| <li class="current"> | ||
| <a class="current-active" href="{{ pathto(master_doc) }}">SQLAlchemy</a> | ||
| {{ toctree(maxdepth=-1|toint, titles_only=True, collapse=False, includehidden=theme_globaltoc_includehidden|tobool) }} | ||
| </li> | ||
| {% else %} | ||
| <li class="navleft-item"><a href="/docs/sqlalchemy-cratedb/">SQLAlchemy</a></li> | ||
| {% endif %} | ||
| {% if project == 'CrateDB Npgsql' %} | ||
| <li class="current"> | ||
| <a class="current-active" href="{{ pathto(master_doc) }}">.NET Npgsql</a> | ||
| {{ toctree(maxdepth=-1|toint, titles_only=True, collapse=False, includehidden=theme_globaltoc_includehidden|tobool) }} | ||
| </li> | ||
| {% else %} | ||
| <li class="navleft-item"><a href="/docs/npgsql/">.NET Npgsql</a></li> | ||
| {% endif %} | ||
| </ul> | ||
| </li> | ||
| {% endif %} | ||
|
|
||
| <!-- Section D. --> | ||
| <li class="navleft-item border-top"><a target="_blank" href="/support/">Support</a></li> | ||
| <li class="navleft-item"><a target="_blank" href="https://community.cratedb.com/">Community</a></li> | ||
|
|
||
| <!-- Section E. --> | ||
| {% if project == 'CrateDB documentation theme' %} | ||
| <li class="current border-top"> | ||
| <a class="current-active" href="{{ pathto(master_doc) }}">Documentation theme</a> | ||
| {{ toctree(maxdepth=-1|toint, titles_only=True, collapse=True, includehidden=theme_globaltoc_includehidden|tobool) }} | ||
| </li> | ||
| {% endif %} | ||
|
|
||
| {% if project == 'Doing Docs' %} | ||
| <li class="current"> | ||
| <a class="current-active" href="{{ pathto(master_doc) }}">Doing Docs at CrateDB</a> | ||
| {{ toctree(maxdepth=-1|toint, titles_only=True, collapse=False, includehidden=theme_globaltoc_includehidden|tobool) }} | ||
| </li> | ||
| {% endif %} | ||
|
|
||
| {% endif %} | ||
|
|
||
| </ul> | ||
| {# Enhanced navigation generated by Sphinx extension using Furo's navigation enhancer #} | ||
| {{ crate_navigation_tree }} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.