refactorizar
This commit is contained in:
@ -119,13 +119,17 @@
|
||||
<h1 class="mb-4 position-relative fs-4 fw-bold sp-module-title">{{ __('Opinión', 'Sindikatua')|upper}}</h1>
|
||||
|
||||
<div class="flex-grow-1 d-flex">
|
||||
{% if posts_opinion and posts_opinion|length > 0 %}
|
||||
{% for article in posts_opinion %}
|
||||
{% if last_posts_opinion and last_posts_opinion|length > 0 %}
|
||||
{% for article in last_posts_opinion %}
|
||||
{% set imagen = article.thumbnail.src('medium') | default('/wp-content/uploads/2025/10/Imagen_por_defecto_300.jpg') %}
|
||||
{% set alt = article.thumbnail.alt | default('Imagen por defecto') %}
|
||||
|
||||
<div class="card w-100 h-100 secondary-article">
|
||||
<a class="h-100" href="{{ article.link }}">
|
||||
<img src="{{ article.thumbnail.src('medium') }}"
|
||||
alt="{{ article.thumbnail.alt }}"
|
||||
class="card-img h-100 object-fit-cover"/>
|
||||
<img src="{{ imagen }}"
|
||||
alt="{{ alt }}"
|
||||
class="card-img h-100 object-fit-cover"
|
||||
style="aspect-ratio: 16/9;"/>
|
||||
|
||||
<div class="card-img-overlay d-flex flex-column justify-content-end align-items-start">
|
||||
<div>
|
||||
@ -143,6 +147,7 @@
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<p>{{ __('No hay artículos', 'Sindikatua') }}</p>
|
||||
Reference in New Issue
Block a user