Files
cnt-sindikatua/views/templates/page-opinion.twig

66 lines
2.8 KiB
Twig
Raw Normal View History

2025-10-08 08:06:54 +00:00
{% extends 'layouts/base.twig' %}
{% block content %}
<h1 class="mb-5 position-relative fs-3 fw-bold sp-module-title">{{ post.title }}</h1>
<section class="posts-noticias">
{% if posts_opinion %}
{% for noticias in posts_opinion %}
2025-10-14 15:08:21 +00:00
{% set imagen = noticias.thumbnail.src | default('/wp-content/uploads/2025/10/Imagen_por_defecto_300.jpg') %}
2025-10-08 08:06:54 +00:00
{% set alt = noticias.thumbnail.alt | default('Imagen por defecto') %}
<div class="card my-3 position-relative">
<div class="row g-0">
<div class="col-md-4">
<a href="{{ noticias.link }}" title="{{ noticias.title }}">
<img src="{{ imagen }}"
class="rounded-start object-fit-cover w-100 h-100 img-noticias"
alt="{{ alt }}"
2025-10-14 15:08:21 +00:00
style="min-height: 200px; max-height: 300px;"
2025-10-08 08:06:54 +00:00
/>
</a>
</div>
<div class="col-md-8">
<div class="card-body" style="padding-bottom: 60px;">
<a href="{{ noticias.link }}" title="{{ noticias.title }}" class="text-decoration-none card-title">
<h5 class="card-title-text">{{ noticias.title }}</h5>
</a>
<p class="card-text"> {{
noticias.excerpt({
words: 50,
read_more: ''
})
}}</p>
<p class="card-text"><small class="text-body-secondary">{{ noticias.date }}</small></p>
<a href="{{ noticias.link }}"
class="btn position-absolute btn-secondary-cnt"
style="position: absolute; bottom: 15px; right: 15px; z-index: 10;"
>
{{ __('Sigue leyendo', 'Sindikatua') }}...
</a>
</div>
</div>
</div>
</div>
{% endfor %}
{% else %}
<h2>no hay artículos</h2>
{% endif %}
2025-10-08 10:38:06 +00:00
<!-- PAGINATION -->
{% set pagination = posts_opinion.pagination %}
2025-10-08 08:06:54 +00:00
<div class="pagination-custom mt-5">
{% include 'partials/pagination-custom.twig' %}
</div>
</section>
{% endblock %}