mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-12-01 05:54:01 +03:00
92 lines
2.8 KiB
HTML
92 lines
2.8 KiB
HTML
<!-- New Navbar -->
|
|
<nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top">
|
|
<div class="container">
|
|
<a class="navbar-brand" href="https://www.django-rest-framework.org/"
|
|
>Django REST framework</a
|
|
>
|
|
|
|
<button
|
|
class="navbar-toggler"
|
|
type="button"
|
|
data-bs-toggle="collapse"
|
|
data-bs-target="#navbarSupportedContent"
|
|
aria-controls="navbarSupportedContent"
|
|
aria-expanded="false"
|
|
aria-label="Toggle navigation"
|
|
>
|
|
<span class="navbar-toggler-icon"></span>
|
|
</button>
|
|
|
|
<!-- Main navigation -->
|
|
|
|
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
|
{% if nav|length>1 %}
|
|
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
|
|
{% for nav_item in nav %} {% if nav_item.children %}
|
|
<li class="nav-item dropdown">
|
|
<a
|
|
class="nav-link dropdown-toggle"
|
|
href="#"
|
|
role="button"
|
|
data-bs-toggle="dropdown"
|
|
aria-expanded="false"
|
|
>
|
|
{{ nav_item.title }}
|
|
</a>
|
|
<ul class="dropdown-menu">
|
|
{% for nav_item in nav_item.children %}
|
|
<li>
|
|
<!-- prettier-ignore -->
|
|
<a {% if nav_item.active %} class="dropdown-item active" {% else %} class="dropdown-item" {% endif %}
|
|
href="{{ nav_item.url|url }}">{{ nav_item.title }}</a>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
</li>
|
|
|
|
{% else %}
|
|
<li class="nav-item">
|
|
<!-- prettier-ignore -->
|
|
<a {% if nav_item.active %} class="nav-link active" {% else %} class="nav-link" {% endif %}
|
|
aria-current="page" href="{{ nav_item.url|url }}">{{ nav_item.title }}</a>
|
|
</li>
|
|
{% endif %} {% endfor %}
|
|
</ul>
|
|
{% endif %}
|
|
|
|
<div class="d-flex gap-2">
|
|
<button
|
|
type="button"
|
|
id="search_modal_show"
|
|
class="btn btn-sm btn-secondary"
|
|
href="#mkdocs_search_modal"
|
|
data-bs-toggle="modal"
|
|
data-bs-target="#mkdocs_search_modal"
|
|
>
|
|
Search
|
|
</button>
|
|
<!-- prettier-ignore -->
|
|
<a
|
|
{% if page.previous_page %}href="{{ page.previous_page.url|url }}"{% endif %}
|
|
{% if not page.previous_page %}disabled{% endif %}
|
|
class="btn btn-sm btn-secondary"
|
|
>Previous</a>
|
|
|
|
<!-- prettier-ignore -->
|
|
<a
|
|
{% if page.next_page %}href="{{ page.next_page.url|url }}"{% endif %}
|
|
{% if not page.next_page %}disabled{% endif %}
|
|
class="btn btn-sm btn-secondary"
|
|
>Next</a>
|
|
|
|
<!-- prettier-ignore -->
|
|
<a
|
|
class="btn btn-primary btn-sm"
|
|
href="https://github.com/encode/django-rest-framework/tree/master"
|
|
>Github</a
|
|
>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</nav>
|