Mercurial > libervia-templates
comparison sat_templates/templates/bulma/components/block.html @ 300:2a697b1376f1
bulma (components/block): disco entities's `icon_name` is used as icon when available:
otherwide, `default_icon_name` is used.
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 20 Feb 2021 13:37:19 +0100 |
parents | 75f1cd6da46e |
children | 8c779fb46384 |
comparison
equal
deleted
inserted
replaced
299:75f1cd6da46e | 300:2a697b1376f1 |
---|---|
32 </a> | 32 </a> |
33 </div> | 33 </div> |
34 </div> | 34 </div> |
35 {% endmacro %} | 35 {% endmacro %} |
36 | 36 |
37 {% macro disco_icon_grid(disco_entities, icon_name) %} | 37 {% macro disco_icon_grid(disco_entities, default_icon_name) %} |
38 {# display discovered entities in a grid | 38 {# display discovered entities in a grid |
39 @param disco_entities: entities which mush have a name and url key or attribute | 39 @param disco_entities: entities which mush have a name and url key or attribute |
40 @param icon_name: name of a defined icon | 40 @param icon_name: name of a defined icon |
41 #} | 41 #} |
42 <div class="columns"> | 42 <div class="columns"> |
43 {% for disco_entity in disco_entities %} | 43 {% for disco_entity in disco_entities %} |
44 {{ icon_item(icon_name, disco_entity.name, disco_entity.url) }} | 44 {{ icon_item(disco_entity.icon_name or default_icon_name, disco_entity.name, disco_entity.url) }} |
45 {% endfor %} | 45 {% endfor %} |
46 </div> | 46 </div> |
47 {% endmacro %} | 47 {% endmacro %} |
48 | 48 |
49 {% macro interests_grid(interests, default_icon_name) %} | 49 {% macro interests_grid(interests, default_icon_name) %} |