forked from BlackPythonDevs/blackpythondevs.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathheader.html
More file actions
53 lines (53 loc) · 2.27 KB
/
header.html
File metadata and controls
53 lines (53 loc) · 2.27 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
{% assign t = site.data.locales[page.lang][page.lang] %}
<header class="site-header" role="banner">
<h1 class="site-title"><a class="logo-text" href="/index.html"><img src="{{ 'assets/images/black_python_devs_logo-horizontal-white.png' | relative_url }}" alt="Black Python Devs" /></a></h1>
<nav class="site-navigation" aria-label="Main navigation">
<div class="site-navigation-wrap">
<ul class="menu" role="menu">
{% for item in site.navigation %}
{% assign current = nil %}
{% assign nav_lang = nil %}
{% if page.url == item.url %}
{% assign current = 'nav-current' %}
{% endif %}
{% if page.lang != 'en' %}
{% assign nav_lang = page.lang | prepend: '/' %}
{% endif %}
<li class="menu-item {{ current }}" role="menuitem">
<a class="{{ current }}" href="{{ nav_lang }}{{ item.url }}"> <i class="{{ item.fa }}" aria-hidden="true"></i> {{ t.nav[forloop.index0] }} </a>
</li>
{% endfor %}
{% if page.lang and site.data.locales.size > 1 %}
<li class="menu-item" role="menuitem">
<div class="">
<i class="fa fa-language" aria-hidden="true"></i>
<select id="language" class="form-select" aria-label="Language">
{% assign locales = site.data.locales | sort %}
{% for locale in locales %}
{% assign lang = locale[0] %}
{% assign locale_name = locale[1][lang].locale_name %}
{% if page.lang == lang %}
<option value="{{ lang }}" selected="selected">{{ locale_name }}</option>
{% else %}
<option value="{{ lang }}">{{ locale_name }}</option>
{% endif %}
{% endfor %}
</select>
</div>
</li>
{% endif %}
</ul>
<!-- .menu -->
<button id="menu-close" class="menu-toggle">
<span class="screen-reader-text">Close Menu</span>
<span class="icon-close" aria-hidden="true"></span>
</button>
</div>
<!-- .site-navigation-wrap -->
</nav>
<!-- .site-navigation -->
<button id="menu-open" class="menu-toggle">
<span class="screen-reader-text">Open Menu</span>
<span class="icon-menu" aria-hidden="true"></span>
</button>
</header>