husstanden/templates/layout/includes/top_nav.html
2019-04-26 06:05:19 +01:00

74 lines
1.8 KiB
HTML

<style>
.rndblock {
border-radius: 100%;
background: #B507DB;
background-position: center;
width: 40px;
height: 40px;
color: white;
text-align: center;
font-size: 24px;
vertical-align: middle;
display: table-cell;
cursor: pointer;
}
.languk {
background-image: url("{{ url_for('static', filename='const/img/flags/gb.svg') }}");
}
.langno {
background-image: url("{{ url_for('static', filename='const/img/flags/no.svg') }}");
}
.icon-buttons > .col {
padding-right: 6px;
padding-left: 6px;
}
.topnav a {
color: black;
}
</style>
<nav class="navbar topnav" style="margin-bottom: 10px;">
<h3>{{ title }}</h3>
<div>
{% with messages = get_flashed_messages(with_categories = true) %}
{% if messages %}
{% for category, message in messages %}
<div class="alert alert-{{ category }} fade in show" role="alert" style="margin-bottom:0px;padding:6px;">
<a href="#" class="close" data-dismiss="alert" aria-label="close" style="margin-left:10px;">&times;</a>
{{ message }}
</div>
{% endfor %}
{% endif %}
{% endwith %}
</div>
<div class="my-2 my-lg-0 d-flex icon-buttons">
<div class="col">
<div class="rndblock languk"></div>
</div>
<div class="col">
<div class="rndblock">
<i class="fas fa-bell"></i>
</div>
</div>
<div class="col">
<div class="rndblock" data-toggle="dropdown" aria-expanded="false"> <!-- OR INCLUDE BACKGROUND TEXTURE -->
{{ current_user.firstname[0]|upper }} <!-- FIRST CHAR OF USER -->
</div>
<ul class="dropdown-menu">
<li>
<div class="row">
<div class="col">
<a href="{{ url_for('logout') }}">Sign out</a>
</div>
</div>
</li>
</ul>
</div>
</div>
</nav>