Mercurial > libervia-templates
diff default/components/block.html @ 138:85877c76d47d
merge-request: discovery page
author | Goffi <goffi@goffi.org> |
---|---|
date | Tue, 27 Mar 2018 08:33:11 +0200 |
parents | ca42dc037bbf |
children |
line wrap: on
line diff
--- a/default/components/block.html Tue Mar 27 08:32:34 2018 +0200 +++ b/default/components/block.html Tue Mar 27 08:33:11 2018 +0200 @@ -15,3 +15,20 @@ {% 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--medium') }} + <span>{{ disco_entity.name }}</span> + </a> + </li> + {% endfor %} + </ul> +{% endmacro %}