Skip to content

Commit

Permalink
Fix(docs): Remove useless duplicates from menu.
Browse files Browse the repository at this point in the history
  • Loading branch information
onegreyonewhite committed Nov 8, 2024
1 parent 358db1a commit 93571b8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
3 changes: 3 additions & 0 deletions docs_theme/css/default.css
Original file line number Diff line number Diff line change
Expand Up @@ -453,3 +453,6 @@ ul.sponsor {
padding: 0.4rem 0.6rem;
}

.doc.doc-object.doc-class .doc.doc-heading {
display: none;
}
18 changes: 11 additions & 7 deletions docs_theme/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,19 @@ <h3 id="myModalLabel">Documentation search</h3>
{% endif %}

{% for toc_item in page.toc %}
<li class="{% if page and not page.is_homepage %}main{% endif %}">
<a href="{{ toc_item.url }}">{{ toc_item.title }}</a>
</li>

{% for toc_item in toc_item.children %}
<li>
{% if not toc_item.url.startswith('#rest_framework.') %}
<li class="{% if page and not page.is_homepage %}main{% endif %}">
<a href="{{ toc_item.url }}">{{ toc_item.title }}</a>
</li>
{% endfor %}

{% for child in toc_item.children %}
{% if not child.url.startswith('#rest_framework.') %}
<li>
<a href="{{ child.url }}">{{ child.title }}</a>
</li>
{% endif %}
{% endfor %}
{% endif %}
{% endfor %}

<div class="promo">
Expand Down

0 comments on commit 93571b8

Please sign in to comment.