Project

General

Profile

« Previous | Next » 

Revision 35fc58ae

Added by Serghei Mihai over 9 years ago

primary page block's style override (#6534)

View differences:

ckanext/ozwillo_theme/templates/page.html
1
{% extends "base.html" %}
2

  
3
{%- block page -%}
4

  
5
  {% block skip %}
6
    <div class="hide"><a href="#content">{{ _('Skip to content') }}</a></div>
7
  {% endblock %}
8

  
9
  {#
10
  Override the header on a page by page basis by extending this block. If
11
  making sitewide header changes it is preferable to override the header.html
12
  file.
13
  #}
14
  {%- block header %}
15
    {% include "header.html" %}
16
  {% endblock -%}
17

  
18
  {# The content block allows you to replace the content of the page if needed #}
19
  {%- block content %}
20
    {% block maintag %}<div role="main">{% endblock %}
21
      <div id="content" class="container">
22
        {% block main_content %}
23
          {% block flash %}
24
            <div class="flash-messages">
25
              {% block flash_inner %}
26
                {% for message in h.flash.pop_messages() | list %}
27
                  <div class="alert fade in {{ message.category }}">
28
                    {{ h.literal(message) }}
29
                  </div>
30
                {% endfor %}
31
              {% endblock %}
32
            </div>
33
          {% endblock %}
34

  
35
          {% block toolbar %}
36
            <div class="toolbar">
37
              {% block breadcrumb %}
38
                {% if self.breadcrumb_content() | trim %}
39
                  <ol class="breadcrumb">
40
                    {% snippet 'snippets/home_breadcrumb_item.html' %}
41
                    {% block breadcrumb_content %}{% endblock %}
42
                  </ol>
43
                {% endif %}
44
              {% endblock %}
45
            </div>
46
          {% endblock %}
47

  
48
          <div class="row wrapper{% block wrapper_class %}{% endblock %}{% if self.secondary()|trim == '' %} no-nav{% endif %}">
49

  
50
            {#
51
            The pre_primary block can be used to add content to before the
52
            rendering of the main content columns of the page.
53
            #}
54
            {% block pre_primary %}
55
            {% endblock %}
56

  
57
            {% block primary %}
58
              <div class="primary span12">
59
                {#
60
                The primary_content block can be used to add content to the page.
61
                This is the main block that is likely to be used within a template.
62

  
63
                Example:
64

  
65
                  {% block primary_content %}
66
                    <h1>My page content</h1>
67
                    <p>Some content for the page</p>
68
                  {% endblock %}
69
                #}
70
                {% block primary_content %}
71
                  <article class="module">
72
                    {% block page_header %}
73
                      <header class="module-content page-header">
74
                        {% if self.content_action() | trim %}
75
                          <div class="content_action">
76
                            {% block content_action %}{% endblock %}
77
                          </div>
78
                        {% endif %}
79
                        <ul class="nav nav-tabs">
80
                          {% block content_primary_nav %}{% endblock %}
81
                        </ul>
82
                      </header>
83
                    {% endblock %}
84
                    <div class="module-content">
85
                      {% if self.page_primary_action() | trim %}
86
                        <div class="page_primary_action">
87
                          {% block page_primary_action %}{% endblock %}
88
                        </div>
89
                      {% endif %}
90
                      {% block primary_content_inner %}
91
                      {% endblock %}
92
                    </div>
93
                  </article>
94
                {% endblock %}
95
              </div>
96
            {% endblock %}
97

  
98
            {% block secondary %}
99
              <aside class="secondary span3">
100
                {#
101
                The secondary_content block can be used to add content to the
102
                sidebar of the page. This is the main block that is likely to be
103
                used within a template.
104

  
105
                Example:
106

  
107
                  {% block secondary_content %}
108
                    <h2>A sidebar item</h2>
109
                    <p>Some content for the item</p>
110
                  {% endblock %}
111
                #}
112
                {% block secondary_content %}{% endblock %}
113
              </aside>
114
            {% endblock %}
115
          </div>
116
        {% endblock %}
117
      </div>
118
    </div>
119
  {% endblock -%}
120

  
121
  {#
122
  Override the footer on a page by page basis by extending this block. If
123
  making sitewide header changes it is preferable to override the footer.html-u
124
  file.
125
  #}
126
  {%- block footer %}
127
    {% include "footer.html" %}
128
  {% endblock -%}
129
{%- endblock -%}
130

  
131
{%- block scripts %}
132
    {% resource 'base/main' %}
133
    {% resource 'base/ckan' %}
134
    {% if g.tracking_enabled %}
135
      {% resource 'base/tracking.js' %}
136
    {% endif %}
137
  {{ super() }}
138
{% endblock -%}

Also available in: Unified diff