publik-base-theme/templates/variants/publik-famille-demo/combo/link-list-cell.html

56 lines
1.9 KiB
HTML

{% load i18n %}
{% block cell-content %}
{% load assets %}
{% spaceless %}
{% block cell-header %}
{% if title %}<h2>{{ title }}</h2>{% endif %}
{% include "combo/asset_picture_fragment.html" %}
{% endblock cell-header %}
<div class="links-list">
{% block cell-top-content %}{% endblock cell-top-content %}
<ul>
{% for link in links %}
<li class="{{ link.css_classes|default:""|join:" " }}{% if link.cell.extra_css_class %} {{ link.cell.extra_css_class }}{% endif %}"
{% if link.cell.link_page.picture %}
style="--pf-icon-picture: url({{ link.cell.link_page.picture.url }})"
{% endif %}
>
<a href="{{ link.url }}">
{{ link.title }}
</a>
</li>
{% endfor %}
{% if more_links %}
<li class="add-more-items">
<a role="button"
tabindex="0"
aria-expanded="false"
aria-controls="more-items-{{ cell.get_reference }}"
aria-label="{% trans 'More items' %}"
id="btn-more-items-{{ cell.get_reference }}"
class="add-more-items--button">
{% block cell-more-items-btn-label %}+{% endblock %}
</a>
</li>
{% endif %}
</ul>
{% if more_links %}
<ul style="display: none" class="more-items" id="more-items-{{ cell.get_reference }}" aria-labelledby="btn-more-items-{{ cell.get_reference }}">
{% for link in more_links %}
<li class="{{ link.css_classes|default:""|join:" " }}{% if link.cell.extra_css_class %} {{ link.cell.extra_css_class }}{% endif %}"
{% if link.cell.link_page.picture %}
style="--pf-icon-picture: url({{ link.cell.link_page.picture.url }})"
{% endif %}
>
<a href="{{ link.url }}">
{{ link.title }}
</a>
</li>
{% endfor %}
{% endif %}
</ul>
</div>
{% endspaceless %}
{% endblock %}