Fix(docs): Remove useless duplicates from menu.

This commit is contained in:
Sergei Kliuikov 2024-11-07 21:28:55 -08:00
parent 358db1a811
commit 93571b8e7d
2 changed files with 14 additions and 7 deletions

View File

@ -453,3 +453,6 @@ ul.sponsor {
padding: 0.4rem 0.6rem; padding: 0.4rem 0.6rem;
} }
.doc.doc-object.doc-class .doc.doc-heading {
display: none;
}

View File

@ -86,15 +86,19 @@
{% endif %} {% endif %}
{% for toc_item in page.toc %} {% for toc_item in page.toc %}
{% if not toc_item.url.startswith('#rest_framework.') %}
<li class="{% if page and not page.is_homepage %}main{% endif %}"> <li class="{% if page and not page.is_homepage %}main{% endif %}">
<a href="{{ toc_item.url }}">{{ toc_item.title }}</a> <a href="{{ toc_item.url }}">{{ toc_item.title }}</a>
</li> </li>
{% for toc_item in toc_item.children %} {% for child in toc_item.children %}
{% if not child.url.startswith('#rest_framework.') %}
<li> <li>
<a href="{{ toc_item.url }}">{{ toc_item.title }}</a> <a href="{{ child.url }}">{{ child.title }}</a>
</li> </li>
{% endif %}
{% endfor %} {% endfor %}
{% endif %}
{% endfor %} {% endfor %}
<div class="promo"> <div class="promo">