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;
|
border-bottom-right-radius: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.header a {
|
|
||||||
|
|
||||||
|
.nav-link {
|
||||||
color: var(--text-one);
|
color: var(--text-one);
|
||||||
text-align: center;
|
text-align: center;
|
||||||
text-decoration: none;
|
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>
|
</nav>
|
||||||
<div class="header-right">
|
<div class="header-right">
|
||||||
|
{% include "fellchensammlung/forms/change_language.html" %}
|
||||||
{% if user.is_authenticated %}
|
{% if user.is_authenticated %}
|
||||||
<div class="profile-card">
|
<div class="profile-card">
|
||||||
<p><a href="{{ user.get_absolute_url }}">{{ user.username }}</a></p>
|
<p><a href="{{ user.get_absolute_url }}">{{ user.username }}</a></p>
|
||||||
@ -27,21 +28,5 @@
|
|||||||
<a href="{% url "login" %}">{% translate "Einloggen" %}</a>
|
<a href="{% url "login" %}">{% translate "Einloggen" %}</a>
|
||||||
{% endif %}
|
{% 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>
|
||||||
</div>
|
</div>
|
Loading…
Reference in New Issue
Block a user