Navbar improved

This commit is contained in:
mipel 2021-07-02 14:59:37 +02:00
parent 7b7865509a
commit 049d47c5f8
2 changed files with 57 additions and 55 deletions

View File

@ -23,7 +23,7 @@ body{
bottom: 0; bottom: 0;
width: 100%; width: 100%;
height: 40px; /* Set the fixed height of the footer here */ height: 40px; /* Set the fixed height of the footer here */
line-height: 40px; /* Vertically center the text there */ line-height: 39px; /* Vertically center the text there */
background-color: #f5f5f5; background-color: #f5f5f5;
border-top: 1px solid var(--rlp-gray-light); border-top: 1px solid var(--rlp-gray-light);
color: var(--rlp-gray-dark); color: var(--rlp-gray-dark);
@ -34,10 +34,11 @@ body{
text-decoration: none; text-decoration: none;
} }
.nav{ nav{
background-color: var(--rlp-red); background-color: var(--rlp-red);
height: 50px;
} }
.nav-icon{ .nav-icon{
color: white; color: white;
font-weight: bold; font-weight: bold;
@ -47,8 +48,6 @@ body{
.menu-elem{ .menu-elem{
border-left: 1px solid white; border-left: 1px solid white;
border-right: 1px solid white;
display: inline-block;
} }
.menu-elem:hover{ .menu-elem:hover{
@ -60,8 +59,4 @@ body{
.nav-btn{ .nav-btn{
color: white; color: white;
padding: 0.5rem; padding: 0.5rem;
margin: 0 0.5rem 0 0;
}
.nav-btn:hover{
} }

View File

@ -1,54 +1,61 @@
{% load i18n fontawesome_5 %} {% load i18n fontawesome_5 %}
<nav class="nav justify-content-between"> <nav class="navbar navbar-expand-lg">
<div class="d-flex align-items-center nav-icon ml-2" title="{% trans 'Kompensationsverzeichnis Service Portal' %}"> <div class="nav-icon mr-5" title="{% trans 'Kompensationsverzeichnis Service Portal' %}">
<strong class="">{% trans 'KSP' %}</strong> <strong class="">{% trans 'KSP' %}</strong>
</div> </div>
<div class="d-flex align-items-center justify-content-center"> <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<a class="nav-item menu-elem" href="{% url 'home' %}"> <span class="navbar-toggler-icon"></span>
<div class="btn nav-btn"> </button>
{% fa5_icon 'home' %}
{% trans 'Home' %} <div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto">
<li class="nav-item menu-elem">
<a class="nav-btn btn nav-link" href="{% url 'home' %}">
{% fa5_icon 'home' %}
{% trans 'Home' %}
</a>
</li>
<li class="nav-item menu-elem">
<a class="nav-btn btn nav-link" href="{% url 'home' %}">
{% fa5_icon 'pencil-ruler' %}
{% trans 'Intervention' %}
</a>
</li>
<li class="nav-item menu-elem">
<a class="nav-btn btn nav-link" href="{% url 'home' %}">
{% fa5_icon 'leaf' %}
{% trans 'Compensation' %}
</a>
</li>
<li class="nav-item menu-elem">
<a class="nav-btn btn nav-link" href="{% url 'home' %}">
{% fa5_icon 'tree' %}
{% trans 'Eco-account' %}
</a>
</li>
<li class="nav-item menu-elem dropdown" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
<a class="nav-btn btn nav-link">
{% fa5_icon 'ellipsis-v' %}
{% trans 'More' %}
</a>
<div class="dropdown-menu">
<a class="dropdown-item" href="{% url 'home' %}">{% fa5_icon 'euro-sign' %} {% trans 'EMA' %}</a>
<a class="dropdown-item" href="{% url 'home' %}">{% fa5_icon 'file-import' %} {% trans 'Import...' %}</a>
<a class="dropdown-item" href="{% url 'home' %}">{% fa5_icon 'file-export' %} {% trans 'Export...' %}</a>
<a class="dropdown-item" href="{% url 'home' %}">{% fa5_icon 'file-alt' %} {% trans 'Reports' %}</a>
</div>
</li>
</ul>
<div class="nav-item dropdown">
<div class="btn nav-btn" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
{% fa5_icon 'user-circle' %}
{{ user.username }}
</div> </div>
</a> <div class="dropdown-menu dropdown-menu-right">
<a class="nav-item menu-elem" href="{% url 'home' %}"> <a class="dropdown-item" href="{% url 'logout' %}">{% fa5_icon 'cogs' %} {% trans 'Settings' %}</a>
<div class="btn nav-btn"> <a class="dropdown-item" href="{% url 'logout' %}">{% fa5_icon 'sign-out-alt' %} {% trans 'Logout' %}</a>
{% fa5_icon 'pencil-ruler' %}
{% trans 'Intervention' %}
</div> </div>
</a>
<a class="nav-item menu-elem" href="{% url 'home' %}">
<div class="btn nav-btn">
{% fa5_icon 'leaf' %}
{% trans 'Compensation' %}
</div>
</a>
<a class="nav-item menu-elem" href="{% url 'home' %}">
<div class="btn nav-btn">
{% fa5_icon 'tree' %}
{% trans 'Eco-account' %}
</div>
</a>
<div class="nav-item menu-elem dropdown">
<div class="btn nav-btn" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
{% fa5_icon 'ellipsis-v' %}
{% trans 'More' %}
</div>
<div class="dropdown-menu">
<a class="dropdown-item" href="{% url 'home' %}">{% fa5_icon 'euro-sign' %} {% trans 'EMA' %}</a>
<a class="dropdown-item" href="{% url 'home' %}">{% fa5_icon 'file-import' %} {% trans 'Import...' %}</a>
<a class="dropdown-item" href="{% url 'home' %}">{% fa5_icon 'file-export' %} {% trans 'Export...' %}</a>
<a class="dropdown-item" href="{% url 'home' %}">{% fa5_icon 'file-alt' %} {% trans 'Reports' %}</a>
</div>
</div>
</div>
<div class="d-flex align-items-center nav-item ">
<div class="nav-btn" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
{% fa5_icon 'user-circle' %}
{{ user.username }}
</div>
<div class="dropdown-menu">
<a class="dropdown-item" href="{% url 'logout' %}">{% fa5_icon 'cogs' %} {% trans 'Settings' %}</a>
<a class="dropdown-item" href="{% url 'logout' %}">{% fa5_icon 'sign-out-alt' %} {% trans 'Logout' %}</a>
</div> </div>
</div> </div>
</nav> </nav>