View raw

1 {# -*- mode: web; -*- #} 2 3 <!doctypehtml> 4 5 <html lang="en"> 6 <head> 7 <metacharset="utf-8"> 8 <metaname="viewport"content="width=device-width, initial-scale=1, shrink-to"> 9 <title>Farm Manager</title> 10 <metaname="author"content="Marius Peter"> 11 <metaname="description"content="A draft page for Farm Manager."> 12 <!-- <link rel="icon" href="{{ url_for('static', filename='img/favicon.png') }}"> --> 13 <linkrel="stylesheet"href="{{ url_for('static', filename='styles/style.css') }}"> 14 </head> 15 <body> 16 <nav id="user"> 17 <div style="display: flex; align-items: baseline;"> 18 <ul> 19 <li><a href="{{ url_for('main.home') }}" class="button">Home</a></li> 20 </ul> 21 <h1>{% block title %}{% endblock %}</h1> 22 </div> 23 <ul> 24 {% if current_user.is_authenticated %} 25 <li><a href="{{ url_for('common.settings') }}" class="button">Settings</a></li> 26 <li><a href="{{ url_for('auth.logout') }}" class="button">Logout</a></li> 27 {% else %} 28 <li><a href="{{ url_for('auth.login') }}" class="button">Login</a></li> 29 <li><a href="{{ url_for('auth.register') }}" class="button">Register</a></li> 30 {% endif %} 31 </ul> 32 </nav> 33 {% if current_user.is_authenticated %} 34 <nav id="modules"> 35 <ul> 36 {% for module in modules %} 37 <li><a href="{{ url_for(module.name + '.view') }}" class="button">{{ module.name }}</a></li> 38 {% endfor %} 39 40 </ul> 41 </nav> 42 <nav id="actions"> 43 <ul> 44 {% block actions %}{% endblock %} 45 </ul> 46 </nav> 47 {% endif %} 48 <div id="content"> 49 {% block content %}{% endblock %} 50 </div> 51 {# Flashed messages added last, so that they appear on top of the content. #} 52 {% with messages = get_flashed_messages(with_categories=true) %} 53 {% if messages %} 54 <div id="flash"> 55 <ul> 56 {% for category, message in messages %} 57 <li class="alert alert-{{ category }}">{{ message }}</li> 58 {% endfor %} 59 </ul> 60 </div> 61 {% endif %} 62 {% endwith %} 63 <!-- <script src="js/scripts.js"></script> --> 64 </body> 65 </html> 66