4c69d120cd
Change-Id: Ie0c439244f1ae3af707b73ef64b1a411c2aede20
40 lines
1.2 KiB
Django/Jinja
40 lines
1.2 KiB
Django/Jinja
<!doctype html>
|
|
|
|
<meta charset=utf-8>
|
|
<title>{% block title %}{% endblock %}</title>
|
|
<link rel=stylesheet media=screen href="{{ url_for('static', filename='css/bootstrap.min.css') }}">
|
|
|
|
<div class=container>
|
|
<div class=navbar>
|
|
<div class=navbar-inner>
|
|
<span class=brand>Flask-Login example</span>
|
|
<ul class=nav>
|
|
{% for endpoint in [
|
|
'index',
|
|
'restricted',
|
|
'login' if current_user.is_anonymous() else 'logout',
|
|
] %}
|
|
<li {% if endpoint == request.endpoint %}class=active{% endif %}>
|
|
<a href="{{ url_for(endpoint) }}">{{ endpoint.capitalize() }}</a>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
{% with messages = get_flashed_messages(with_categories=True) %}
|
|
{% if messages %}
|
|
{% for category, message in messages %}
|
|
<div class="alert{{ ' alert-%s' % category if category != 'message' else '' }}">
|
|
<button type=button class=close data-dismiss="alert">×</button>
|
|
{{ message }}
|
|
</div>
|
|
{% endfor %}
|
|
{% endif %}
|
|
{% endwith %}
|
|
{% block content %}
|
|
{% endblock %}
|
|
</div>
|
|
|
|
<script src="{{ url_for('static', filename='js/jquery-1.8.3.min.js') }}"></script>
|
|
<script src="{{ url_for('static', filename='js/bootstrap.min.js') }}"></script>
|