summaryrefslogtreecommitdiff
path: root/app/templates/base.html
blob: d01444eb63d62f77f4e3d9c6040bc99547029283 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
{# -*- 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>Farm Manager</title>
	<meta name="author" content="Marius Peter">
	<meta name="description" content="A draft page for Farm Manager.">
	<!-- <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="{{ url_for('main.home') }}" class="button">Home</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>
	{% if current_user.is_authenticated %}
	<nav id="modules">
	    <ul>
		{% for module in modules %}
		<li><a href="{{ url_for(module.name + '.view') }}" class="button">{{ module.name }}</a></li>
		{% endfor %}

	    </ul>
	</nav>
	<nav id="actions">
	    <ul>
		{% block actions %}{% endblock %}
	    </ul>
	</nav>
	{% endif %}
	<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>
Copyright 2019--2024 Marius PETER