forked from prebid/prebid.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnav.html
More file actions
67 lines (53 loc) · 2.93 KB
/
Copy pathnav.html
File metadata and controls
67 lines (53 loc) · 2.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<header class="pb-header">
<nav class="navbar navbar-expand-lg navbar-dark">
<div class="container">
<a class="navbar-brand" href="/index.html"><img src="/assets/images/prebid-logo-knockout.svg" alt="Prebid Logo"></a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="navbar-collapse collapse" id="navbarSupportedContent">
<ul class="navbar-nav ml-md-auto">
<!--get all the sections and subsections -->
{% assign arrSections = site.data.dropdown_v2 | where: "isHeader", "1" %}
{% for item in arrSections %}
<li class="nav-item dropdown nav-item--{{item.sectionClass}}">
<a href="#" class="nav-link dropdown-toggle pb-mobile-dropdown nav-link--{{item.sectionClass}}" data-prebidclickid="{{item.sectionId}}" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false" id="{{item.sectionId}}">
{{ item.sectionName }}
</a>
<!-- if there are submenus - should be true each time-->
{% if item.hasSubMenus == 1 %}
<div class="dropdown-menu dropdown-menu--{{item.sectionClass}}" aria-labelledby="{{item.sectionId}}">
<!--get how many subsections-->
{% assign arrSubSections = item.submenus | where: "isSubSectionStart", "1" %}
{% for subSection in arrSubSections %}
{% assign sectionOpen = 0 %}
<!--get the items in each subsection-->
{% assign idx = forloop.index0 %}
{% assign arrSubItems = item.submenus | where: "subsectionId", idx %}
<!--display subitem-->
{% for subItem in arrSubItems %}
{% if subItem.isSubSectionStart == 1 %}
{% if sectionOpen == 1 %}
</div>
{% endif %}
{% assign sectionOpen = 1 %}
<div class="dropdown-section">
<a href="{{subItem.link}}" class="dropdown-item dropdown-item--heading pb-menu-click" data-prebidclickid="{{subSection.nbCollapseId}}">{{subItem.title}}</a>
{% else %}
<a href="{{subItem.link}}" class="dropdown-item pb-menu-click" data-prebidclickid="{{subSection.nbCollapseId}}">{{subItem.title}}</a>
{% endif %}
{% endfor %}
{% if sectionOpen == 1 %}
</div>
{% endif %}
{% endfor %}
</div>
{% endif %}
</li>
{% endfor %}
<li class="nav-item"><div class="c-search"><input type="search" id="site-search"></div></li>
</ul>
</div>
</div>
</nav>
</header>