Mercurial > libervia-templates
view sat_templates/templates/default/components/block.html @ 190:cda2aad3eed0
base: "links" template variable can now be used:
if "links" is present in template data, it must be a list of dictionaries, the dictionaries will be used as attributes for the "<link>" elements in the header.
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 26 Apr 2019 08:44:38 +0200 |
parents | 4a03d0a6839b |
children | 03c8fd941c0c |
line wrap: on
line source
{% macro separator(label, align='center') %} {# display a bloc separator @param label(unicode): label to show @param align(unicode): one of "left", "center", "right" #} <div class="block_separator"> {% if align in ('center', 'right') %} <div class="block_separator__line"></div> {% endif %} <div class="block_separator__label"> {{label}} </div> {% if align in ('center', 'left') %} <div class="block_separator__line"></div> {% endif %} </div> {% endmacro %} {% macro disco_icon_grid(disco_entities, icon_name) %} {# display discovered entities in a grid @param disco_entities: entities which mush have a name and url key or attribute @param icon_name: name of a defined icon #} <ul class="grid grid--center"> {% for disco_entity in disco_entities %} <li class='grid__item grid__item--medium grid__item--selectable'> <a href="{{disco_entity.url}}" class="items_vert--centered"> {{ icon(icon_name, cls='icon--block icon--medium') }} <span>{{ disco_entity.name }}</span> </a> </li> {% endfor %} </ul> {% endmacro %}