/
page.html
83 lines (71 loc) · 2.37 KB
/
page.html
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
{% extends "base.jinja.html" %}
{%- block page -%}
{#
Override the header on a page by page basis by extending this block. If
making sitewide header changes it is preferable to override the header.html
file.
#}
{%- block header %}
{% include "header.jinja.html" %}
{% endblock -%}
{# The content block allows you to replace the content of the page if needed #}
{%- block content %}
<div role="main">
<div class="container">
{% block flash %}
{% set flash_messages = h.flash.pop_messages() | list %}
{% for message in flash_messages %}
<div class="flash-messages">
<div class="alert {{ message.category }}">
{{ h.literal(message) }}
</div>
</div>
{% endfor %}
{% endblock %}
{% block toolbar %}
<div class="toolbar">
{% block breadcrumb %}{% endblock %}
{% block actions %}{% endblock %}
</div>
{% endblock %}
{% block primary %}
<div class="primary">
{#
The primary_content block can be used to add content to the page.
This is the main block that is likely to be used within a template.
Example:
{% block primary_content %}
<h1>My page content</h1>
<p>Some content for the page</p>
{% endblock %}
#}
{% block primary_content %}{% endblock %}
</div>
{% endblock %}
{% block secondary %}
<aside class="secondary">
{#
The secondary_content block can be used to add content to the
sidebar of the page. This is the main block that is likely to be
used within a template.
Example:
{% block secondary_content %}
<h2>A sidebar item</h2>
<p>Some content for the item</p>
{% endblock %}
#}
{% block secondary_content %}{% endblock %}
</aside>
{% endblock %}
</div>
</div>
{% endblock -%}
{#
Override the footer on a page by page basis by extending this block. If
making sitewide header changes it is preferable to override the footer.html-u
file.
#}
{%- block footer %}
{% include "footer.jinja.html" %}
{% endblock -%}
{%- endblock -%}