Skip to content

Commit 21f478c

Browse files
committed
fix: improve navbar button, add icons
1 parent 45b0963 commit 21f478c

File tree

1 file changed

+60
-33
lines changed

1 file changed

+60
-33
lines changed

docs_theme/nav.html

Lines changed: 60 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,66 @@
55
>Django REST framework</a
66
>
77

8+
<div class="d-flex gap-2 order-lg-5">
9+
<button
10+
type="button"
11+
id="search_modal_show"
12+
class="btn btn-sm btn-secondary d-flex gap-1"
13+
href="#mkdocs_search_modal"
14+
data-bs-toggle="modal"
15+
data-bs-target="#mkdocs_search_modal"
16+
>
17+
<svg
18+
xmlns="http://www.w3.org/2000/svg"
19+
width="16"
20+
height="16"
21+
fill="currentColor"
22+
class="bi bi-search"
23+
viewBox="0 0 16 16"
24+
>
25+
<path
26+
d="M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001q.044.06.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1 1 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0"
27+
/>
28+
</svg>
29+
30+
<span class="d-none d-md-block">Search</span>
31+
</button>
32+
<!-- prettier-ignore -->
33+
<a
34+
{% if page.previous_page %}href="{{ page.previous_page.url|url }}"{% endif %}
35+
{% if not page.previous_page %}disabled{% endif %}
36+
class="btn btn-sm btn-secondary d-flex gap-1"
37+
>
38+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-left" viewBox="0 0 16 16">
39+
<path fill-rule="evenodd" d="M15 8a.5.5 0 0 0-.5-.5H2.707l3.147-3.146a.5.5 0 1 0-.708-.708l-4 4a.5.5 0 0 0 0 .708l4 4a.5.5 0 0 0 .708-.708L2.707 8.5H14.5A.5.5 0 0 0 15 8"/>
40+
</svg>
41+
42+
<span class="d-none d-md-block">Previous</span>
43+
</a>
44+
45+
<!-- prettier-ignore -->
46+
<a
47+
{% if page.next_page %}href="{{ page.next_page.url|url }}"{% endif %}
48+
{% if not page.next_page %}disabled{% endif %}
49+
class="btn btn-sm btn-secondary d-flex gap-1"
50+
>
51+
<span class="d-none d-md-block">Next</span>
52+
53+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-right" viewBox="0 0 16 16">
54+
<path fill-rule="evenodd" d="M1 8a.5.5 0 0 1 .5-.5h11.793l-3.147-3.146a.5.5 0 0 1 .708-.708l4 4a.5.5 0 0 1 0 .708l-4 4a.5.5 0 0 1-.708-.708L13.293 8.5H1.5A.5.5 0 0 1 1 8"/>
55+
</svg>
56+
</a>
57+
58+
<!-- prettier-ignore -->
59+
<a
60+
class="btn btn-primary btn-sm"
61+
href="https://github.com/encode/django-rest-framework/tree/master"
62+
>
63+
<span>Github</span>
64+
</a
65+
>
66+
</div>
67+
868
<button
969
class="navbar-toggler"
1070
type="button"
@@ -53,39 +113,6 @@
53113
{% endif %} {% endfor %}
54114
</ul>
55115
{% endif %}
56-
57-
<div class="d-flex gap-2">
58-
<button
59-
type="button"
60-
id="search_modal_show"
61-
class="btn btn-sm btn-secondary"
62-
href="#mkdocs_search_modal"
63-
data-bs-toggle="modal"
64-
data-bs-target="#mkdocs_search_modal"
65-
>
66-
Search
67-
</button>
68-
<!-- prettier-ignore -->
69-
<a
70-
{% if page.previous_page %}href="{{ page.previous_page.url|url }}"{% endif %}
71-
{% if not page.previous_page %}disabled{% endif %}
72-
class="btn btn-sm btn-secondary"
73-
>Previous</a>
74-
75-
<!-- prettier-ignore -->
76-
<a
77-
{% if page.next_page %}href="{{ page.next_page.url|url }}"{% endif %}
78-
{% if not page.next_page %}disabled{% endif %}
79-
class="btn btn-sm btn-secondary"
80-
>Next</a>
81-
82-
<!-- prettier-ignore -->
83-
<a
84-
class="btn btn-primary btn-sm"
85-
href="https://github.com/encode/django-rest-framework/tree/master"
86-
>Github</a
87-
>
88-
</div>
89116
</div>
90117
</div>
91118
</nav>

0 commit comments

Comments
 (0)