diff sat_templates/templates/default/components/block.html @ 164:e9f0a4215e46

multi-sites handling (moved templates to "templates" sub-directory) + noscript styles handling.
author Goffi <goffi@goffi.org>
date Mon, 10 Sep 2018 08:53:33 +0200
parents sat_templates/default/components/block.html@33c7ce833d3f
children 4a03d0a6839b
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sat_templates/templates/default/components/block.html	Mon Sep 10 08:53:33 2018 +0200
@@ -0,0 +1,34 @@
+{% 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--medium') }}
+                    <span>{{ disco_entity.name }}</span>
+                </a>
+            </li>
+        {% endfor %}
+    </ul>
+{% endmacro %}