blob: 1304edc8db69a10b1cd1dc076e80853d153ed727 (
plain)
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
|
<header class="site-header">
<div class="header__title">
<h1 style="margin-bottom: 0px !important;">
<a class="site-title" href="{{ "/" | absolute_url }}"><img src="{{ "/static/aswhite.png" | absolute_url }}" height="40px" style="margin:20px "><span class="mobile_hide">{{ site.title }}</span></a>
</h1>
</div>
<nav class="navigation header__navigation">
{% assign url_tokens = page.url | split: '/' %}
{% assign main_page_href = '/' | append: url_tokens[1] %}
{% assign subpage_href = '/' | append: url_tokens[2] %}
<ul>
{% if site.data.navi.items[0] %}
{% for item in site.data.navi.items %}
{% if item.href == main_page_href or item.href == main_page_href | concat: '/' %}
{% assign current_page = true %}
{% else %}
{% assign current_page = false %}
{% endif %}
{% if item.absolute %}
{% assign absolute_href = item.href %}
{% else %}
{% assign absolute_href = item.href | absolute_url %}
{% endif %}
<li class="navigation__item {% if current_page %}active{% endif %}">
<a href="{{ absolute_href }}">{{ item.title }}</a>
</li>
{% if current_page and item.subnavi %}
{% assign subnavi = item.subnavi %}
{% endif %}
{% endfor %}
{% endif %}
</ul>
</nav>
{% if subnavi %}
<nav id="navigation_sub" class="navigation subheader__navigation">
<ul>
{% for subitem in subnavi.items %}
{% if subitem.absolute %}
{% assign absolute_href = subitem.href %}
{% else %}
{% assign absolute_href = main_page_href | absolute_url | append: subitem.href }} %}
{% endif %}
<li class="navigation__item {% if subitem.href == subpage_href %}active{% endif %}">
<a href="{{ absolute_href }}">{{ subitem.title }}</a>
</li>
{% endfor %}
</ul>
</nav>
{% endif %}
</header>
|