feat: Rework profile card a bit
This commit is contained in:
parent
b16cf76208
commit
1837eca921
@ -85,7 +85,9 @@ h1, h2 {
|
||||
border-bottom-right-radius: 15px;
|
||||
}
|
||||
|
||||
.header a {
|
||||
|
||||
|
||||
.nav-link {
|
||||
color: var(--text-one);
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
|
@ -0,0 +1,17 @@
|
||||
{% load i18n %}
|
||||
<form action="{% url 'change-language' %}" method="post" onchange='this.form.submit()'>
|
||||
{% csrf_token %}
|
||||
<select name="language" onchange='this.form.submit()'>
|
||||
{% get_current_language as LANGUAGE_CODE_CURRENT %}
|
||||
{% get_available_languages as LANGUAGES %}
|
||||
{% for language in LANGUAGES %}
|
||||
<option value="{{ language.0 }}" {% if language.0 == LANGUAGE_CODE_CURRENT %} selected{% endif %}>
|
||||
{{ language.0|language_name_local }}
|
||||
</option>
|
||||
<!--<option value="{{ language.0 }}" {% if language.0 == LANGUAGE_CODE %} selected{% endif %}>
|
||||
{{ language.0|language_name_local }} ({{ language.0 }})
|
||||
</option>-->
|
||||
{% endfor %}
|
||||
</select>
|
||||
<!--<input type="submit" value={% translate "change" %}>-->
|
||||
</form>
|
@ -14,6 +14,7 @@
|
||||
|
||||
</nav>
|
||||
<div class="header-right">
|
||||
{% include "fellchensammlung/forms/change_language.html" %}
|
||||
{% if user.is_authenticated %}
|
||||
<div class="profile-card">
|
||||
<p><a href="{{ user.get_absolute_url }}">{{ user.username }}</a></p>
|
||||
@ -27,21 +28,5 @@
|
||||
<a href="{% url "login" %}">{% translate "Einloggen" %}</a>
|
||||
{% endif %}
|
||||
|
||||
<form action="{% url 'change-language' %}" method="post" onchange='this.form.submit()'>
|
||||
{% csrf_token %}
|
||||
<select name="language" onchange='this.form.submit()'>
|
||||
{% get_current_language as LANGUAGE_CODE_CURRENT %}
|
||||
{% get_available_languages as LANGUAGES %}
|
||||
{% for language in LANGUAGES %}
|
||||
<option value="{{ language.0 }}" {% if language.0 == LANGUAGE_CODE_CURRENT %} selected{% endif %}>
|
||||
{{ language.0|language_name_local }}
|
||||
</option>
|
||||
<!--<option value="{{ language.0 }}" {% if language.0 == LANGUAGE_CODE %} selected{% endif %}>
|
||||
{{ language.0|language_name_local }} ({{ language.0 }})
|
||||
</option>-->
|
||||
{% endfor %}
|
||||
</select>
|
||||
<!--<input type="submit" value={% translate "change" %}>-->
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
Loading…
Reference in New Issue
Block a user