Commit 2d7fcc610bb9f46b43cabe1fb3ff4a96cfd742f2

Authored by hitier
1 parent 7b83b0b5

New base page embedds VERSION number

Showing 2 changed files with 38 additions and 1 deletions   Show diff stats
app/templates/base_page.html 0 → 100644
... ... @@ -0,0 +1,34 @@
  1 +<!DOCTYPE html>
  2 +<html lang="en">
  3 +<head>
  4 +</head>
  5 +<body>
  6 +
  7 +<header>
  8 +</header>
  9 +<section>
  10 +
  11 + {% with messages = get_flashed_messages(with_categories=true) %}
  12 + {% if messages %}
  13 + <div id="messages">
  14 + {% for level, message in messages %}
  15 + <div class="alert alert-{{level}}" role="alert">{{ message }}</div>
  16 + {% endfor %}
  17 + </div>
  18 + {% endif %}
  19 + {% endwith %}
  20 +
  21 + <div class="content">
  22 +
  23 + {% block content %}{% endblock %}
  24 +
  25 + </div>
  26 +</section>
  27 +
  28 +<footer>
  29 + <p>© 2020 IRAP - <a id="redirect" href="{{ url_for('main.index') }}">Plan de Charge</a> - <span>{{ config.VERSION }}</span>
  30 + </p>
  31 +</footer>
  32 +</body>
  33 +
  34 +</html>
... ...
app/templates/index.html
1   -hello world
  1 +{% extends "base_page.html" %}
  2 +{% block content %}
  3 +<h1>Plan de Charge</h1>
  4 +{% endblock %}
... ...