Merge pull request #476 from bornhack/menu-fix

Fixed top menu that wrapped around on narrow view
This commit is contained in:
Víðir Valberg Guðmundsson 2020-03-05 07:03:26 +01:00 committed by GitHub
commit be47e43969
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 27 additions and 9 deletions

View file

@ -62,8 +62,8 @@ a, a:active, a:focus {
margin-top: 6px; margin-top: 6px;
} }
#top-navbar > .nav li a { #top-navbar > .nav > li > a {
padding: 30px 7px; padding: 30px 7px;
} }
.nav .dropdown-menu { .nav .dropdown-menu {
@ -98,7 +98,11 @@ a, a:active, a:focus {
border-top: 1px solid #ccc; border-top: 1px solid #ccc;
} }
.navbar .nav li a { .navbar .nav li a {
padding: 15px; padding: 20px !important;
}
.btn-group-vertical > .btn{
padding: 20px;
} }
} }

View file

@ -78,16 +78,30 @@
<li><a href="{% url 'wish_list_redirect' %}">Wishlist</a></li> <li><a href="{% url 'wish_list_redirect' %}">Wishlist</a></li>
{% if request.user.is_staff %} {% if request.user.is_staff %}
<li><a href="{% url 'admin:index' %}">Django Admin</a></li> <li><a href="{% url 'admin:index' %}">Admin</a></li>
{% endif %} {% endif %}
</ul> </ul>
<ul class="nav navbar-nav navbar-right"> <ul class="nav navbar-nav navbar-right">
{% if user.is_authenticated %} {% if user.is_authenticated %}
<li><a href="{% url 'profiles:detail' %}">Account</a></li> <li class="dropdown">
<li> <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Account<span class="caret"></span></a>
<a href="{% url 'account_logout' %}"> <ul class="dropdown-menu">
Logout <li><a href="{% url 'profiles:detail' %}">Profile</a></li>
</a> {% if user.orders.exists %}
{% url 'shop:order_list' as orders_list_url %}
<li><a href="{{ orders_list_url }}">Orders</a></li>
{% url 'tickets:shopticket_list' as ticket_list_url %}
<li><a href="{{ ticket_list_url }}">Tickets</a></li>
{% if user.creditnotes.exists %}
{% url 'shop:creditnote_list' as creditnote_list_url %}
<li><a href="{{ creditnote_list_url }}">Credit Notes</a></li>
{% endif %}
{% endif %}
<li role="separator" class="divider"></li>
<li><a href="{% url 'account_logout' %}">Logout</a></li>
</ul>
</li> </li>
{% else %} {% else %}
<li><a href="{% url 'account_login' %}">Login</a></li> <li><a href="{% url 'account_login' %}">Login</a></li>