aboutsummaryrefslogtreecommitdiff
path: root/common/navigation.j2.inc
blob: cc8dc5e5f352e4e72c2220a0e0b2338a8131280c (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
{% macro navlink(site, text) -%}
   <a {{ 'class="active"' if filename == site else '' }}
      href="{{ url_localized(site) }}">
    {{ text }}
   </a>
{%- endmacro %}

<div class="topnav" id="navigation">
{{ navlink('index.html', _('Home')) }}
{{ navlink('about.html', _('About')) }}
{{ navlink('docs.html', _('Docs')) }}
{{ navlink('news/index.html', _('News')) }}
<a href="{{ self_localized('en') }}" style="float:right;">EN</a>
<a href="{{ self_localized('de') }}" style="float:right;">DE</a>
<a href="javascript:void(0);" class="icon" onclick="myFunction()">
  <i class="fa fa-bars"></i></a>
</div>

<script>
function myFunction() {
  var x = document.getElementById("navigation");
  if (x.className === "topnav") {
    x.className += " responsive";
  } else {
    x.className = "topnav";
  }
}
</script>