render_box with 'bloc'

use bootstrap responsive breakpoints for columns,
mixed with flex-bloc cascade for growing and vertical align blocs.
This commit is contained in:
2021-07-28 14:15:27 +02:00
parent 50e9a06e49
commit 81752befcf
8 changed files with 121 additions and 128 deletions

View File

@@ -219,40 +219,30 @@
</div>
{% endif %}
<h2>{{ 'Resources'|trans }}</h2>
{% if accompanyingCourse.resources|length == 0 %}
<p class="chill-no-data-statement">{{ 'Any resource for this accompanying course'|trans }}</p>
{% else %}
<div class="flex-bloc">
{% for r in accompanyingCourse.resources %}
{# TEST
{{ r.person|chill_entity_render_box({
'render': 'label', 'addLink': true, 'addInfo': true, 'hLevel': '1'
}) }}
<span class="badge bg-primary">
{{ r.person|chill_entity_render_box({'render': 'raw'}) }}
</span>
#}
<div class="item-bloc">
{% if r.person %}
{{ r.person|chill_entity_render_box({
'render': 'bloc', 'addLink': true, 'addEntity': true, 'addInfo': true
}) }}
{% endif %}
{% if r.thirdParty %}
{{ r.thirdParty|chill_entity_render_box({
'render': 'bloc', 'addLink': true, 'addEntity': true, 'addInfo': true
}) }}
{% endif %}
<div class="resources my-5">
<h2 class="mb-3">{{ 'Resources'|trans }}</h2>
{% if accompanyingCourse.resources|length == 0 %}
<p class="chill-no-data-statement">{{ 'Any resource for this accompanying course'|trans }}</p>
{% else %}
<div class="flex-bloc row row-cols-1 row-cols-sm-2 row-cols-xl-3 row-cols-xxl-4 g-0">
{% for r in accompanyingCourse.resources %}
<div class="item-bloc col">
{% if r.person %}
{{ r.person|chill_entity_render_box({
'render': 'bloc', 'addLink': true, 'addEntity': true, 'addInfo': true
}) }}
{% endif %}
{% if r.thirdParty %}
{{ r.thirdParty|chill_entity_render_box({
'render': 'bloc', 'addLink': true, 'addEntity': true, 'addInfo': true
}) }}
{% endif %}
</div>
{% endfor %}
</div>
{% endfor %}
</div>
{% endif %}
{% endif %}
</div>
<h2>{{ 'Social actions'|trans }}</h2>