Skip to content

Commit 36c97e3

Browse files
committed
fix: update side nav
1 parent 2e45c1e commit 36c97e3

File tree

1 file changed

+24
-19
lines changed

1 file changed

+24
-19
lines changed

docs_theme/main.html

+24-19
Original file line numberDiff line numberDiff line change
@@ -67,30 +67,35 @@
6767
<div class="row">
6868
<div class="col-3">
6969
<div id="table-of-contents">
70-
<!-- <ul class="nav nav-list side-nav well sidebar-nav-fixed">
71-
{% if page and page.is_homepage %}
72-
<li class="main">
73-
<a href="#">Django REST framework</a>
74-
</li>
75-
{% endif %}
76-
77-
{% for toc_item in page.toc %}
78-
<li class="{% if page and not page.is_homepage %}main{% endif %}">
79-
<a href="{{ toc_item.url }}">{{ toc_item.title }}</a>
80-
</li>
70+
<ul class="nav flex-column">
71+
{% if page and page.is_homepage %}
72+
<a
73+
href="#"
74+
class="nav-link {% if page and page.is_homepage %} fw-bold {% endif %}"
75+
>Django REST framework</a
76+
>
77+
{% endif %} {% for toc_item in page.toc %}
78+
<a
79+
href="{{ toc_item.url }}"
80+
class="nav-link {% if page and not page.is_homepage %}main{% endif %}"
81+
>{{ toc_item.title }}</a
82+
>
8183

8284
{% for toc_item in toc_item.children %}
83-
<li>
84-
<a href="{{ toc_item.url }}">{{ toc_item.title }}</a>
85-
</li>
86-
{% endfor %}
87-
{% endfor %}
85+
<li>
86+
<a class="nav-link" href="{{ toc_item.url }}"
87+
>{{ toc_item.title }}</a
88+
>
89+
</li>
90+
{% endfor %} {% endfor %}
8891

8992
<div class="promo">
90-
{% if page.toc %}<hr/>{% endif %}
91-
<div id="sidebarInclude">
93+
{% if page.toc %}
94+
<hr />
95+
{% endif %}
9296
</div>
93-
</ul> -->
97+
<div id="sidebarInclude"></div>
98+
</ul>
9499
</div>
95100
</div>
96101

0 commit comments

Comments
 (0)