-
Notifications
You must be signed in to change notification settings - Fork 1k
/
Copy pathnavbar-inner.html
63 lines (61 loc) · 3.04 KB
/
navbar-inner.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
63
{% assign navdata = site.data.doc-nav-header %}
{% include site-header.html %}
{% if page.scala3 %}
<header id="doc-header" class="scala3">
{% else %}
<header id="doc-header">
{% endif %}
<div class="wrap" style="padding: 0px;">
<nav class="doc-navigation" role="menu">
{% assign docsRootTranslated = site[page.language] | where: 'partof', 'documentation' | first %}
<div class="navigation-bdand">
<a href="{{ site.baseurl }}/{{ docsRootTranslated.language }}">
<img src="{{ site.baseurl }}/resources/img/documentation-logo@2x.png" alt="docs">
</a>
</div>
<div class="navigation-ellipsis">
<i class="fa fa-ellipsis-v"></i>
</div>
<ul class="navigation-menu">
{% for navItem in navdata %}
<li class="navigation-menu-item">
{% capture translatedPageId %}/{{page.language}}{{navItem.url | remove_first: '.html' }}{% endcapture %}
{% assign navItemTranslated = site.documents | where: 'id', translatedPageId | first %}
<a href="{% if navItemTranslated.url %}{{navItemTranslated.url}}{% elsif navItem.url contains '://' or navItem.url == '#' %}{{navItem.url}}{% else %}{{site.baseurl}}{{navItem.url}}{% endif %}" id="{{ navItem.title | downcase | strip | remove: ' ' }}" {% if page.url contains navItem.url %}class="active"{% endif %}>{{navItem.title}}</a>
{% if navItem.submenu %}
<ul class="navigation-dropdown">
{% for subItem in navItem.submenu %}
<li>
{% capture translatedPageId %}/{{page.language}}{{subItem.url | remove_first: '.html' }}{% endcapture %}
{% assign subItemTranslated = site.documents | where: 'id', translatedPageId | first %}
<a href="{% if subItemTranslated.url %}{{subItemTranslated.url}}{% elsif subItem.url contains '://' %}{{ subItem.url }}{% else %}{{ site.baseurl }}{{ subItem.url }}{% endif %}">{{ subItem.title }}</a>
</li>
{% endfor %}
</ul>
{% endif %}
</li>
{% endfor %}
</ul>
</nav>
<nav class="doc-navigation-submenus">
{% for navItem in navdata %}
{% if navItem.submenu %}
<ul class="navigation-submenu" id="{{ navItem.title | downcase | strip | remove: ' ' }}" style="display: none;">
{% for subItem in navItem.submenu %}
<li>
<a href="{% if subItem.url contains '://' %}{{subItem.url}}{% else %}{{site.baseurl}}{{subItem.url}}{% endif %}">{{ subItem.title }}</a>
</li>
{% endfor %}
</ul>
{% endif %}
{% endfor %}
<ul class="navigation-submenu ellipsis-menu" style="display: none;">
{% for navItem in navdata %}
{% if forloop.index > 3 %}
<li><a href="{% if navItem.url contains '://' %}{{navItem.url}}{% else %}{{site.baseurl}}{{navItem.url}}{% endif %}">{{ navItem.title }}</a></li>
{% endif %}
{% endfor %}
</ul>
</nav>
</div>
</header>