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
@@ -29,11 +29,9 @@
{% if request.event.settings.locales|length > 1 %} {% if request.event.settings.locales|length > 1 %}
<div class="locales"> <div class="locales">
{% for l in request.event.settings.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 }}"
<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"/> ><img src="{% static "pretixbase/img/flags" %}/{{ l }}.png"/></a>
</a>
{% endif %}
{% endfor %} {% endfor %}
</div> </div>
{% endif %} {% endif %}
+6
View File
@@ -30,6 +30,12 @@ footer {
a { a {
text-decoration: none; text-decoration: none;
} }
a:hover {
border-bottom: 2px solid $gray-light;
}
a.active {
border-bottom: 2px solid $brand-primary;
}
img { img {
vertical-align: baseline; vertical-align: baseline;
} }