Adaptable width for nav menu

This commit is contained in:
Marc Ducobu 2014-11-19 16:19:58 +01:00
parent b43ee26c81
commit 0a9cf0ceb6
5 changed files with 11 additions and 6 deletions

View File

@ -18,8 +18,10 @@ html,body {
font-size: 1.5em; font-size: 1.5em;
} }
ul.submenu.min-width { @each $len in 11, 15 {
min-width: 11em; ul.submenu.width-#{$len}-em {
min-width: #{$len}em;
}
} }
.content { .content {

View File

@ -3739,9 +3739,12 @@ html, body {
.cf-subtitle { .cf-subtitle {
font-size: 1.5em; } font-size: 1.5em; }
ul.submenu.min-width { ul.submenu.width-11-em {
min-width: 11em; } min-width: 11em; }
ul.submenu.width-15-em {
min-width: 15em; }
.content { .content {
padding-top: 1em; padding-top: 1em;
padding-bottom: 1em; padding-bottom: 1em;

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
<li class="nav-link more"><a href="javascript:void(0)">Sections</a> <li class="nav-link more"><a href="javascript:void(0)">Sections</a>
<ul class="submenu min-width"> <ul class="submenu width-15-em">
{% for route in routes %} {% for route in routes %}
<li><a href="{{ path(route.key, args ) }}"> <li><a href="{{ path(route.key, args ) }}">
{% spaceless %} {% spaceless %}

View File

@ -1,5 +1,5 @@
<li class="nav-link more"><a href="javascript:void(0)">{{ app.user.username }}</a> <li class="nav-link more"><a href="javascript:void(0)">{{ app.user.username }}</a>
<ul class="submenu min-width"> <ul class="submenu width-11-em">
{% for route in routes %} {% for route in routes %}
<li><a href="{{ path(route.key, args ) }}"><i class="fa fa-{{ route.icon }}"></i> {{ route.label|trans }}</a></li> <li><a href="{{ path(route.key, args ) }}"><i class="fa fa-{{ route.icon }}"></i> {{ route.label|trans }}</a></li>
{% endfor %} {% endfor %}