fix flags
This commit is contained in:
parent
993e1fa998
commit
5dc04f888b
|
@ -68,9 +68,6 @@ pre {
|
||||||
padding-right: 15px;
|
padding-right: 15px;
|
||||||
padding-left: 15px;
|
padding-left: 15px;
|
||||||
}
|
}
|
||||||
.flag_link {
|
|
||||||
margin-right: 6px;
|
|
||||||
}
|
|
||||||
.flag_img {
|
.flag_img {
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
width: 28px;
|
width: 28px;
|
||||||
|
|
|
@ -65,24 +65,23 @@
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<ul class="navbar-nav ">
|
<ul class="navbar-nav ">
|
||||||
|
<li class="nav-item dropdown">
|
||||||
<li class="dropdown">
|
{% get_current_language as LANGUAGE_CODE %}
|
||||||
{% get_current_language as LANGUAGE_CODE %}
|
<a class="nav-link" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||||
<a class="nav-link" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
<img class="flag_img" src="{% static "img/"|add:LANGUAGE_CODE|add:".svg" %}" alt="flag {{ LANGUAGE_CODE }}"/>
|
||||||
<img class="flag_img" src="{% static "img/"|add:LANGUAGE_CODE|add:".svg" %}" alt="flag {{ LANGUAGE_CODE }}"/>
|
|
||||||
</a>
|
|
||||||
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
|
|
||||||
{% get_available_languages as languages %}
|
|
||||||
{% for lang_code, lang_name in languages %}
|
|
||||||
|
|
||||||
<a class="flag_link dropdown-item" href="{% url 'set_language' lang_code %}?next={{request.path|slice:"3:"}}">
|
|
||||||
<img class="flag_img" src="{% static "img/"|add:lang_code|add:".svg" %}" alt="flag {{ lang_name }}"/>
|
|
||||||
</a>
|
</a>
|
||||||
|
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
|
||||||
|
{% get_available_languages as languages %}
|
||||||
|
{% for lang_code, lang_name in languages %}
|
||||||
|
|
||||||
|
<a class="dropdown-item" href="{% url 'set_language' lang_code %}?next={{request.path|slice:"3:"}}">
|
||||||
|
<img class="flag_img" src="{% static "img/"|add:lang_code|add:".svg" %}" alt="flag {{ lang_name }}"/>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
{% if request.user.is_authenticated %}
|
{% if request.user.is_authenticated %}
|
||||||
<li class="nav-item dropdown">
|
<li class="nav-item dropdown">
|
||||||
<a href="{% url 'accounts:edit' %}" class="nav-link">{{ request.user.username }}</a>
|
<a href="{% url 'accounts:edit' %}" class="nav-link">{{ request.user.username }}</a>
|
||||||
|
|
Loading…
Reference in New Issue