{% extends 'layouts/base.twig' %}

{% block content %}
    <h1 class="my-5 position-relative fs-3 fw-bold sp-module-title">{{ post.title }}</h1>


    <section class="section-industria">
        {% if post.children('page') |length > 0 %}
            {% for subpagIndustria in post.children('page') %}

            {% set imagen = subpagIndustria.thumbnail.src | default(imagen_default) %}
            {% set alt = subpagIndustria.thumbnail.alt | default('Imagen Industria cnt') %}

            <div class="card my-3 position-relative posts-noticias">
                <div class="row g-0">
                    <div class="col-md-4">
                        <img src="{{ imagen }}" alt="{{ alt }}"
                                class="rounded-start img-noticias"
                                />
                    </div>
                    <div class="col-md-8">
                        <div class="card-body">
                            <h5 class="card-title-text fs-4 fw-bold border-dark border-bottom">{{ subpagIndustria.title }}</h5>
                            <p class="card-text"> {{subpagIndustria.content}}</p>
                        </div>
                    </div>
                </div>
            </div>

            {% endfor %}
        {% else %}
            <p>{{ __('No hay artículos', 'Sindikatua') }}</p>
        {% endif %}

        <!-- NO HAY PAGINATION -->
        {# {% if pagination %}
            <div class="pagination-custom mt-5">
                {% include 'partials/pagination-custom.twig' %}
            </div>
        {% endif %} #}
        </div>

    </section>

{% endblock %}
