Improve page

This adds the correct language code to the html tag.
Additionally it slims the menu.html include
This commit is contained in:
madmaurice 2018-01-02 19:33:11 +01:00
parent 25fe5f0aaf
commit 4c1092c4c2
3 changed files with 17 additions and 9 deletions

View File

@ -7,3 +7,10 @@ defaults:
langs:
de: "DE"
en: "EN"
external:
-
name: "Git"
url: "https://git.zom.bi/explore/projects"
-
name: "Wiki"
url: "https://wiki.zom.bi"

View File

@ -1,8 +1,8 @@
<!DOCTYPE html>
<!--[if IE 9]>
<html class="lt-ie10" lang="en" >
<html class="lt-ie10" lang="{{ page.lang }}" >
<![endif]-->
<html class="no-js" lang="en" >
<html class="no-js" lang="{{ page.lang }}" >
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

View File

@ -1,11 +1,12 @@
{%- for node in site.pages -%}
{%- if node.lang == page.lang and node.menutitle -%}
{%- if node.url == page.url -%}
<li><a href="{{ node.url }}" class="is-active">{{ node.menutitle | escape }}</a></li>
{%- else -%}
<li><a href="{{ node.url }}">{{ node.menutitle | escape }}</a></li>
{%- endif -%}
<li>
<a href="{{ node.url }}" {%- if node.url == page.url %} class="is-active"{% endif -%}>
{{ node.menutitle | escape }}
</a>
</li>
{%- endif -%}
{%- endfor -%}
<li><a href="https://git.zom.bi/explore/projects">Git</a></li>
<li><a href="https://wiki.zom.bi/">Wiki</a></li>
{% for link in site.external %}
<li><a href="{{ link.url }}">{{ link.name }}</a></li>
{% endfor %}