Skip to content

Commit 1593943

Browse files
committed
revert last changes due to liquid 5 not being supported by github
1 parent 49dcde2 commit 1593943

File tree

1 file changed

+61
-61
lines changed

1 file changed

+61
-61
lines changed

_includes/navbar.html

Lines changed: 61 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -7,85 +7,85 @@
77
<span class='icon-bar'></span>
88
</button>
99
<a class='navbar-brand navbar-logo' href='/index.html'><img src='{{ site.baseurl | append: "/assets/img/site/rse.png" }}'/></a>
10-
{%- # a class='navbar-brand' href='/index.html' de-RSE /a -%}
10+
<!-- a class='navbar-brand' href='/index.html'>de-RSE</a -->
1111
</div>
1212
<div id='navbar' class='collapse navbar-collapse'>
1313
<ul class='nav navbar-nav'>
14-
{%- # Set variable "lang" to reflect page language -%}
15-
{%- if page.url contains "/en/" -%}
16-
{%- assign lang = "/en/" -%}
17-
{%- assign conf2019_title = "deRSE20 Conference" -%}
18-
{%- elsif page.url contains "/de/"-%}
19-
{%- assign lang ="/de/"-%}
20-
{%- assign conf2019_title = "deRSE20 Konferenz"-%}
21-
{%- endif-%}
22-
{%- # Set variable "page_conf2019" to reflect if we are on a conference page -%}
23-
{%- assign page_conf2019 = false-%}
24-
{%- assign conf2019_link = "../deRSE20"-%}
25-
{%- if page.url contains "/conf2019/"-%}
26-
{%- assign page_conf2019 = true-%}
27-
{%- assign conf2019_link = "index.html"-%}
14+
<!-- Set variable "lang" to reflect page language -->
15+
{% if page.url contains "/en/" %}
16+
{% assign lang = "/en/" %}
17+
{% assign conf2019_title = "deRSE20 Conference" %}
18+
{% elsif page.url contains "/de/" %}
19+
{% assign lang ="/de/" %}
20+
{% assign conf2019_title = "deRSE20 Konferenz" %}
21+
{% endif %}
22+
<!-- Set variable "page_conf2019" to reflect if we are on a conference page -->
23+
{% assign page_conf2019 = false %}
24+
{% assign conf2019_link = "../deRSE20" %}
25+
{% if page.url contains "/conf2019/" %}
26+
{% assign page_conf2019 = true %}
27+
{% assign conf2019_link = "index.html" %}
2828
<li class='navbar-conflink'><a href='{{ conf2019_link | prepend: site.baseurl }}'>{{ conf2019_title }}</a></li>
29-
{%- endif-%}
30-
{%- # Get a list of pages sorted by the "weight" variable from the YAML header of each page file -%}
31-
{%- assign pg = site.pages | sort: "weight"-%}
32-
{%- for node in pg-%}
33-
{%- # Neglect imprint.html and index.html in either language -%}
34-
{%- unless node.path contains "imprint" or node.path contains "index"-%}
35-
{%- # Set variable "node_conf2019" if node links to a conference page -%}
36-
{%- assign node_conf2019 = false-%}
37-
{%- if node.url contains "/conf2019/"-%}
38-
{%- assign node_conf2019 = true-%}
39-
{%- endif-%}
40-
{%- # Process page only if it's on the same path as the current page regarding language and conference -%}
41-
{%- if node.url contains lang and node_conf2019 == page_conf2019-%}
42-
{%- # node.url does not contain file endings and is relative: make absolute and append file ending -%}
43-
{%- if node_conf2019-%}
44-
{%- # Identify parents and children for dropdown -%}
45-
{%- if node.isparent == true-%}
46-
{%- capture parent_id-%} {{ node.name | remove: ".md" }}{%- endcapture-%}
29+
{% endif %}
30+
<!-- Get a list of pages sorted by the "weight" variable from the YAML header of each page file -->
31+
{% assign pg = site.pages | sort: "weight" %}
32+
{% for node in pg %}
33+
<!-- Neglect imprint.html and index.html in either language -->
34+
{% unless node.path contains "imprint" or node.path contains "index" %}
35+
<!-- Set variable "node_conf2019" if node links to a conference page -->
36+
{% assign node_conf2019 = false %}
37+
{% if node.url contains "/conf2019/" %}
38+
{% assign node_conf2019 = true %}
39+
{% endif %}
40+
<!-- Process page only if it's on the same path as the current page regarding language and conference -->
41+
{% if node.url contains lang and node_conf2019 == page_conf2019 %}
42+
<!-- node.url does not contain file endings and is relative: make absolute and append file ending -->
43+
{% if node_conf2019 %}
44+
<!-- Identify parents and children for dropdown -->
45+
{% if node.isparent == true %}
46+
{% capture parent_id %}{{ node.name | remove: ".md" }}{% endcapture %}
4747
<li class='navbar-conflink dropdown'>
4848
<a class="nav-link dropdown-toggle" href='{{ node.url | prepend: site.baseurl | append: ".html" }}' id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">{{ node.title }} &#x25BC;</a>
4949
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
50-
{%- for node in pg-%}
51-
{%- if node.parent == parent_id and node.url contains lang%}
50+
{% for node in pg %}
51+
{% if node.parent == parent_id and node.url contains lang%}
5252
<a class="dropdown-item" href="{{ node.url | prepend: site.baseurl | append: ".html" }}">{{ node.title }}</a>
53-
{%- endif-%}
54-
{%- endfor-%}
53+
{% endif %}
54+
{% endfor %}
5555
</div>
5656
</li>
57-
{%- capture parent_id-%} "false"{%- endcapture-%}
58-
{%- elsif node.ischild != true-%}
57+
{% capture parent_id %}"false"{% endcapture %}
58+
{% elsif node.ischild != true %}
5959
<li class='navbar-conflink'><a href='{{ node.url | prepend: site.baseurl | append: ".html" }}'>{{ node.title }}</a></li>
60-
{%- endif-%}
61-
{%- else-%}
60+
{% endif %}
61+
{% else %}
6262
<li><a href='{{ node.url | prepend: site.baseurl | append: ".html" }}'>{{ node.title }}</a></li>
63-
{%- endif-%}
64-
{%- endif-%}
65-
{%- endunless-%}
66-
{%- endfor-%}
63+
{% endif %}
64+
{% endif %}
65+
{% endunless %}
66+
{% endfor %}
6767
</ul>
6868
<ul class='nav navbar-nav pull-right'>
69-
{%- # Build language-relative URL from current URL -%}
70-
{%- assign en-url = page.url | replace: "/de/", "/en/"-%}
71-
{%- assign de-url = page.url | replace: "/en/", "/de/"-%}
72-
{%- # Ignore index pages, as their URL will always be '/{language}/', not a specific site -%}
73-
{%- unless page.path contains "index"-%}
74-
{%- assign en-url = en-url | append: ".html"-%}
75-
{%- assign de-url = de-url | append: ".html"-%}
76-
{%- endunless-%}
77-
{%- if page.path contains "404"-%}
78-
{%- assign en-url = "/en/"-%}
79-
{%- assign de-url = "/de/"-%}
80-
{%- endif-%}
69+
<!-- Build language-relative URL from current URL -->
70+
{% assign en-url = page.url | replace: "/de/", "/en/" %}
71+
{% assign de-url = page.url | replace: "/en/", "/de/" %}
72+
<!-- Ignore index pages, as their URL will always be '/{language}/', not a specific site -->
73+
{% unless page.path contains "index" %}
74+
{% assign en-url = en-url | append: ".html" %}
75+
{% assign de-url = de-url | append: ".html" %}
76+
{% endunless %}
77+
{% if page.path contains "404" %}
78+
{% assign en-url = "/en/" %}
79+
{% assign de-url = "/de/" %}
80+
{% endif %}
8181

82-
{%- if lang contains "/en/"-%}
82+
{% if lang contains "/en/" %}
8383
<li><a href='{{ de-url | prepend: site.baseurl }}'>German/Deutsch</a></li>
84-
{%- else-%}
84+
{% else %}
8585
<li><a href='{{ en-url | prepend: site.baseurl }}'>Englisch/English</a></li>
86-
{%- endif-%}
86+
{% endif %}
8787
</ul>
8888
</div>
89-
{%- #/.nav-collapse -%}
89+
<!--/.nav-collapse -->
9090
</div>
9191
</nav>

0 commit comments

Comments
 (0)