ADD segundo idioma
This commit is contained in:
@ -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">• Todos los derechos reservados • {{"now"|date('Y')}}</p>
|
||||
<a class="nav-link d-inline" href="/politica-de-privacidad">Aviso legal y política de privacidad •</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">• Eskubide guztiak erreserbatuta • {{"now"|date('Y')}}</p>
|
||||
<a class="nav-link d-inline" href="/politica-de-privacidad">Lege oharra eta pribatutasun politika •</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">• Todos los derechos reservados • {{"now"|date('Y')}}</p>
|
||||
<a class="nav-link d-inline" href="/politica-de-privacidad">Aviso legal y política de privacidad •</a>
|
||||
<a class="nav-link d-inline" href="/politica-de-cookies">Política de cookies</a>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@ -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>
|
||||
|
||||
@ -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>
|
||||
|
||||
Reference in New Issue
Block a user