{% load aircox %}
{% comment %}
Context:
- objects: list of objects to display
- url_name: url name to show the full list
- url_parent: parent page for the full list
- url_label: label of url button
{% endcomment %}

<a-carousel>
    {% for object in objects %}
    {% page_widget "card" object %}
    {% endfor %}
</a-carousel>

{% if url_name %}
<nav class="nav-urls">
    {% if url_parent %}
    <a href="{% url url_name parent_slug=url_parent.slug %}">
    {% elif url_category %}
    <a href="{% url url_name category_slug=url_category.slug %}">
    {% else %}
    <a href="{% url url_name %}">
    {% endif %}
    {{ url_label|default:_("Show all") }}
    </a>
</nav>
{% endif %}
