gnousdoteu-v3/apps/gnous_eu/templates/layouts/header.html

64 lines
3.1 KiB
HTML
Raw Normal View History

2020-05-16 02:12:21 +02:00
{% load static %}
{% load i18n %}
<div class="nav">
<div class="uk-container">
<nav class="uk-navbar uk-navbar-container uk-navbar-transparent">
<div class="uk-navbar-left">
<div class="uk-navbar-item uk-padding-remove-horizontal">
<a class="uk-logo uk-border-rounded" title="Logo" href="{% url 'gnous_eu:index' %}">
<img src="{% static 'images/gnous.svg' %}" alt="Logo">
</a>
</div>
<ul class="uk-navbar-nav uk-visible@s">
<li>
<a href="{% url 'gnous_eu:index' %}"
class="uk-text-bolder {% if request.resolver_match.url_name == 'index' %} active {% endif %}">
{% trans "Accueil" %}
</a>
</li>
<li>
<a href="{% url 'gnous_eu:services' %}"
class="uk-text-bolder {% if request.resolver_match.url_name == 'services' %} active {% endif %}">
{% trans "Services" %}
</a>
</li>
</ul>
</div>
<div class="uk-navbar-right">
<ul class="uk-navbar-nav uk-visible@s">
<li>
<a href="{% url 'gnous_eu:about' %}"
class="uk-text-bolder {% if request.resolver_match.url_name == 'about' %} active {% endif %}">
{% trans "À propos" %}
</a>
</li>
<li>
<a href="{% url 'gnous_eu:tips' %}"
class="uk-text-bolder {% if request.resolver_match.url_name == 'tips' %} active {% endif %}">
{% trans "Donner" %}
</a>
</li>
</ul>
<div class="uk-navbar-item uk-visible@s">
<form action="{% url 'set_language' %}" method="post" name="languageForm">
{% csrf_token %}
{% get_current_language as LANGUAGE_CODE %}
{% if LANGUAGE_CODE == 'en' %}
<img src="{% static 'images/icons/fr.svg' %}" alt="en" onclick="window.document.languageForm.submit()" width="18vw">
<input type="hidden" name="language" value="fr">
{% else %}
<img src="{% static 'images/icons/en.svg' %}" alt="fr" onclick="window.document.languageForm.submit()" width="18vw">
<input type="hidden" name="language" value="en">
{% endif %}
</form>
</div>
<a class="uk-navbar-toggle uk-navbar-item uk-hidden@s"
data-uk-toggle data-uk-navbar-toggle-icon data-turbolinks="false"
href="#offcanvas-nav">
</a>
</div>
</nav>
</div>
</div>