using "public/lang_select.html"

This commit is contained in:
Peter Pfeufer 2021-08-18 07:39:36 +02:00
parent 4a3e807066
commit 191b238a04
No known key found for this signature in database
GPG Key ID: 6051D2C6AD4EBC27
2 changed files with 22 additions and 17 deletions

View File

@ -132,9 +132,16 @@ ul.list-group.list-group-horizontal > li.list-group-item {
color: rgb(255, 255, 255);
}
.top-user-menu .navbar-form {
.top-menu-bar-language-select form {
padding: 10px 15px;
margin-left: 5px;
margin-right: 5px;
border-top: 1px solid transparent;
border-bottom: 1px solid transparent;
-webkit-box-shadow: inset 0 1px 0 rgb(255 255 255), 0 1px 0 rgb(255 255 255);
box-shadow: inset 0 1px 0 rgb(255 255 255), 0 1px 0 rgb(255 255 255);
margin-top: 7.5px;
margin-bottom: 7.5px;
}
}
@ -148,6 +155,17 @@ ul.list-group.list-group-horizontal > li.list-group-item {
.top-user-menu {
color: rgb(123, 138, 139);
}
.top-menu-bar-language-select form {
width: auto;
padding-top: 0;
padding-bottom: 0;
margin-right: 0;
margin-left: 0;
border: 0;
-webkit-box-shadow: none;
box-shadow: none;
}
}
/* eve time in navbar

View File

@ -38,23 +38,10 @@
<li role="separator" class="divider"></li>
{% endif %}
<li>
<form id="f-lang-select" class="navbar-form" action="{% url 'set_language' %}" method="post">
{% csrf_token %}
<div class="form-group">
<select onchange="this.form.submit()" class="form-control" id="lang-select" name="language">
{% get_language_info_list for LANGUAGES as languages %}
{% for language in languages %}
<option value="{{ language.code }}"{% if language.code == LANGUAGE_CODE %} selected="selected"{% endif %}>
{{ language.name_local }} ({{ language.code }})
</option>
{% endfor %}
</select>
</div>
</form>
<li class="top-menu-bar-language-select">
{% include 'public/lang_select.html' %}
</li>
<li role="separator" class="divider"></li>
<!-- night mode toggle -->