Skip to content
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

Bring back lost navigation items to database drivers #429

Merged
merged 1 commit into from
Aug 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Unreleased

- Fix CSS: Remove font size of blockquote override
- Improve version chooser: Remove ambiguous link to master doc.
- Bring back lost navigation items to database drivers


2023/08/11 0.29.2
Expand Down
51 changes: 50 additions & 1 deletion src/crate/theme/rtd/crate/sidebartoc.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,60 @@
<li class="navleft-item"><a href="/docs/crate/crash/">Crash CLI</a></li>
{% endif %}

{% if project == 'CrateDB: Clients and Tools' %}
{%
set driver_projects = [
'CrateDB: Clients and Tools',
'CrateDB JDBC', 'CrateDB DBAL', 'CrateDB PDO', 'CrateDB Python', 'CrateDB Npgsql'
]
%}
{% if project in driver_projects %}
<li class="current">
<a class="current-active" href="{{ pathto(master_doc) }}">Drivers and Integrations</a>
{{ toctree(maxdepth=3|toint, collapse=True, includehidden=theme_globaltoc_includehidden|tobool) }}
</li>

<!-- Section C. -->
{% if project == 'CrateDB JDBC' %}
<li class="current border-top">
<a class="current-active" href="{{ pathto(master_doc) }}">JDBC</a>
{{ toctree(maxdepth=1|toint, collapse=False, includehidden=theme_globaltoc_includehidden|tobool) }}
</li>
{% else %}
<li class="navleft-item border-top"><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, 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, 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, collapse=False, includehidden=theme_globaltoc_includehidden|tobool) }}
</li>
{% else %}
<li class="navleft-item"><a href="/docs/python/">Python</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, collapse=False, includehidden=theme_globaltoc_includehidden|tobool) }}
</li>
{% else %}
<li class="navleft-item"><a href="/docs/npgsql/">.NET Npgsql</a></li>
{% endif %}

{% else %}
<li class="navleft-item"><a href="/docs/crate/clients-tools/">Drivers and Integrations</a></li>
{% endif %}
Expand Down