comparison sat_templates/templates/default/components/block.html @ 196:03c8fd941c0c

event, photo, components: moved interests grid in a macro (in components/block)
author Goffi <goffi@goffi.org>
date Fri, 03 May 2019 23:56:11 +0200
parents 4a03d0a6839b
children
comparison
equal deleted inserted replaced
195:bca0aa66294a 196:03c8fd941c0c
30 </a> 30 </a>
31 </li> 31 </li>
32 {% endfor %} 32 {% endfor %}
33 </ul> 33 </ul>
34 {% endmacro %} 34 {% endmacro %}
35
36 {% macro interests_grid(interests, default_icon_name) %}
37 {# display list of interests
38 @param interests: list of interests
39 @param default_icon_name: name of a defined icon to use when no thumb_url is available
40 #}
41 <ul class="grid grid--center">
42 {% for interest in interests %}
43 <li class='grid__item grid__item--medium grid__item--selectable'>
44 <a href="{{interest.url}}">
45 {% if interest.thumb_url %}
46 <img class="img--small" src="{{interest.thumb_url}}">
47 {% else %}
48 <div>{{ icon(default_icon_name, cls='icon--medium') }}</div>
49 {% endif %}
50 <span><em>{{ interest.name|default(_("unnamed")) }}</em></span>
51 </a>
52 </li>
53 {% endfor %}
54 </ul>
55 {% endmacro %}