|
1 |
| -<header class="navbar"> |
2 |
| - <div class="container"> |
3 |
| - <nav class="navbar"> |
4 |
| - <div class="container-fluid"> |
5 |
| - <div class="navbar-header"> |
6 |
| - <div> |
7 |
| - <a href="/" class="navbar-brand"> |
8 |
| - <img src=" /images/[email protected]" id=" navbar-logo" alt=" Neovim" /> |
9 |
| - </a> |
10 |
| - </div> |
11 |
| - <div> |
12 |
| - <button |
13 |
| - type="button" |
14 |
| - class="navbar-toggle collapsed" |
15 |
| - data-toggle="collapse" |
16 |
| - data-target="#menu" |
| 1 | +<header class="container"> |
| 2 | + <nav class="navbar navbar-expand-lg"> |
| 3 | + <div class="container-fluid"> |
| 4 | + <a href="/" class="navbar-brand"> |
| 5 | + {% include logo.svg %} |
| 6 | + </a> |
| 7 | + |
| 8 | + <button |
| 9 | + type="button" |
| 10 | + data-bs-toggle="collapse" |
| 11 | + data-bs-target="#neovim-navbar" |
| 12 | + class="navbar-toggler" |
| 13 | + aria-expanded="false" |
| 14 | + > |
| 15 | + <span class="navbar-toggler-icon"> |
| 16 | + <svg |
| 17 | + xmlns="http://www.w3.org/2000/svg" |
| 18 | + width="24" |
| 19 | + height="24" |
| 20 | + viewBox="0 0 24 24" |
| 21 | + fill="none" |
| 22 | + stroke="currentColor" |
| 23 | + stroke-width="2" |
| 24 | + stroke-linecap="round" |
| 25 | + stroke-linejoin="round" |
| 26 | + class="feather feather-menu" |
| 27 | + > |
| 28 | + <line x1="3" y1="12" x2="21" y2="12"></line> |
| 29 | + <line x1="3" y1="6" x2="21" y2="6"></line> |
| 30 | + <line x1="3" y1="18" x2="21" y2="18"></line> |
| 31 | + </svg> |
| 32 | + </span> |
| 33 | + </button> |
| 34 | + <div |
| 35 | + class="collapse navbar-collapse justify-content-end" |
| 36 | + id="neovim-navbar" |
| 37 | + > |
| 38 | + <ul class="navbar-nav"> |
| 39 | + {% for nav in site.data.nav %} {% assign active = include.active %} {% |
| 40 | + assign has_sections = nav.sections != null %} {% if has_sections %} |
| 41 | + <li class="nav-item dropdown"> |
| 42 | + <a |
| 43 | + href="#" |
| 44 | + class="nav-link dropdown-toggle" |
| 45 | + data-bs-toggle="dropdown" |
17 | 46 | aria-expanded="false"
|
| 47 | + id="neovim-dropdown" |
| 48 | + role="button" |
| 49 | + >{{ nav.title }}</a |
18 | 50 | >
|
19 |
| - <span class="sr-only">Toggle navigation</span> |
20 |
| - <svg |
21 |
| - xmlns="http://www.w3.org/2000/svg" |
22 |
| - width="18" |
23 |
| - height="12" |
24 |
| - fill="currentColor" |
25 |
| - stroke="currentColor" |
26 |
| - > |
27 |
| - <path d="M0 0h18v2H0zM0 5h18v2H0zM0 10h18v2H0z" /> |
28 |
| - </svg> |
29 |
| - </button> |
30 |
| - </div> |
31 |
| - </div> |
32 |
| - <div class="collapse navbar-collapse" id="menu"> |
33 |
| - <ul class="nav navbar-nav navbar-right"> |
34 |
| - {% for nav in site.data.nav %} {% if include.active == nav.title %} |
35 |
| - <li class="current"> |
36 |
| - {% else %} |
37 |
| - </li> |
| 51 | + <ul class="dropdown-menu" aria-labelledby="neovim-dropdown"> |
| 52 | + {% for section in nav.sections %} |
| 53 | + |
| 54 | + <li> |
| 55 | + <a class="dropdown-item" href="{{ section.url }}"> |
| 56 | + {{ section.title }} |
| 57 | + </a> |
| 58 | + </li> |
| 59 | + |
| 60 | + {% endfor %} |
| 61 | + </ul> |
| 62 | + </li> |
| 63 | + {% endif %} {% unless has_sections %} |
| 64 | + <li class="nav-item"> |
| 65 | + <a href="{{ nav.url }}" class="nav-link">{{ nav.title }}</a> |
| 66 | + </li> |
38 | 67 |
|
39 |
| - <li> |
40 |
| - {% endif %} {% if nav.sections != null %} |
41 |
| - <a |
42 |
| - href="#" |
43 |
| - class="dropdown-toggle" |
44 |
| - data-toggle="dropdown" |
45 |
| - role="button" |
46 |
| - aria-haspopup="true" |
47 |
| - aria-expanded="false" |
48 |
| - >{{ nav.title }}</a |
49 |
| - > |
50 |
| - {% else %} |
51 |
| - <a href="{{ nav.url }}">{{ nav.title }}</a> |
52 |
| - {% endif %} {% if nav.sections != null %} |
53 |
| - <ul class="dropdown-menu"> |
54 |
| - {% for section in nav.sections %} |
55 |
| - <li> |
56 |
| - <a href="{{ section.url }}">{{ section.title }}</a> |
57 |
| - </li> |
58 |
| - {% endfor %} |
59 |
| - </ul> |
60 |
| - {% endif %} |
61 |
| - </li> |
62 |
| - {% endfor %} |
63 |
| - </ul> |
64 |
| - </div> |
| 68 | + {% endunless %} {% endfor %} |
| 69 | + </ul> |
65 | 70 | </div>
|
66 |
| - </nav> |
67 |
| - </div> |
| 71 | + </div> |
| 72 | + </nav> |
68 | 73 | </header>
|
0 commit comments