Skip to content

Commit

Permalink
Bring back navigation items to database drivers removed with 490ac7e
Browse files Browse the repository at this point in the history
  • Loading branch information
amotl committed Aug 29, 2023
1 parent 1151cb3 commit eed8ee4
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 1 deletion.
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

0 comments on commit eed8ee4

Please sign in to comment.