Skip to content

Commit 17e6d16

Browse files
committed
WIP improve sphinx theme
collapsable and sticky navigation. TODO * figure out CORS issue * why is the intendation not matching?
1 parent b1cfbe0 commit 17e6d16

File tree

15 files changed

+625
-40
lines changed

15 files changed

+625
-40
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{%- extends "layout.html" %}
2+
{% set title = _('Tree') %}
3+
{% block body %}
4+
<h1>{{ _('Tree') }}</h1>
5+
{{ toctree(includehidden=True, collapse=False, maxdepth=-1) }}
6+
{% endblock %}

doc/sphinx/source/conf.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@
5050

5151
html_theme = "neo4j"
5252
html_theme_path = ["themes"]
53+
html_theme_options = {
54+
"sidebar_includehidden": True,
55+
"sidebar_collapse": True,
56+
}
5357

5458

5559
# 01-nav.js is a copy of a js file of the same name that is included in the docs-ui bundle
@@ -59,6 +63,11 @@ def setup(app): # type: ignore
5963
app.add_js_file("js/deprecated.js", loading_method="defer")
6064

6165

66+
# Additional templates that should be rendered to pages, maps page names to
67+
# template names.
68+
html_additional_pages = {"gentree": "gentree.html"}
69+
70+
6271
rst_epilog = """
6372
.. |api-version| replace:: {versionnum}
6473
""".format(
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<div id="indexlinkbox">
2+
<h3 id="indexlinklabel">{{ _('Index') }}</h3>
3+
4+
<div class="indexlinkwrapper nav-menu">
5+
<ul>
6+
<li class="toctree-l1">
7+
<a href="{{ pathto('genindex')|e }}" class="indexlink genindex">
8+
{{ _('Index') }}
9+
</a>
10+
</li>
11+
</ul>
12+
</div>
13+
</div>

doc/sphinx/source/themes/neo4j/navigation.html

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,3 @@
99
</div>
1010
</aside>
1111
</div>
12-
13-
14-

0 commit comments

Comments
 (0)