Depurar & styles

This commit is contained in:
2025-10-08 08:06:18 +00:00
parent af70ce1e6c
commit 3bcf113d2c
9 changed files with 119 additions and 20 deletions

View File

@ -13,6 +13,7 @@ namespace App;
use Timber\Timber;
$templates = [ 'templates/archive.twig', 'templates/index.twig' ];
error_log('✅ estamos en archive');
$title = 'Archive';
if ( is_day() ) {

View File

@ -506,7 +506,7 @@ button[type="reset"] {
height: 18vh!important; /* altura del 18% del viewport */
}
/* Resetear estilos de Bootstrap en la paginación */
/* PAGINACIÓN */
.pagination-block .pagination {
margin-bottom: 0;
}
@ -555,4 +555,5 @@ button[type="reset"] {
a.btn-page-hover:hover {
border: 2px solid var(--black) !important;
}
}
/* END PAGINACIÓN */

View File

@ -119,8 +119,8 @@
<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 ultimo_articulo_opinion and ultimo_articulo_opinion|length > 0 %}
{% for article in ultimo_articulo_opinion %}
{% if posts_opinion and posts_opinion|length > 0 %}
{% for article in posts_opinion %}
<div class="card w-100 h-100 secondary-article">
<a class="h-100" href="{{ article.link }}">
<img src="{{ article.thumbnail.src('medium') }}"

View File

@ -3,5 +3,59 @@
{% block content %}
<h1 class="mb-5 position-relative fs-4 fw-bold sp-module-title">{{ post.title }}</h1>
<!-- INDUSTRIA -->
<section class="posts-noticias">
{% if posts_industry %}
{% for noticias in posts_industry %}
{% set imagen = noticias.thumbnail.src | default('/wp-content/uploads/2025/10/Imagen_por_defecto.png') %}
{% 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 }}"
style="min-height: 200px;"
/>
</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 %}
<!-- PAGINATION -->
<div class="pagination-custom mt-5">
{% include 'partials/pagination-custom.twig' %}
</div>
</section>
{% endblock %}

View File

@ -0,0 +1 @@
{% extends 'templates/page-opinion.twig' %}

View File

@ -4,16 +4,19 @@
<h1 class="mb-5 position-relative fs-3 fw-bold sp-module-title">{{ post.title }}</h1>
<section class="posts-noticias">
{% if recent_posts_noticias %}
{% for noticias in recent_posts_noticias %}
{% if posts_noticias %}
{% for noticias in posts_noticias %}
{% set imagen = noticias.thumbnail.src | default('/wp-content/uploads/2025/10/Imagen_por_defecto.png') %}
{% 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="{{ noticias.thumbnail.src }}"
<img src="{{ imagen }}"
class="rounded-start object-fit-cover w-100 h-100 img-noticias"
alt="{{ noticias.thumbnail.alt }}"
alt="{{ alt }}"
style="min-height: 200px;"
/>
</a>

View File

@ -3,12 +3,12 @@
<div class="page-portada">
{# Sección noticias #}
{% if recent_posts_noticias %}
{% if posts_noticias %}
<section class="recent-posts">
<div class="row g-4 mt-3">
{# Columna izquierda - Artículo principal #}
<div class="col-md-8">
{% set main_article = recent_posts_noticias[0] %}
{% set main_article = posts_noticias[0] %}
<div class="card main-article">
<a href="{{ main_article.link }}">
<img src="{{ main_article.thumbnail.src('medium') }}"
@ -25,7 +25,7 @@
{# Columna derecha - Dos artículos secundarios #}
<div class="col-md-4">
<div class="d-flex flex-column h-100 justify-content-between">
{% for article in recent_posts_noticias[1:3] %}
{% for article in posts_noticias[1:2] %}
<div class="card secondary-article {% if loop.first %}media-mb{% endif %}">
<a href="{{ article.link }}">
<img src="{{ article.thumbnail.src('medium') }}"
@ -44,6 +44,11 @@
</section>
{% endif %}
{# Sección vídeos + Opinión #}
<section class="py-4 margin-50">
{% include 'partials/section-videos.twig' %}
</section>
{# Sección Enlaces #}
<section class="custom-buttons-section margin-50">
<h1 class="mb-4 position-relative fs-4 fw-bold sp-module-title">{{ __('Enlaces', 'Sindikatua')|upper }}</h1>
@ -63,15 +68,11 @@
</div>
</section>
{# Sección vídeos + Opinión #}
<section class="py-4 margin-50">
{% include 'partials/section-videos.twig' %}
</section>
{# Sección Campañas / conflictos #}
<section class="recent-posts py-4">
<div class="row align-items-stretch">
{# Campañas #}
<div class="col-6">
<h1 class="mb-4 position-relative fs-4 fw-bold sp-module-title">{{ __('Campañas', 'Sindikatua')|upper }}</h1>
@ -93,15 +94,20 @@
{% endif %}
</div>
{# conflictos #}
<div class="col-6">
<h1 class="mb-4 position-relative fs-4 fw-bold sp-module-title">{{ __('Conflictos Laborales', 'Sindikatua')|upper }}</h1>
{% if posts_campana and posts_campana|length > 0 %}
{% set main_article = posts_campana[0] %}
{% if posts_conflicts and posts_conflicts|length > 0 %}
{% set main_article = posts_conflicts[0] %}
{% set imagen = main_article.thumbnail.src('medium') | default('/wp-content/uploads/2025/10/Imagen_por_defecto.png') %}
{% set alt = main_article.thumbnail.alt | default('Imagen por defecto') %}
<div class="card main-article">
<a href="{{ main_article.link }}">
<img src="{{ main_article.thumbnail.src('medium') }}"
alt="{{ main_article.thumbnail.alt }}"
<img src="{{ imagen }}"
alt="{{ alt }}"
class="card-img card-img-fixed img-noticias" />
<div class="card-img-overlay">
<h3 class="card-title text-wrap">

View File

@ -0,0 +1 @@
{% extends 'templates/page-servicios.twig' %}

View File

@ -0,0 +1,32 @@
{% extends 'layouts/base.twig' %}
{% block content %}
{# <p>Servicios test</p> #}
<div class="container">
<article class="post-type-{{ post.type }}" id="post-{{ post.id }}">
<section class="article-content mt-5 border-dark border-top">
<!-- Title & author & date -->
<h1 class="article-h1">{{ post.title }}</h1>
<p class="blog-author mt-3 mb-5 border-dark border-bottom">
<span>{{ __('Autor', 'Sindikatua')}}:</span>
<a href="{{ post.author.path }}">{{ post.author.name }}</a>
<span>&bull;</span>
<time datetime="{{ post.date|date('Y-m-d H:i:s') }}">{{ post.date }}</time>
</p>
<!-- Img & Content -->
{# <div class="d-flex justify-content-center my-5">
<img src="{{ post.thumbnail.src }}"
alt="{{ post.thumbnail.alt }}"
class="img-fluid object-fit-contain border border-1 rounded p-3"
style="max-width: 500px; max-height: 300px;"
/>
</div> #}
<div class="article-body">{{ post.content }}</div>
</section>
</article>
</div>
{% endblock %}