Improved UI of language switcher

This commit is contained in:
Raphael Michel
2016-07-11 19:52:49 +02:00
parent af8e017b07
commit f779b70deb
2 changed files with 9 additions and 5 deletions

View File

@@ -29,11 +29,9 @@
{% if request.event.settings.locales|length > 1 %}
<div class="locales">
{% for l in request.event.settings.locales %}
{% if l != request.LANGUAGE_CODE %}
<a href="{% url "presale:locale.set" %}?locale={{ l }}&next={{ request.path }}%3F{{ request.META.QUERY_STRING|urlencode }}">
<img src="{% static "pretixbase/img/flags" %}/{{ l }}.png"/>
</a>
{% endif %}
<a href="{% url "presale:locale.set" %}?locale={{ l }}&next={{ request.path }}%3F{{ request.META.QUERY_STRING|urlencode }}"
class="{% if l == request.LANGUAGE_CODE %}active{% endif %}"
><img src="{% static "pretixbase/img/flags" %}/{{ l }}.png"/></a>
{% endfor %}
</div>
{% endif %}

View File

@@ -30,6 +30,12 @@ footer {
a {
text-decoration: none;
}
a:hover {
border-bottom: 2px solid $gray-light;
}
a.active {
border-bottom: 2px solid $brand-primary;
}
img {
vertical-align: baseline;
}