ADD segundo idioma

This commit is contained in:
2025-08-21 07:21:36 +00:00
parent 03e45ed783
commit 472bc00677
27 changed files with 386 additions and 363 deletions

View File

@ -13,7 +13,6 @@ use Timber\Timber;
// Load Composer dependencies.
require_once __DIR__ . '/vendor/autoload.php';
Timber::init();
new StarterSite();

View File

@ -22,7 +22,7 @@ $context['search_query'] = get_search_query();
// Verificar si es subpágina de contactos
$parent = get_post($timber_post->post_parent);
if ($parent && $parent->post_name === 'contactos') {
if ($parent && $parent->post_name === 'contactos' || $parent->post_name === 'kontaktua' ) {
// Para subpáginas de contactos, usar page-contactos.twig
Timber::render('templates/page-contactos.twig', $context);
} elseif ($parent && $parent->post_name === 'servicios-privados' || $parent && $parent->post_name === 'servicios-publicos') {

View File

@ -106,25 +106,26 @@ button[type="reset"] {
.sp-module-title::after{
background: var(--rojo-cnt);
content: "";
height: 1px;
height: 3px;
left: 0;
position: absolute;
bottom: -5px;
width: 150px;
}
.sp-module-title::before{
background: var(--black);
content: "";
height: 3px;
left: 0;
position: absolute;
bottom: -12px;
width: 150px;
}
.sp-module-title::before{
background: var(--rojo-cnt);
content: "";
height: 1px;
left: 0;
position: absolute;
bottom: -15px;
width: 150px;
}
/* HEADER sindikatua */
.text-sindikatua {
.text-sindikatua,
.sp-module-title {
font-family: 'Yaro', Arial, sans-serif;
}
@ -240,6 +241,7 @@ button[type="reset"] {
overflow: hidden;
border-radius: 0.375rem;
transition: box-shadow 0.3s ease;
width: fit-content;
}
.btn-hover .btn-image-only img {
@ -267,8 +269,23 @@ button[type="reset"] {
width: 100%;
}
/* FOOTER */
/* noticias */
.page-portada .img-noticias,
.posts-noticias .img-noticias {
transition: filter 0.3s ease;
}
.page-portada .img-noticias:hover,
.posts-noticias .img-noticias:hover {
filter: grayscale(100%);
}
.posts-noticias .card-title-text:hover {
font-weight: bolder;
}
/* FOOTER */
/* Convert SVG RRSS white */
.svg-white {
filter: brightness(0) invert(1);

View File

@ -25,17 +25,29 @@
{% include "menu.twig" with {'items': menu.get_items} %}#}
</div>
<div class="col-sm-3 mb-5">
</div>
<div class="col-sm-3">
<h2>Contactos</h2>
{% if function('pll_current_language') == 'eu' %}
<h2>Kontaktua</h2>
{% else %}
<h2>Contactos</h2>
{% endif %}
</div>
</div>
<div class="py-2 text-center">
<p class="mb-0 fs-8">&bullet; Todos los derechos reservados &bullet; {{"now"|date('Y')}}</p>
<a class="nav-link d-inline" href="/politica-de-privacidad">Aviso legal y política de privacidad &bullet;</a>
<a class="nav-link d-inline" href="/politica-de-cookies">Política de cookies</a>
<div class="py-2 text-center mt-5 border-top border-light">
{% if function('pll_current_language') == 'eu' %}
<p>Web orri honen edukia Creative Commons Aitortu-Partekatu Berdin 4.0 Nazioarteko lizentzia baten pean dago, kanpoko iturri bat adierazten denean izan ezik.</p>
<p class="mb-0 fs-8">&bullet; Eskubide guztiak erreserbatuta &bullet; {{"now"|date('Y')}}</p>
<a class="nav-link d-inline" href="/politica-de-privacidad">Lege oharra eta pribatutasun politika &bullet;</a>
<a class="nav-link d-inline" href="/politica-de-cookies">Cookien politika</a>
{% else %}
<p>El contenido de esta página web está bajo una licencia Creative Commons Reconocimiento-Compartir Igual 4.0 Internacional excepto aquel en el que se indique una fuente externa.</p>
<p class="mb-0 fs-8">&bullet; Todos los derechos reservados &bullet; {{"now"|date('Y')}}</p>
<a class="nav-link d-inline" href="/politica-de-privacidad">Aviso legal y política de privacidad &bullet;</a>
<a class="nav-link d-inline" href="/politica-de-cookies">Política de cookies</a>
{% endif %}
</div>
</div>

View File

@ -1,126 +1,125 @@
<div class="container">
<div class="row align-items-stretch">
{# Primera columna - Carousel con vídeos embebidos #}
<div class="col-lg-8 col-12 mb-4 mb-lg-0">
<p class="mb-4 position-relative fs-4 fw-bold sp-module-title">VÍDEOS</p>
{% if videos %}
<div id="videosCarousel" class="carousel slide" data-bs-ride="carousel">
<div class="carousel-inner">
{% for pair in videos|batch(2, null) %}
<div class="carousel-item {% if loop.first %}active{% endif %}">
<div class="row">
{% for video in pair %}
{% if video %}
<div class="col-6">
<div class="video-item">
{% set url_video = video.meta('url_video') %}
{% set video_data = generar_embed(url_video) %}
{% if video_data %}
{# Thumbnail clickeable en lugar del iframe #}
<div class="ratio ratio-16x9 video-thumbnail-container position-relative rounded"
data-bs-toggle="modal"
data-bs-target="#videoModal"
data-video-url="{{ video_data.embed_url }}"
data-video-title="{{ video.titulo }}"
data-video-allow="{{ video_data.allow }}"
style="cursor: pointer;
background-image: url('{{ video_data.thumbnail_url }}');
background-size: cover;
background-position: center;">
<div class="row align-items-stretch">
{# Overlay con botón play #}
<div class="position-absolute top-0 start-0 w-100 h-100 d-flex align-items-center justify-content-center">
<div class="btn btn-danger btn-lg rounded-circle d-flex align-items-center justify-content-center"
style="width: 60px; height: 60px;">
<i class="bi bi-play-btn" style="font-size: 2rem;"></i>
</div>
</div>
{# Overlay oscuro al hover #}
<div class="position-absolute top-0 start-0 w-100 h-100 bg-dark opacity-0 hover-overlay"
style="transition: opacity 0.3s ease;">
</div>
{# Título del vídeo #}
<div class="position-absolute bottom-0 start-0 end-0 bg-dark bg-opacity-75 text-white p-3 rounded">
<h6 class="mb-0 text-white">{{ video.titulo }}</h6>
{# Primera columna - Carousel con vídeos embebidos #}
<div class="col-lg-8 col-12 mb-4 mb-lg-0">
<h1 class="mb-4 position-relative fs-4 fw-bold sp-module-title">{{ __('Vídeos', 'Sindikatua')|upper }}</h1>
{% if videos %}
<div id="videosCarousel" class="carousel slide" data-bs-ride="carousel">
<div class="carousel-inner">
{% for pair in videos|batch(2, null) %}
<div class="carousel-item {% if loop.first %}active{% endif %}">
<div class="row">
{% for video in pair %}
{% if video %}
<div class="col-6">
<div class="video-item">
{% set url_video = video.meta('url_video') %}
{% set video_data = generar_embed(url_video) %}
{% if video_data %}
{# Thumbnail clickeable en lugar del iframe #}
<div class="ratio ratio-16x9 video-thumbnail-container position-relative rounded"
data-bs-toggle="modal"
data-bs-target="#videoModal"
data-video-url="{{ video_data.embed_url }}"
data-video-title="{{ video.titulo }}"
data-video-allow="{{ video_data.allow }}"
style="cursor: pointer;
background-image: url('{{ video_data.thumbnail_url }}');
background-size: cover;
background-position: center;">
{# Overlay con botón play #}
<div class="position-absolute top-0 start-0 w-100 h-100 d-flex align-items-center justify-content-center">
<div class="btn btn-danger btn-lg rounded-circle d-flex align-items-center justify-content-center"
style="width: 60px; height: 60px;">
<i class="bi bi-play-btn" style="font-size: 2rem;"></i>
</div>
</div>
{% else %}
<div class="alert alert-warning">
<h5>{{ video.titulo }}</h5>
<p class="mb-0">No se ha configurado URL para este vídeo.</p>
</div>
{% endif %}
{# Overlay oscuro al hover #}
<div class="position-absolute top-0 start-0 w-100 h-100 bg-dark opacity-0 hover-overlay"
style="transition: opacity 0.3s ease;">
</div>
{# Título del vídeo #}
<div class="position-absolute bottom-0 start-0 end-0 bg-dark bg-opacity-75 text-white p-3 rounded">
<h6 class="mb-0 text-white">{{ video.titulo }}</h6>
</div>
</div>
{% else %}
<div class="alert alert-warning">
<h5>{{ video.titulo }}</h5>
<p class="mb-0">{{ __('No hay URL', 'Sindikatua') }}</p>
</div>
{% endif %}
</div>
{% endif %}
{% endfor %}
</div>
{% endif %}
{% endfor %}
</div>
{% endfor %}
</div>
{# carousel controls buttons#}
{% if videos|length > 1 %}
<button class="carousel-control-prev" type="button" data-bs-target="#videosCarousel" data-bs-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="visually-hidden">Anterior</span>
</button>
<button class="carousel-control-next" type="button" data-bs-target="#videosCarousel" data-bs-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="visually-hidden">Siguiente</span>
</button>
{# <div class="carousel-indicators">
{% for pair in videos|batch(2, null) %}
<button type="button" data-bs-target="#videosCarousel" data-bs-slide-to="{{ loop.index0 }}"
{% if loop.first %}class="active"{% endif %} aria-label="Slide {{ loop.index }}"></button>
{% endfor %}
</div> #}
{% endif %}
{% endfor %}
</div>
{% else %}
<p>No hay vídeos disponibles.</p>
{% endif %}
</div>
{# carousel controls buttons#}
{% if videos|length > 1 %}
<button class="carousel-control-prev" type="button" data-bs-target="#videosCarousel" data-bs-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="visually-hidden">Anterior</span>
</button>
<button class="carousel-control-next" type="button" data-bs-target="#videosCarousel" data-bs-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="visually-hidden">Siguiente</span>
</button>
{# MODAL PARA REPRODUCIR VÍDEO #}
<div class="modal fade" id="videoModal" tabindex="-1" aria-labelledby="videoModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg modal-dialog-centered">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="videoModalLabel"></h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Cerrar"></button>
</div>
<div class="modal-body p-0">
<div class="ratio ratio-16x9">
<iframe id="modalVideoIframe"
src=""
title=""
frameborder="0"
allow=""
allowfullscreen
loading="lazy">
</iframe>
</div>
{# <div class="carousel-indicators">
{% for pair in videos|batch(2, null) %}
<button type="button" data-bs-target="#videosCarousel" data-bs-slide-to="{{ loop.index0 }}"
{% if loop.first %}class="active"{% endif %} aria-label="Slide {{ loop.index }}"></button>
{% endfor %}
</div> #}
{% endif %}
</div>
{% endif %}
</div>
{# MODAL PARA REPRODUCIR VÍDEO #}
<div class="modal fade" id="videoModal" tabindex="-1" aria-labelledby="videoModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg modal-dialog-centered">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="videoModalLabel"></h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Cerrar"></button>
</div>
<div class="modal-body p-0">
<div class="ratio ratio-16x9">
<iframe id="modalVideoIframe"
src=""
title=""
frameborder="0"
allow=""
allowfullscreen
loading="lazy">
</iframe>
</div>
</div>
</div>
</div>
</div>
{# Segunda columna - Último artículo de opinión #}
<div class="col-lg-4 col-12 opinion-article d-flex flex-column">
<p class="mb-4 position-relative fs-4 fw-bold sp-module-title">OPINIÓN</p>
{# Segunda columna - Último artículo de opinión #}
<div class="col-lg-4 col-12 opinion-article d-flex flex-column">
<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 %}
<div class="flex-grow-1 d-flex">
{% if ultimo_articulo_opinion and ultimo_articulo_opinion|length > 0 %}
{% for article in ultimo_articulo_opinion %}
<div class="card w-100 h-100 secondary-article">
<a class="h-100" href="{{ article.link }}">
@ -145,11 +144,10 @@
</a>
</div>
{% endfor %}
{% else %}
<p class="text-muted">No hay artículos de opinión disponibles.</p>
{% endif %}
</div>
</div>
{% else %}
<p>{{ __('No hay artículos', 'Sindikatua') }}</p>
{% endif %}
</div>
</div>
</div>
</div>

View File

@ -1,17 +1,36 @@
<div class="container">
<div class="row align-items-center py-1">
<!-- Izquierda: Botones -->
<div class="col">
{% if languages %}
<div class="btn-bar d-flex align-items-center">
<button class="btn btn-outline-dark btn-sm me-2">
<span class="d-inline d-sm-none">EUS</span>
<span class="d-none d-sm-inline">EUSKERA</span>
</button>
<button class="btn btn-outline-dark btn-sm">
<span class="d-inline d-sm-none">CAS</span>
<span class="d-none d-sm-inline">CASTELLANO</span>
</button>
{% for lang in languages %}
{% if lang.slug == 'es' or lang.slug == 'cas' %}
{# Botón Castellano #}
<a href="{{ lang.url }}"
class="btn {{ lang.current ? 'btn-dark' : 'btn-outline-dark' }} btn-sm ms-2"
{% if lang.current %}aria-current="page"{% endif %}>
<span class="d-inline d-sm-none">CAS</span>
<span class="d-none d-sm-inline">CASTELLANO</span>
</a>
{% elseif lang.slug == 'eu' or lang.slug == 'eus' %}
{# Botón Euskera #}
<a href="{{ lang.url }}"
class="btn {{ lang.current ? 'btn-dark' : 'btn-outline-dark' }} btn-sm ms-2"
{% if lang.current %}aria-current="page"{% endif %}>
<span class="d-inline d-sm-none">EUS</span>
<span class="d-none d-sm-inline">EUSKARA</span>
</a>
{% endif %}
{% endfor %}
</div>
{% else %}
<div style="background: #ffeeee; padding: 10px; border: 1px solid red;">
❌ No se encontraron idiomas
</div>
{% endif %}
</div>
<!-- Right side: RRSS -->
@ -33,4 +52,5 @@
</div>
</div>
</div>

View File

@ -2,8 +2,8 @@
{% block content %}
<main class="container py-5 text-center">
<h1 class="display-4">404 - Página no encontrada</h1>
<h1 class="display-4">404 - {{ __('Página no encontrada', 'Sindikatua') }}</h1>
<p class="lead">Ez da aurkitu bilatzen duzun orria / No se ha encontrado la página que buscabas</p>
<a href="<?php echo home_url(); ?>" class="btn btn-primary mt-4">Volver al inicio</a>
<a href="<?php echo home_url(); ?>" class="btn btn-primary mt-4">{{ __('Volver al inicio', 'Sindikatua') }}</a>
</main>
{% endblock %}

View File

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

View File

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

View File

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

View File

@ -0,0 +1 @@
{% extends 'templates/single-acerca.twig' %}

View File

@ -1,13 +1,9 @@
{% extends 'layouts/base.twig' %}
{% block content %}
<!-- <p class="alert alert-info" role="alert">
<i class="bi bi-envelope-at"></i>
PLANTILLA CONTACTOS</p> -->
<section class="contacto-barakaldo">
<section class="contacto">
<div class="container my-5">
<!-- mapa & contacts -->
<div class="row">
<!-- Column map -->
@ -28,7 +24,8 @@
<small>
<a href="https://www.openstreetmap.org/?#map=19/{{ latitud }}/{{ longitud }}">
Ver el mapa más grande
{{ __('Ver el mapa más grande', 'Sindikatua') }}
</a>
</small>
{% endif %}
@ -37,7 +34,7 @@
<!-- Column content -->
<div class="col-md-6">
<div class="content">
<h2>{{ contacto_info.nombre }}</h2>
<h1>{{ contacto_info.nombre }}</h1>
<p>{{ contacto_info.direccion }}</p>
<p>{{ contacto_info.forma_contacto }}</p>
@ -63,7 +60,8 @@
<!-- form -->
<div class="row mt-5">
<div class="col-12">
<p class="mb-4 position-relative fs-4 fw-bold sp-module-title">Contacto</p>
<h2 class="mb-4 position-relative fs-4 fw-bold sp-module-title">{{ __('Contacto', 'Sindikatua')|upper }}</h2>
<div class="formulario-contacto">
<div class="container">
<div class="row justify-content-center">

View File

@ -1,7 +1,7 @@
{% extends 'layouts/base.twig' %}
{% block content %}
<p class="mb-5 position-relative fs-4 fw-bold sp-module-title">DOCUMENTOS</p>
<h1 class="mb-5 position-relative fs-4 fw-bold sp-module-title">{{ post.title }}</h1>
<section class="documentos">
<div class="container">
@ -41,13 +41,13 @@
class="btn btn-sm me-2 btn-primary-cnt"
target="_blank">
<i class="bi bi-eye-fill"></i>
Ver documento
{{ __('Ver documento', 'Sindikatua') }}
</a>
<a href="{{ doc.documento_url }}" download
class="btn btn-sm me-2 btn-primary-cnt" >
<i class="bi bi-cloud-download-fill"></i>
Descargar
{{ __('Descargar', 'Sindikatua') }}
</a>
{% endif %}

View File

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

View File

@ -1,50 +1,50 @@
{% extends 'layouts/base.twig' %}
{% block content %}
<p class="mb-5 position-relative fs-4 fw-bold sp-module-title">ENLACES</p>
<h1 class="mb-5 position-relative fs-4 fw-bold sp-module-title">{{ post.title }}</h1>
{% if enlaces %}
<div class="enlaces">
<div class="accordion" id="accordionEnlaces">
{% for grupo in enlaces %}
<div class="accordion-item">
<h2 class="accordion-header">
<div class="accordion" id="accordionEnlaces">
{% for grupo in enlaces %}
<div class="accordion-item">
<h2 class="accordion-header">
<button class="accordion-button {% if loop.index0 != 0 %}collapsed{% endif %}"
type="button"
data-bs-toggle="collapse"
data-bs-target="#collapse{{ loop.index }}"
aria-expanded="{% if loop.index0 == 0 %}true{% else %}false{% endif %}"
aria-controls="collapse{{ loop.index }}">
{{ grupo.titulo }}
<button class="accordion-button {% if loop.index0 != 0 %}collapsed{% endif %}"
type="button"
data-bs-toggle="collapse"
data-bs-target="#collapse{{ loop.index }}"
aria-expanded="{% if loop.index0 == 0 %}true{% else %}false{% endif %}"
aria-controls="collapse{{ loop.index }}">
{{ grupo.titulo }}
<span class="badge bg-secondary ms-2">{{ grupo.enlaces|length }}</span>
</button>
</h2>
<div id="collapse{{ loop.index }}"
class="accordion-collapse collapse {% if loop.index0 == 0 %}show{% endif %}"
data-bs-parent="#accordionEnlaces">
<div class="accordion-body">
{% if grupo.enlaces %}
<div class="d-grid gap-2">
{% for enlace in grupo.enlaces %}
<a href="{{ enlace.url }}"
class="btn btn-outline-dark btn-sm text-start"
target == '_blank'
rel="noopener noreferrer">
{{ enlace.titulo }}
{% if enlace.target == '_blank' %}
<i class="fas fa-external-link-alt ms-1 small"></i>
{% endif %}
</a>
{% endfor %}
</div>
{% endif %}
<span class="badge bg-secondary ms-2">{{ grupo.enlaces|length }}</span>
</button>
</h2>
<div id="collapse{{ loop.index }}"
class="accordion-collapse collapse {% if loop.index0 == 0 %}show{% endif %}"
data-bs-parent="#accordionEnlaces">
<div class="accordion-body">
{% if grupo.enlaces %}
<div class="d-grid gap-2">
{% for enlace in grupo.enlaces %}
<a href="{{ enlace.url }}"
class="btn btn-outline-dark btn-sm text-start"
target == '_blank'
rel="noopener noreferrer">
{{ enlace.titulo }}
{% if enlace.target == '_blank' %}
<i class="fas fa-external-link-alt ms-1 small"></i>
{% endif %}
</a>
{% endfor %}
</div>
{% endif %}
</div>
</div>
</div>
</div>
{% endfor %}
</div>
{% endfor %}
</div>
</div>
{% endif %}

View File

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

View File

@ -1,7 +1,7 @@
{% extends 'layouts/base.twig' %}
{% block content %}
<p class="mb-5 position-relative fs-4 fw-bold sp-module-title">INDUSTRIA</p>
<h1 class="mb-5 position-relative fs-4 fw-bold sp-module-title">{{ post.title }}</h1>
{% endblock %}

View File

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

View File

@ -1,7 +1,7 @@
{% extends 'layouts/base.twig' %}
{% block content %}
<p class="mb-5 position-relative fs-4 fw-bold sp-module-title">NOTICIAS</p>
<h1 class="mb-5 position-relative fs-3 fw-bold sp-module-title">{{ post.title }}</h1>
<section class="posts-noticias">
{% if recent_posts_noticias %}
@ -10,15 +10,19 @@
<div class="card my-3 position-relative">
<div class="row g-0">
<div class="col-md-4">
<img src="{{ noticias.thumbnail.src }}"
class="rounded-start object-fit-cover w-100 h-100"
alt="{{ noticias.thumbnail.alt }}"
style="min-height: 200px;"
/>
<a href="{{ noticias.link }}" title="{{ noticias.title }}">
<img src="{{ noticias.thumbnail.src }}"
class="rounded-start object-fit-cover w-100 h-100 img-noticias"
alt="{{ noticias.thumbnail.alt }}"
style="min-height: 200px;"
/>
</a>
</div>
<div class="col-md-8">
<div class="card-body" style="padding-bottom: 60px;">
<h5 class="card-title">{{ noticias.title }}</h5>
<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,
@ -29,7 +33,10 @@
<a href="{{ noticias.link }}"
class="btn position-absolute btn-secondary-cnt"
style="position: absolute; bottom: 15px; right: 15px; z-index: 10;"
>Sigue leyendo...</a>
>
{{ __('Sigue leyendo', 'Sindikatua') }}...
</a>
</div>
</div>
</div>

View File

@ -4,120 +4,116 @@
{# Sección noticias #}
{% if recent_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] %}
<div class="card main-article">
<a href="{{ main_article.link }}">
<img src="{{ main_article.thumbnail.src('medium') }}"
alt="{{ main_article.thumbnail.alt }}"
class="card-img " />
<div class="card-img-overlay">
<h3 class="card-title text-wrap">
<a href="{{ main_article.link }}">{{ main_article.title }}</a>
</h3>
</div>
</div>
</div>
{# 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] %}
<div class="card secondary-article {% if loop.first %}media-mb{% endif %}">
<a href="{{ article.link }}">
<img src="{{ article.thumbnail.src('medium') }}"
alt="{{ article.thumbnail.alt }}"
class="card-img "/>
<div class="card-img-overlay">
<h3 class="card-title text-wrap">
<a href="{{ article.link }}">{{ article.title }}</a>
</h3>
</div>
<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] %}
<div class="card main-article">
<a href="{{ main_article.link }}">
<img src="{{ main_article.thumbnail.src('medium') }}"
alt="{{ main_article.thumbnail.alt }}"
class="card-img img-noticias" />
<div class="card-img-overlay">
<h3 class="card-title text-wrap">
<a href="{{ main_article.link }}">{{ main_article.title }}</a>
</h3>
</div>
{% endfor %}
</div>
</div>
</div>
</section>
{% else %}
<h2>no hay artículos</h2>
{% endif %}
{# Sección Logos #}
{% if botones_imagen %}
<section class="custom-buttons-section margin-50">
<p class="mb-4 position-relative fs-4 fw-bold sp-module-title">ENLACES</p>
<div class="row g-3">
{% for boton in botones_imagen %}
<div class="col-md-3 col-sm-6 btn-hover">
<a href="{{ boton.enlace }}" class="btn-image-only d-block" target="_blank" rel="noopener noreferrer">
<img src="{{ boton.imagen.sizes.medium }}"
alt="{{ boton.imagen.alt }}"
class="img-fluid rounded">
</a>
</div>
{% endfor %}
</div>
{# 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] %}
<div class="card secondary-article {% if loop.first %}media-mb{% endif %}">
<a href="{{ article.link }}">
<img src="{{ article.thumbnail.src('medium') }}"
alt="{{ article.thumbnail.alt }}"
class="card-img img-noticias"/>
<div class="card-img-overlay">
<h3 class="card-title text-wrap">
<a href="{{ article.link }}">{{ article.title }}</a>
</h3>
</div>
</div>
{% endfor %}
</div>
</div>
</div>
</section>
{% endif %}
{# Sección vídeos #}
{# 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>
<div class="row g-3">
{% if botones_imagen %}
{% for boton in botones_imagen %}
<div class="col-6 col-sm-6 col-md-3 btn-hover">
<a href="{{ boton.enlace }}" class="btn-image-only d-block" target="_blank" rel="noopener noreferrer">
<img src="{{ boton.imagen.sizes.medium }}"
alt="{{ boton.imagen.alt }}"
class="img-fluid rounded">
</a>
</div>
{% endfor %}
{% endif %}
</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="container">
<div class="row align-items-stretch">
<div class="row align-items-stretch">
{% if posts_campana %}
<div class="col-6">
<p class="mb-4 position-relative fs-4 fw-bold sp-module-title">CAMPAÑAS</p>
<div class="col-6">
<h1 class="mb-4 position-relative fs-4 fw-bold sp-module-title">{{ __('Campañas', 'Sindikatua')|upper }}</h1>
{% if posts_campana and posts_campana|length > 0 %}
{% set main_article = posts_campana[0] %}
<div class="card main-article">
<a href="{{ main_article.link }}">
<img src="{{ main_article.thumbnail.src('medium') }}"
alt="{{ main_article.thumbnail.alt }}"
class="card-img card-img-fixed" />
class="card-img card-img-fixed img-noticias" />
<div class="card-img-overlay">
<h3 class="card-title text-wrap">
<a href="{{ main_article.link }}">{{ main_article.title }}</a>
</h3>
</div>
</div>
</div>
{% else %}
<h2>no hay artículos</h2>
<p>{{ __('No hay artículos', 'Sindikatua') }}</p>
{% endif %}
</div>
{% if posts_campana %}
<div class="col-6">
<p class="mb-4 position-relative fs-4 fw-bold sp-module-title">CONFLICTOS LABORALES (WIP)</p>
<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] %}
<div class="card main-article">
<a href="{{ main_article.link }}">
<img src="{{ main_article.thumbnail.src('medium') }}"
alt="{{ main_article.thumbnail.alt }}"
class="card-img card-img-fixed" />
class="card-img card-img-fixed img-noticias" />
<div class="card-img-overlay">
<h3 class="card-title text-wrap">
<a href="{{ main_article.link }}">{{ main_article.title }}</a>
</h3>
</div>
</div>
</div>
{% else %}
<h2>no hay artículos</h2>
<p>{{ __('No hay artículos', 'Sindikatua') }}</p>
{% endif %}
</div>
</div>
</div>
</section>

View File

@ -1,43 +1,15 @@
{% extends 'layouts/base.twig' %}
{% block content %}
<p class="mb-5 position-relative fs-4 fw-bold sp-module-title">AFÍLIATE</p>
<div class="affiliate-section">
<div class="container">
<div class="row align-items-center p-5">
<!-- Primera columna - Imagen -->
<div class="col-md-6">
{% if afiliate_fields.imagen_afiliate %}
<div class="affiliate-image">
<img src="{{ afiliate_fields.imagen_afiliate }}"
class="img-fluid rounded">
</div>
{% endif %}
</div>
<!-- Segunda columna - Contenido y botón -->
<div class="col-md-6">
<div class="affiliate-content">
<!-- Contenido de la página -->
<div class="page-content">
{{ post.content }}
</div>
<!-- Botón de afiliado -->
{% if afiliate_fields.enlace_boton_afiliate %}
<div class="affiliate-button-container mt-4">
<a href="{{ afiliate_fields.enlace_boton_afiliate }}"
class="btn btn-lg btn-primary-cnt"
target="_blank"
rel="noopener noreferrer">
{{ afiliate_fields.texto_boton }}
</a>
</div>
{% endif %}
</div>
<h1 class="mb-5 position-relative fs-4 fw-bold sp-module-title">{{ post.title }}</h1>
<div class="affiliate-section">
<div class="container">
<div class="page-content">
{{ post.content }}
</div>
</div>
</div>
</div>
{% endblock %}

View File

@ -1,64 +1,61 @@
{% extends 'layouts/base.twig' %}
{% block content %}
<p class="mb-5 position-relative fs-4 fw-bold sp-module-title">VÍDEOS</p>
<h1 class="mb-5 position-relative fs-4 fw-bold sp-module-title">{{ post.title }}</h1>
<div class="container text-center">
<div class="row">
{% if videos %}
{% for video in videos %}
<div class="col-xl-3 col-lg-4 col-md-6 col-sm-12 mb-2">
<div class="video-item">
{% set url_video = video.meta('url_video') %}
{% set video_data = generar_embed(url_video) %}
{% if video_data %}
{% if videos %}
{% for video in videos %}
<div class="col-xl-3 col-lg-4 col-md-6 col-sm-12 mb-2">
<div class="video-item">
{% set url_video = video.meta('url_video') %}
{% set video_data = generar_embed(url_video) %}
{% if video_data %}
{# Thumbnail clickeable en lugar del iframe #}
<div class="ratio ratio-16x9 video-thumbnail-container position-relative rounded"
data-bs-toggle="modal"
data-bs-target="#videoModal"
data-video-url="{{ video_data.embed_url }}"
data-video-title="{{ video.titulo }}"
data-video-allow="{{ video_data.allow }}"
style="cursor: pointer;
background-image: url('{{ video_data.thumbnail_url }}');
background-size: cover;
background-position: center;">
{# Thumbnail clickeable en lugar del iframe #}
<div class="ratio ratio-16x9 video-thumbnail-container position-relative rounded"
data-bs-toggle="modal"
data-bs-target="#videoModal"
data-video-url="{{ video_data.embed_url }}"
data-video-title="{{ video.titulo }}"
data-video-allow="{{ video_data.allow }}"
style="cursor: pointer;
background-image: url('{{ video_data.thumbnail_url }}');
background-size: cover;
background-position: center;">
{# Overlay con botón play #}
<div class="position-absolute top-0 start-0 w-100 h-100 d-flex align-items-center justify-content-center">
<div class="btn btn-danger btn-lg rounded-circle d-flex align-items-center justify-content-center"
style="width: 60px; height: 60px;">
<i class="bi bi-play-btn" style="font-size: 2rem;"></i>
{# Overlay con botón play #}
<div class="position-absolute top-0 start-0 w-100 h-100 d-flex align-items-center justify-content-center">
<div class="btn btn-danger btn-lg rounded-circle d-flex align-items-center justify-content-center"
style="width: 60px; height: 60px;">
<i class="bi bi-play-btn" style="font-size: 2rem;"></i>
</div>
</div>
{# Overlay oscuro al hover #}
<div class="position-absolute top-0 start-0 w-100 h-100 bg-dark opacity-0 hover-overlay"
style="transition: opacity 0.3s ease;">
</div>
{# Título del vídeo #}
<div class="position-absolute bottom-0 start-0 end-0 bg-dark bg-opacity-75 text-white p-3 rounded">
<h6 class="mb-0 text-white">{{ video.titulo }}</h6>
</div>
</div>
{# Overlay oscuro al hover #}
<div class="position-absolute top-0 start-0 w-100 h-100 bg-dark opacity-0 hover-overlay"
style="transition: opacity 0.3s ease;">
</div>
{# Título del vídeo #}
<div class="position-absolute bottom-0 start-0 end-0 bg-dark bg-opacity-75 text-white p-3 rounded">
<h6 class="mb-0 text-white">{{ video.titulo }}</h6>
</div>
{% else %}
<div class="alert alert-warning">
<h5>{{ video.titulo }}</h5>
<p class="mb-0">No se ha configurado URL para este vídeo.</p>
</div>
{% endif %}
</div>
{% else %}
<div class="alert alert-warning">
<h5>{{ video.titulo }}</h5>
<p class="mb-0">No se ha configurado URL para este vídeo.</p>
</div>
{% endif %}
</div>
</div>
{% endfor %}
{% else %}
<p>No hay vídeos disponibles.</p>
{% endif %}
{% endfor %}
{% else %}
<p>No hay vídeos disponibles.</p>
{% endif %}
</div>
{# MODAL PARA REPRODUCIR VÍDEO #}
@ -87,5 +84,4 @@
</div>
{% endblock %}
{% endblock %}

View File

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

View File

@ -3,9 +3,9 @@
{% block content %}
<section class="search-canvas ">
<p class="mb-5 position-relative fs-4 fw-bold sp-module-title">BÚSQUEDA</p>
<p class="mb-5 position-relative fs-4 fw-bold sp-module-title">{{ post.title }}</p>
<p>Resultados de búsqueda para: "{{ search_query }}"</p>
<p>{{ __('Resultados de búsqueda para', 'Sindikatua')}}: "{{ search_query }}"</p>
<div class="content-wrapper">
{% for post in posts %}
{% include ['partials/tease-' ~ post.type ~ '.twig', 'partials/tease.twig'] %}

View File

@ -1,7 +1,7 @@
{% extends 'layouts/base.twig' %}
{% block content %}
<p class="mb-5 position-relative fs-4 fw-bold sp-module-title">ACERCA DE LA CNT</p>
<p class="mb-5 position-relative fs-4 fw-bold sp-module-title">{{ post.title }}</p>
<div class="container mt-4">
<div class="row">

View File

@ -10,7 +10,7 @@
<!-- Title & author & date -->
<h1 class="article-h1">{{ post.title }}</h1>
<p class="blog-author mt-3 mb-5 border-dark border-bottom">
<span>Autor:</span>
<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>

View File

@ -11,7 +11,7 @@
<h1 class="article-h1">{{ post.title }}</h1>
<p class="blog-author mt-3 mb-5 border-dark border-bottom">
<span>Autor:</span>
<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>
@ -35,7 +35,7 @@
</div>
{% if post.comment_status == 'closed' %}
<p>No se puede comentar.</p>
<p>{{ __('No se puede comentar', 'Sindikatua') }}</p>
{% else %}
{% include 'partials/comment-form.twig' %}
{% endif %}