Skip to content

Commit

Permalink
Merge pull request #164 from Kunstmaan/fix_lang_nav
Browse files Browse the repository at this point in the history
fix language navigation in header
  • Loading branch information
Roderik van der Veer committed May 20, 2014
2 parents f042b61 + 99af818 commit 15a982e
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
@include transform(translateX(0));
}
}
@media (min-width: $screen-md) {
width: auto;
}
}

.language-nav__active-lang {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,22 +137,27 @@
{% endif %}
{% endblock %}
</h1>
{% if languagechooser_languages is defined %}
<nav class="col-md-2 language-nav">
<span class="language-nav__active-lang">
{{ app.request.locale }}
<i class="icon-chevron-down"></i>
</span>
<ul class="list-reset language-nav__list">
{% for lang in languagechooser_languages %}
<li class="language-nav__list-item">
<a href="{{ path('_slug', { '_locale': lang }) }}" class="language-nav__link">
{{ lang }}
</a>
</li>
{% endfor %}
</ul>
</nav>
{% if requiredlocales is defined %}
{% set langs = requiredlocales|split('|') %}
{% if langs|length > 0 %}
<nav class="col-md-2 language-nav">
<span class="language-nav__active-lang">
{{ app.request.locale }}
<i class="icon-chevron-down"></i>
</span>
<ul class="list-reset language-nav__list">
{% for lang in langs %}
{% if lang != app.request.locale %}
<li class="language-nav__list-item">
<a href="{{ path('_slug', { '_locale': lang }) }}" class="language-nav__link">
{{ lang }}
</a>
</li>
{% endif %}
{% endfor %}
</ul>
</nav>
{% endif %}
{% endif %}
</div>
</div>
Expand Down

0 comments on commit 15a982e

Please sign in to comment.