diff options
Diffstat (limited to 'app/templates/base.html')
-rw-r--r-- | app/templates/base.html | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/app/templates/base.html b/app/templates/base.html new file mode 100644 index 0000000..7a63ddf --- /dev/null +++ b/app/templates/base.html @@ -0,0 +1,50 @@ +{# -*- mode: web; -*- #} + +<!doctype html> + +<html lang="en"> + <head> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to"> + <title>mdl</title> + <meta name="author" content="Marius Peter"> + <meta name="description" content="A draft page for mdl."> + <!-- <link rel="icon" href="{{ url_for('static', filename='img/favicon.png') }}"> --> + <link rel="stylesheet" href="{{ url_for('static', filename='styles/style.css') }}"> + </head> + <body> + <nav id="user"> + <div style="display: flex; align-items: baseline;"> + <ul> + <li><a href="https:apps.mlnp.fr" class="button">Apps</a></li> + </ul> + <h1>{% block title %}{% endblock %}</h1> + </div> + <ul> + {% if current_user.is_authenticated %} + <li><a href="{{ url_for('common.settings') }}" class="button">Settings</a></li> + <li><a href="{{ url_for('auth.logout') }}" class="button">Logout</a></li> + {% else %} + <li><a href="{{ url_for('auth.login') }}" class="button">Login</a></li> + <li><a href="{{ url_for('auth.register') }}" class="button">Register</a></li> + {% endif %} + </ul> + </nav> + <div id="content"> + {% block content %}{% endblock %} + </div> + {# Flashed messages added last, so that they appear on top of the content. #} + {% with messages = get_flashed_messages(with_categories=true) %} + {% if messages %} + <div id="flash"> + <ul> + {% for category, message in messages %} + <li class="alert alert-{{ category }}">{{ message }}</li> + {% endfor %} + </ul> + </div> + {% endif %} + {% endwith %} + <!-- <script src="js/scripts.js"></script> --> + </body> +</html> |