diff options
Diffstat (limited to 'app/templates/base.html')
| -rw-r--r-- | app/templates/base.html | 60 | 
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> | 
