comparison sat_templates/templates/bulma/components/block.html @ 299:75f1cd6da46e

bulma (components/block): new `data` and `delete_icon` arguments in `icon_item`
author Goffi <goffi@goffi.org>
date Sat, 20 Feb 2021 13:37:15 +0100
parents 10278ba367a2
children 2a697b1376f1
comparison
equal deleted inserted replaced
298:1c330913ff13 299:75f1cd6da46e
14 <div class="block_separator__line"></div> 14 <div class="block_separator__line"></div>
15 {% endif %} 15 {% endif %}
16 </div> 16 </div>
17 {% endmacro %} 17 {% endmacro %}
18 18
19 {% macro icon_item(icon_name, label, url, class="") %} 19 {% macro icon_item(icon_name, label, url, class="", delete_icon=false, data=none) %}
20 <div class="column is-2-desktop is-4-touch"> 20 <div class="column is-2-desktop is-4-touch item" {% if data %}data-item='{{data|tojson}}'{% endif %}>
21 <div class="card {{class}}"> 21 <div class="card {{class}}">
22 <a href="{{url}}"> 22 <a href="{{url}}">
23 <div class="card-image has-text-centered"> 23 <div class="card-image has-text-centered">
24 {{ icon(icon_name, cls='image is-64x64 is-inline-block') }} 24 {{ icon(icon_name, cls='image is-64x64 is-inline-block') }}
25 {% if delete_icon %}
26 <button class="delete action_delete is-small is-top-right"></button>
27 {% endif %}
25 </div> 28 </div>
26 <div class='card-content has-text-centered has-text-shortenable is-paddingless'> 29 <div class='card-content has-text-centered has-text-shortenable is-paddingless'>
27 <span>{{label}}</span> 30 <span>{{label}}</span>
28 </div> 31 </div>
29 </a> 32 </a>