1 | <form class="bd-search d-flex align-items-center">
|
2 | <input type="search" class="form-control"
|
3 | id="search-input" placeholder="Search..."
|
4 | aria-label="Search for..." autocomplete="off">
|
5 | <button class="btn btn-link bd-search-docs-toggle d-md-none p-0 ml-3"
|
6 | type="button" data-toggle="collapse" data-target="#bd-docs-nav"
|
7 | aria-controls="bd-docs-nav" aria-expanded="false"
|
8 | aria-label="Toggle docs navigation">
|
9 | {%- include icons/menu.svg width="30" height="30" -%}
|
10 | </button>
|
11 | </form>
|
12 |
|
13 | <nav class="collapse bd-links" id="bd-docs-nav">
|
14 | {%- assign page_slug = page.url | split: '/' | last -%}
|
15 | {%- for group in site.data.nav -%}
|
16 | {%- assign link = group.pages | first -%}
|
17 | {%- assign link_slug = link.title | slugify -%}
|
18 | {%- assign group_slug = group.title | slugify -%}
|
19 | {%- assign active = nil -%}
|
20 |
|
21 | {%- if page.group == group_slug -%}
|
22 | {%- assign active = 'active' -%}
|
23 | {%- endif -%}
|
24 |
|
25 | <div class="bd-toc-item{% unless active == nil %} {{ active }}{% endunless %}">
|
26 | <a class="bd-toc-link" href="{{ site.baseurl }}/docs/{{ group_slug }}/{{ link_slug }}{% if link_slug %}/{% endif %}">
|
27 | {{ group.title }}
|
28 | </a>
|
29 |
|
30 | <ul class="nav bd-sidenav">
|
31 | {%- for doc in group.pages -%}
|
32 | {%- assign doc_slug = doc.title | slugify -%}
|
33 | {%- assign active = nil -%}
|
34 |
|
35 | {%- if page.group == group_slug and page_slug == doc_slug -%}
|
36 | {%- assign active = 'active bd-sidenav-active' -%}
|
37 | {%- endif -%}
|
38 |
|
39 | <li{% unless active == nil %} class="{{ active }}"{% endunless %}>
|
40 | <a href="{{ site.baseurl }}/docs/{{ group_slug }}/{{ doc_slug }}/">
|
41 | {{ doc.title }}
|
42 | </a>
|
43 | </li>
|
44 | {%- endfor -%}
|
45 | </ul>
|
46 | </div>
|
47 | {%- endfor -%}
|
48 | </nav>
|