This repository has been archived by the owner on Oct 2, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy path_header.twig
81 lines (76 loc) · 4.1 KB
/
_header.twig
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<div id="header">
<div class="wrap">
<div class="left">
<div class="v-center logo-header">
<div id="logo">
{%- if header == 'SimpleSAMLphp' %}
<span class="simple">Simple</span>{# -#}
<span class="saml">SAML</span>{# -#}
<span class="simple">php</span>
{%- else %}
{{ header }}
{%- endif %}
<img class="pure-img hidden" src="" alt="LOGO">
</div>
</div>
</div>
{% if not hideLanguageBar -%}
<div class="right">
<a href="" id="menuLink" class="menu-link hide-for-large">
<span class="fa fa-globe fa-2x" aria-hidden="true"></span>
</a>
</div>
{% endif %}
{% if not hideLanguageBar -%}
<div id="languagebar" class="hide-for-large">
<div id="menu">
<div class="pure-menu">
<ul class="pure-menu-list">
{% for key, lang in languageBar -%}
{% if key == currentLanguage -%}
<li><a class="pure-menu-heading" href="#">{{ lang.name }}</a><li>
{% else -%}
{% if lang.url -%}
<li class="pure-menu-item"><a href="{{ lang.url }}{%- spaceless %}
{% if queryParams -%}&{% endif -%}
{% for name, value in queryParams -%}
{%- if not loop.first %}&{% endif -%}
{%- if value %}{{ name }}={{ value }}{% else %}{{ name }}{%- endif %}
{%- endfor %}"{% endspaceless %} class="pure-menu-link">{{ lang.name }}</a></li>
{% endif -%}
{% endif -%}
{% endfor -%}
</ul>
</div>
</div>
</div>
{%- endif -%}
<div class="right show-for-large">
<div class="v-center language-bar">
<form id="language-form" class="pure-form" method="get">
{% if not hideLanguageBar -%}
<div id="languagebar">
{% for name, value in queryParams -%}
{% if value -%}
<input type="hidden" name="{{ name }}" value="{{ value }}" />
{%- else -%}
<input type="hidden" name="{{ name }}" />
{%- endif -%}
{%- endfor %}
<select class="pure-input-1-4 language-menu selectize" name="language"
id="language-selector">
{% for key, lang in languageBar -%}
{% if key == currentLanguage -%}
<option value="{{ key }}" selected="selected"> {{ lang.name }}</option>
{% else -%}
<option value="{{ key }}">{{ lang.name }}</option>
{% endif -%}
{% endfor -%}
</select>
</div>
{% endif -%}
</form>
</div> <!--language-bar-->
</div><!--show-for-large-->
</div> <!-- wrap -->
</div> <!-- header -->