husstanden/templates/layout/includes/top_nav.html

107 lines
2.7 KiB
HTML
Raw Normal View History

2019-04-24 15:57:54 +02:00
<style>
.rndblock {
border-radius: 100%;
2019-05-12 16:04:25 +02:00
background: #506EE4;
2019-04-25 17:44:41 +02:00
background-position: center;
2019-04-24 15:57:54 +02:00
width: 40px;
height: 40px;
color: white;
text-align: center;
font-size: 24px;
vertical-align: middle;
display: table-cell;
2019-04-26 07:05:19 +02:00
cursor: pointer;
2019-04-24 15:57:54 +02:00
}
2019-05-12 16:04:25 +02:00
.lang-icon {
background-position: left;
background-size: contain;
width: 32px;
height: 24px;
color: white;
text-align: center;
font-size: 24px;
vertical-align: middle;
display: table-cell;
}
.lang-en {
2019-04-25 17:44:41 +02:00
background-image: url("{{ url_for('static', filename='const/img/flags/gb.svg') }}");
2019-04-24 15:57:54 +02:00
}
2019-05-12 16:04:25 +02:00
.lang-no {
2019-04-25 17:44:41 +02:00
background-image: url("{{ url_for('static', filename='const/img/flags/no.svg') }}");
2019-04-24 15:57:54 +02:00
}
2019-04-25 17:52:45 +02:00
.icon-buttons > .col {
padding-right: 6px;
padding-left: 6px;
}
.topnav a {
color: black;
}
2019-04-24 15:57:54 +02:00
</style>
2019-04-25 17:52:45 +02:00
<nav class="navbar topnav" style="margin-bottom: 10px;">
2019-05-12 16:04:25 +02:00
<h3>{{ _(title) | title }}</h3>
2019-04-26 03:53:37 +02:00
<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>
2019-04-25 17:52:45 +02:00
<div class="my-2 my-lg-0 d-flex icon-buttons">
2019-04-24 15:57:54 +02:00
<div class="col">
2019-05-12 16:04:25 +02:00
<div class="rndblock lang-{{ session.lang }}" data-toggle="dropdown" aria-expanded="false"></div>
<ul class="dropdown-menu">
<li>
<div class="row">
<a class="col d-flex m-1" href="?lang=en">
<div class="lang-icon lang-en"></div>
<div class="flex-grow-1"></div>
<span>{{ _("english") | title }}</span>
<div class="flex-grow-1"></div>
</a>
2019-05-12 20:36:06 +02:00
</div>
<div class="row">
2019-05-12 16:04:25 +02:00
<a class="col d-flex m-1" href="?lang=no">
<div class="lang-icon lang-no"></div>
<div class="flex-grow-1"></div>
<span>{{ _("norwegian") | title }}</span>
<div class="flex-grow-1"></div>
</a>
</div>
</li>
</ul>
2019-04-24 15:57:54 +02:00
</div>
<div class="col">
<div class="rndblock">
<i class="fas fa-bell"></i>
</div>
</div>
<div class="col">
2019-04-26 07:05:19 +02:00
<div class="rndblock" data-toggle="dropdown" aria-expanded="false"> <!-- OR INCLUDE BACKGROUND TEXTURE -->
2019-04-26 04:52:54 +02:00
{{ current_user.firstname[0]|upper }} <!-- FIRST CHAR OF USER -->
2019-04-24 15:57:54 +02:00
</div>
2019-04-26 07:05:19 +02:00
<ul class="dropdown-menu">
<li>
<div class="row">
<div class="col">
2019-05-12 16:04:25 +02:00
<a href="{{ url_for('logout') }}">{{ _("Sign out") }}</a>
2019-04-26 07:05:19 +02:00
</div>
</div>
</li>
</ul>
2019-04-24 15:57:54 +02:00
</div>
</div>
</nav>