-
Notifications
You must be signed in to change notification settings - Fork 386
/
topnav.html
62 lines (61 loc) · 3.25 KB
/
topnav.html
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
{% if jekyll.environment == "production" %}
{% assign base = site.url %}
{% endif %}
<!-- Navigation -->
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container topnavlinks">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="fa fa-lg navbar-brand no_icon" href="{{base}}/doc/index.html">
<img class="no_icon" style="width:147px;" src="{{base}}/images/branding/logo/white/loopback.svg"> <span class="projectTitle"></span></a>
</div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-right">
<!-- entries without drop-downs appear here -->
{% for entry in site.data.topnav.topnav %}
{% for item in entry.items %}
{% if item.external_url %}
<li><a href="{{item.external_url}}" target="_blank">{{item.title}}</a></li>
{% elsif page.url contains item.url %}
<li class="active"><a href="{{item.url }}">{{item.title}}</a></li>
{% else %}
<li><a href="{{item.url }}">{{item.title}}</a></li>
{% endif %}
{% endfor %}
{% endfor %}
<!-- entries with drop-downs appear here -->
<!-- conditional logic to control which topnav appears for the audience defined in the configuration file.-->
{% for entry in site.data.topnav.topnav_dropdowns %}
{% for folder in entry.folders %}
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">{{ folder.title }}<b class="caret"></b></a>
<ul class="dropdown-menu">
{% for folderitem in folder.folderitems %}
<!-- page.url is {{page.url}} .... folderitem.url is {{folderitem.url}} -->
{% if folderitem.external_url %}
<li><a href="{{folderitem.external_url}}" target="_blank">{{folderitem.title}}</a></li>
{% elsif page.url contains folderitem.url and folderitem.title != 'LoopBack Overview' %}
<li class="dropdownActive"><a href="{{folderitem.url }}">{{folderitem.title}}</a></li>
{% else %}
<li><a href="{{folderitem.url }}">{{folderitem.title}}</a></li>
{% endif %}
{% endfor %}
</ul>
</li>
{% endfor %}
{% endfor %}
{% if site.feedback_disable == null or site.feedback_disable == false %}
{% include feedback.html %}
{% endif %}
<li>
<span id="algolia-docsearch"></span>
</li>
</ul>
</div>
</div>
</nav>