aboutsummaryrefslogtreecommitdiff
path: root/gn2/wqflask/templates/base_macro.html
blob: 7fcb6fe78480f9a2cda63b51b48dcd1ee3295605 (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
{% macro flash_me() -%}
    {% with messages = get_flashed_messages(with_categories=true) %}
        {% if messages %}
        <div class="container">
            {% for category, message in messages %}
                <div class="alert {{ category }}" role="alert">{{ message }}</div>
            {% endfor %}
        </div>
        {% endif %}
    {% endwith %}
{% endmacro %}

{% macro header(main, second) %}
    <header class="jumbotron subhead" id="overview" >
        <div class="container">
            <h1>{{ main }}</h1>
            <p class="lead">
               {{ second }}
            </p>
        </div>
    </header>

    {{ flash_me() }}
{% endmacro %}

{% macro timeago(timestamp) %}
<time class="timeago" datetime="{{ timestamp }}">{{ timestamp }}</time>
{% endmacro %}