90 lines
3.3 KiB
HTML
90 lines
3.3 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<meta name="description" content="">
|
|
<meta name="author" content="">
|
|
<link rel="icon" href="/static/favicon.ico">
|
|
|
|
<title>{% block title %}Unknown View{% endblock %} - Kasownik</title>
|
|
|
|
<!-- Bootstrap core CSS -->
|
|
<link href="/static/css/bootstrap.min.css" rel="stylesheet">
|
|
|
|
<!-- Custom styles for this template -->
|
|
<link href="/static/css/main.css" rel="stylesheet">
|
|
|
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
|
|
{% block extraheader %}
|
|
{% endblock %}
|
|
</head>
|
|
|
|
<body>
|
|
{% set navigation_bar = [
|
|
('/', 'dashboard', 'stats', 'Stats', True),
|
|
('/memberlist', 'list', 'memberlist', 'Member List', True),
|
|
('/profile', 'info-sign', 'profile', 'Profile', True),
|
|
('/admin', 'cog', 'admin', 'Admin', current_user.is_admin() )
|
|
] -%}
|
|
<nav class="navbar navbar-inverse navbar-fixed-top">
|
|
<div class="container">
|
|
<div class="navbar-header">
|
|
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
|
|
<span class="sr-only">Toggle navigation</span>
|
|
<span class="icon-bar"></span>
|
|
<span class="icon-bar"></span>
|
|
<span class="icon-bar"></span>
|
|
</button>
|
|
<a class="navbar-brand" href="#">Kasownik HSWAW</a>
|
|
</div>
|
|
<div id="navbar" class="collapse navbar-collapse">
|
|
<ul class="nav navbar-nav">
|
|
{% set active_page = active_page|default('unknown') -%}
|
|
{% for url, glyphicon, id, label, should_display in navigation_bar %}
|
|
{% if should_display %}
|
|
<li{% if id == active_page %} class="active"{% endif %}>
|
|
<a href="{{ url }}">
|
|
<span class="glyphicon glyphicon-{{glyphicon}}"></span> {{label}}
|
|
</a>
|
|
</li>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</ul>
|
|
<ul class="nav navbar-nav navbar-right">
|
|
{% if current_user.is_authenticated() %}
|
|
<li><a href="/logout"><span class="glyphicon glyphicon-user"></span> <b>{{current_user.username}}</b>{% if current_user.is_admin() %} (g0t r00t){% endif %}</a></li>
|
|
{% else %}
|
|
<li><a href="/login"><span class="glyphicon glyphicon-user"></span> Sign in</a></li>
|
|
{% endif %}
|
|
</ul>
|
|
</div><!--/.nav-collapse -->
|
|
</div>
|
|
</nav>
|
|
|
|
{% with messages = get_flashed_messages() %}
|
|
{% if messages %}
|
|
<div class="flashes">
|
|
{% for message in messages %}
|
|
<div class="alert alert-info alert-dismissible" role="alert">
|
|
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
|
|
{{message}}
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
{% endwith %}
|
|
|
|
{% block content %}{% endblock %}
|
|
|
|
<!-- Bootstrap core JavaScript
|
|
================================================== -->
|
|
<!-- Placed at the end of the document so the pages load faster -->
|
|
<script src="/static/js/bootstrap.min.js"></script>
|
|
{% block extrajs %}
|
|
{% endblock %}
|
|
</body>
|
|
</html>
|
|
|