-
Notifications
You must be signed in to change notification settings - Fork 2k
/
page.html
137 lines (122 loc) · 4.6 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
{% extends "base.html" %}
{%- block page -%}
{% block skip %}
<div class="hide"><a href="#content">{{ _('Skip to content') }}</a></div>
{% endblock %}
{#
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.html" %}
{% endblock -%}
{# The content block allows you to replace the content of the page if needed #}
{%- block content %}
{% block maintag %}<div role="main">{% endblock %}
<div id="content" class="container">
{% block main_content %}
{% block flash %}
{% set flash_messages = h.flash.pop_messages() | list %}
<div class="flash-messages">
{% for message in flash_messages %}
<div class="alert fade in {{ message.category }}">
{{ h.literal(message) }}
</div>
{% endfor %}
</div>
{% endblock %}
{% block toolbar %}
<div class="toolbar">
{% block breadcrumb %}
{% if self.breadcrumb_content() | trim %}
<ol class="breadcrumb">
{% snippet 'snippets/home_breadcrumb_item.html' %}
{% block breadcrumb_content %}{% endblock %}
</ol>
{% endif %}
{% endblock %}
</div>
{% endblock %}
<div class="wrapper{% block wrapper_class %}{% endblock %}{% if self.secondary()|trim == '' %} no-nav{% endif %}">
{#
The pre_primary block can be used to add content to before the
rendering of the main content columns of the page.
#}
{% block pre_primary %}
{% 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 %}
<article class="module">
{% block page_header %}
<header class="module-content page-header">
{% if self.content_action() | trim %}
<div class="content_action">
{% block content_action %}{% endblock %}
</div>
{% endif %}
<ul class="nav nav-tabs">
{% block content_primary_nav %}{% endblock %}
</ul>
</header>
{% endblock %}
<div class="module-content">
{% if self.page_primary_action() | trim %}
<div class="page_primary_action">
{% block page_primary_action %}{% endblock %}
</div>
{% endif %}
{% block primary_content_inner %}
{% endblock %}
</div>
</article>
{% 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>
{% 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.html" %}
{% endblock -%}
{%- endblock -%}
{%- block scripts %}
{% resource 'base/main' %}
{% resource 'base/ckan' %}
{% if g.tracking_enabled %}
{% resource 'base/tracking.js' %}
{% endif %}
{{ super() }}
{% endblock -%}