Commit aa1e992f authored by antoine-boiteau's avatar antoine-boiteau
Browse files

Rework of the locale dropdown menu, now with custom CSS (removal of bootstrap's dropdown class)

parent b02612e8
#locale-dropdown {
position: relative;
display: block;
}
#locale-dropdown-list {
display: none;
position: absolute;
list-style-type: none;
padding: 0;
background-color: white;
}
.locale-dropdown-item a {
padding-right : 20px;
}
.locale-dropdown-item:hover {
background-color: #e0e0e0;
}
#locale-dropdown:hover #locale-dropdown-list {
display: block;
}
#locale-dropdown:hover #locale-dropdown-toggle {
border-radius: 2px 2px 0 0;
}
......@@ -11,6 +11,7 @@
<link rel="stylesheet" href="{{ asset('public/bootstrap-4.5.2/css/bootstrap.min.css') }}">
<link rel="stylesheet" href="{{ asset('public/font-awesome-4.7.0/css/font-awesome.css') }}">
<link rel="stylesheet" href="{{ asset('public/css/theme.css') }}">
<link rel="stylesheet" href="{{ asset('public/css/customStyle.css') }}">
<style>
html {
scroll-behavior: smooth;
......@@ -59,20 +60,18 @@
<a class="btn btn-outline-light mr-2" href="{{ path('app_login') }}">{% trans %}log.in{% endtrans %}</a>
{% endif %}
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<button class="btn btn-secondary btn-sm dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
{% trans %}actual.locale{% endtrans %}
</button>
<ul class="dropdown-menu">
{% for locale in supported_locales %}
{% if locale != app.request.locale %}
<a class="dropdown-item" href="{{ path('change_locale', {'locale': locale}) }}">{{ supported_locales_fullname[locale] }}</a>
{% endif %}
{% endfor %}
</ul>
</li>
</ul>
<div class="nav navbar-nav navbar-right" id="locale-dropdown">
<button class="btn btn-secondary btn-sm" id="locale-dropdown-toggle">
{% trans %}actual.locale{% endtrans %}
</button>
<ul id="locale-dropdown-list">
{% for locale in supported_locales %}
{% if locale != app.request.locale %}
<li class="locale-dropdown-item"> <a class="btn btn-sm" href="{{ path('change_locale', {'locale': locale}) }}">{{ supported_locales_fullname[locale] }}</a> </li>
{% endif %}
{% endfor %}
</ul>
</div>
</div>
</div>
</nav>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment