annotate sat_templates/templates/default/components/block.html @ 311:c9396c3711e4

bulma (base): add "footer" block
author Goffi <goffi@goffi.org>
date Fri, 19 Mar 2021 15:49:51 +0100
parents 03c8fd941c0c
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
129
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
1 {% macro separator(label, align='center') %}
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
2 {# display a bloc separator
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
3 @param label(unicode): label to show
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
4 @param align(unicode): one of "left", "center", "right"
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
5 #}
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
6 <div class="block_separator">
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
7 {% if align in ('center', 'right') %}
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
8 <div class="block_separator__line"></div>
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
9 {% endif %}
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
10 <div class="block_separator__label">
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
11 {{label}}
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
12 </div>
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
13 {% if align in ('center', 'left') %}
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
14 <div class="block_separator__line"></div>
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
15 {% endif %}
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
16 </div>
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
17 {% endmacro %}
138
85877c76d47d merge-request: discovery page
Goffi <goffi@goffi.org>
parents: 129
diff changeset
18
85877c76d47d merge-request: discovery page
Goffi <goffi@goffi.org>
parents: 129
diff changeset
19 {% macro disco_icon_grid(disco_entities, icon_name) %}
85877c76d47d merge-request: discovery page
Goffi <goffi@goffi.org>
parents: 129
diff changeset
20 {# display discovered entities in a grid
85877c76d47d merge-request: discovery page
Goffi <goffi@goffi.org>
parents: 129
diff changeset
21 @param disco_entities: entities which mush have a name and url key or attribute
85877c76d47d merge-request: discovery page
Goffi <goffi@goffi.org>
parents: 129
diff changeset
22 @param icon_name: name of a defined icon
85877c76d47d merge-request: discovery page
Goffi <goffi@goffi.org>
parents: 129
diff changeset
23 #}
85877c76d47d merge-request: discovery page
Goffi <goffi@goffi.org>
parents: 129
diff changeset
24 <ul class="grid grid--center">
85877c76d47d merge-request: discovery page
Goffi <goffi@goffi.org>
parents: 129
diff changeset
25 {% for disco_entity in disco_entities %}
85877c76d47d merge-request: discovery page
Goffi <goffi@goffi.org>
parents: 129
diff changeset
26 <li class='grid__item grid__item--medium grid__item--selectable'>
85877c76d47d merge-request: discovery page
Goffi <goffi@goffi.org>
parents: 129
diff changeset
27 <a href="{{disco_entity.url}}" class="items_vert--centered">
172
4a03d0a6839b css (styles): various styles improvments:
Goffi <goffi@goffi.org>
parents: 164
diff changeset
28 {{ icon(icon_name, cls='icon--block icon--medium') }}
138
85877c76d47d merge-request: discovery page
Goffi <goffi@goffi.org>
parents: 129
diff changeset
29 <span>{{ disco_entity.name }}</span>
85877c76d47d merge-request: discovery page
Goffi <goffi@goffi.org>
parents: 129
diff changeset
30 </a>
85877c76d47d merge-request: discovery page
Goffi <goffi@goffi.org>
parents: 129
diff changeset
31 </li>
85877c76d47d merge-request: discovery page
Goffi <goffi@goffi.org>
parents: 129
diff changeset
32 {% endfor %}
85877c76d47d merge-request: discovery page
Goffi <goffi@goffi.org>
parents: 129
diff changeset
33 </ul>
85877c76d47d merge-request: discovery page
Goffi <goffi@goffi.org>
parents: 129
diff changeset
34 {% endmacro %}
196
03c8fd941c0c event, photo, components: moved interests grid in a macro (in components/block)
Goffi <goffi@goffi.org>
parents: 172
diff changeset
35
03c8fd941c0c event, photo, components: moved interests grid in a macro (in components/block)
Goffi <goffi@goffi.org>
parents: 172
diff changeset
36 {% macro interests_grid(interests, default_icon_name) %}
03c8fd941c0c event, photo, components: moved interests grid in a macro (in components/block)
Goffi <goffi@goffi.org>
parents: 172
diff changeset
37 {# display list of interests
03c8fd941c0c event, photo, components: moved interests grid in a macro (in components/block)
Goffi <goffi@goffi.org>
parents: 172
diff changeset
38 @param interests: list of interests
03c8fd941c0c event, photo, components: moved interests grid in a macro (in components/block)
Goffi <goffi@goffi.org>
parents: 172
diff changeset
39 @param default_icon_name: name of a defined icon to use when no thumb_url is available
03c8fd941c0c event, photo, components: moved interests grid in a macro (in components/block)
Goffi <goffi@goffi.org>
parents: 172
diff changeset
40 #}
03c8fd941c0c event, photo, components: moved interests grid in a macro (in components/block)
Goffi <goffi@goffi.org>
parents: 172
diff changeset
41 <ul class="grid grid--center">
03c8fd941c0c event, photo, components: moved interests grid in a macro (in components/block)
Goffi <goffi@goffi.org>
parents: 172
diff changeset
42 {% for interest in interests %}
03c8fd941c0c event, photo, components: moved interests grid in a macro (in components/block)
Goffi <goffi@goffi.org>
parents: 172
diff changeset
43 <li class='grid__item grid__item--medium grid__item--selectable'>
03c8fd941c0c event, photo, components: moved interests grid in a macro (in components/block)
Goffi <goffi@goffi.org>
parents: 172
diff changeset
44 <a href="{{interest.url}}">
03c8fd941c0c event, photo, components: moved interests grid in a macro (in components/block)
Goffi <goffi@goffi.org>
parents: 172
diff changeset
45 {% if interest.thumb_url %}
03c8fd941c0c event, photo, components: moved interests grid in a macro (in components/block)
Goffi <goffi@goffi.org>
parents: 172
diff changeset
46 <img class="img--small" src="{{interest.thumb_url}}">
03c8fd941c0c event, photo, components: moved interests grid in a macro (in components/block)
Goffi <goffi@goffi.org>
parents: 172
diff changeset
47 {% else %}
03c8fd941c0c event, photo, components: moved interests grid in a macro (in components/block)
Goffi <goffi@goffi.org>
parents: 172
diff changeset
48 <div>{{ icon(default_icon_name, cls='icon--medium') }}</div>
03c8fd941c0c event, photo, components: moved interests grid in a macro (in components/block)
Goffi <goffi@goffi.org>
parents: 172
diff changeset
49 {% endif %}
03c8fd941c0c event, photo, components: moved interests grid in a macro (in components/block)
Goffi <goffi@goffi.org>
parents: 172
diff changeset
50 <span><em>{{ interest.name|default(_("unnamed")) }}</em></span>
03c8fd941c0c event, photo, components: moved interests grid in a macro (in components/block)
Goffi <goffi@goffi.org>
parents: 172
diff changeset
51 </a>
03c8fd941c0c event, photo, components: moved interests grid in a macro (in components/block)
Goffi <goffi@goffi.org>
parents: 172
diff changeset
52 </li>
03c8fd941c0c event, photo, components: moved interests grid in a macro (in components/block)
Goffi <goffi@goffi.org>
parents: 172
diff changeset
53 {% endfor %}
03c8fd941c0c event, photo, components: moved interests grid in a macro (in components/block)
Goffi <goffi@goffi.org>
parents: 172
diff changeset
54 </ul>
03c8fd941c0c event, photo, components: moved interests grid in a macro (in components/block)
Goffi <goffi@goffi.org>
parents: 172
diff changeset
55 {% endmacro %}