igdb/code/app/templates/base.html

56 lines
1.9 KiB
HTML

{% extends 'bootstrap/base.html' %}
{% block title %}
IGDB
{% endblock %}
{% block styles %}
<link rel="stylesheet"
href="{{url_for('.static', filename='bootstrap.min.css')}}">
{% endblock %}
{% block navbar %}
<nav class="navbar navbar-expand-lg navbar-dark bg-primary">
<a class="navbar-brand" href="{{ url_for('index') }}">IGDB</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarColor01" aria-controls="navbarColor01" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarColor01">
<ul class="navbar-nav mr-auto">
<li class="nav-item active">
<a class="nav-link" href="{{ url_for('index') }}">Home <span class="sr-only">(current)</span></a>
</li>
{% if current_user.is_anonymous %}
<li class="nav-link"><a href="{{ url_for('data') }}">Data</a></li>
{% else %}
<li class="nav-link"><a href="{{ url_for('data') }}">Data</a></li>
<li class="nav-link"><a href="{{ url_for('admin') }}">Administration</a></li>
{% endif %}
</ul>
<ul class="navbar-nav navbar-right">
{% if current_user.is_anonymous %}
<li class="nav-link"><a href="{{ url_for('login') }}">Login</a></li>
{% else %}
<li class="nav-item"><a href="{{ url_for('logout') }}">Logout</a></li>
{% endif %}
</ul>
</div>
</nav>
{% endblock %}
{% block content %}
<div class="container">
{% with messages = get_flashed_messages() %}
{% if messages %}
{% for message in messages %}
<div class="alert alert-info" role="alert">{{ message }}</div>
{% endfor %}
{% endif %}
{% endwith %}
{# application content needs to be provided in the app_content block #}
{% block app_content %}{% endblock %}
</div>
{% endblock %}