summaryrefslogtreecommitdiff
path: root/app/templates/base.html
diff options
context:
space:
mode:
authorMarius Peter <marius.peter@tutanota.com>2022-05-01 21:38:59 +0200
committerMarius Peter <marius.peter@tutanota.com>2022-05-01 21:38:59 +0200
commitcaa0e1db19c0616031f7879d4298ed152b05f557 (patch)
tree927a70654c46c27cb9f313ac6020efa863b32035 /app/templates/base.html
parentce73f10a4aaa717de025fd2dc591294fea0db8de (diff)
Jinja2 templates.
Diffstat (limited to 'app/templates/base.html')
-rw-r--r--app/templates/base.html60
1 files changed, 35 insertions, 25 deletions
diff --git a/app/templates/base.html b/app/templates/base.html
index 0b53b5c..b5f507d 100644
--- a/app/templates/base.html
+++ b/app/templates/base.html
@@ -1,30 +1,40 @@
-{# -*- mode: jinja2; -*- #}
+{# -*- 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="/favicon.ico"> -->
- <link rel="stylesheet" href="{{ url_for('static', filename='styles/style.css') }}">
- </head>
- <body>
- <nav>
- <a href="/" class="button">Home</a>
- <h1>{% block title %}{% endblock %}</h1>
- <ul>
- {% for module in modules %}
- <li><a href="/module/{{ module.name }}" class="button">{{ module.name }}</a></li>
- {% endfor %}
- </ul>
- </nav>
- <div id="content">
- {% block content %}{% endblock %}
- </div>
- <!-- <script src="js/scripts.js"></script> -->
- </body>
+ <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>
+ <a href="/" class="button">Home</a>
+ <h1>{% block title %}{% endblock %}</h1>
+ <ul>
+ {% for module in modules %}
+ <li><a href="/modules/{{ module.name }}" class="button">{{ module.name }}</a></li>
+ {% endfor %}
+ </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 %}
+ <ul class="flashes">
+ {% for category, message in messages %}
+ <li class="alert alert-{{ category }}">{{ message }}</li>
+ {% endfor %}
+ </ul>
+ {% endif %}
+ {% endwith %}
+ <!-- <script src="js/scripts.js"></script> -->
+ </body>
</html>
Copyright 2019--2024 Marius PETER