footer & pags legales
This commit is contained in:
@ -363,6 +363,11 @@ button[type="reset"] {
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.section-footer .text-footer a,
|
||||
.section-footer .text-footer p {
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
/* FORM */
|
||||
/* Contenedor principal del formulario */
|
||||
.formulario-contacto {
|
||||
|
||||
@ -2,8 +2,8 @@
|
||||
<div class="row py-4">
|
||||
|
||||
<div class="col-sm-4 mb-1">
|
||||
<div class=""><img src="/wp-content/uploads/2025/07/logobehea.png" class="img-fluid" /></div>
|
||||
<div class="p-1">
|
||||
<div><img src="/wp-content/uploads/2025/07/logobehea.png" class="img-fluid" /></div>
|
||||
<div class="p-1 text-footer">
|
||||
<p>{{ footer_1 }}</p>
|
||||
<p>{{ footer_2 }}</p>
|
||||
</div>
|
||||
@ -21,26 +21,26 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-5 mb-5 px-2">
|
||||
<div class="col-sm-5 mb-5 px-2 text-footer">
|
||||
|
||||
<h3 class="text-decoration-underline">{{ __('Últimas noticias', 'Sindikatua') }}</h3>
|
||||
<h5 class="text-decoration-underline">{{ __('Últimas noticias', 'Sindikatua') }}</h5>
|
||||
{% for article in lasts_posts_news[0:2] %}
|
||||
<ul class="list-unstyled ms-4">
|
||||
<li>
|
||||
<a href="{{ article.link }}"
|
||||
class="text-decoration-none fs-6 text-white hover-title-text"
|
||||
class="text-decoration-none text-white hover-title-text"
|
||||
>
|
||||
{{ article.title }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% endfor %}
|
||||
|
||||
<h3 class="text-decoration-underline">{{ __('Última Opinión', 'Sindikatua') }}</h3>
|
||||
<h5 class="text-decoration-underline">{{ __('Última Opinión', 'Sindikatua') }}</h5>
|
||||
{% for article in last_posts_opinion %}
|
||||
<ul class="list-unstyled ms-4">
|
||||
<li>
|
||||
<a href="{{ article.link }}"
|
||||
class="text-decoration-none fs-6 text-white hover-title-text"
|
||||
class="text-decoration-none text-white hover-title-text"
|
||||
>
|
||||
{{ article.title }}</a>
|
||||
</li>
|
||||
@ -48,16 +48,16 @@
|
||||
{% endfor %}
|
||||
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<div class="col-sm-3 text-footer">
|
||||
|
||||
{% if listContacts %}
|
||||
<div class="footer-contactos">
|
||||
<h3 class="text-decoration-underline">{{ __('Contactos', 'Sindikatua') }}</h3>
|
||||
<div class="footer-contactos ps-5">
|
||||
<h5 class="text-decoration-underline">{{ __('Contactos', 'Sindikatua') }}</h5>
|
||||
<ul class="list-unstyled ms-4">
|
||||
{% for contacto in listContacts %}
|
||||
<li>
|
||||
<a href="{{ contacto.link }}"
|
||||
class="text-decoration-none fs-6 text-white hover-title-text"
|
||||
class="text-decoration-none text-white hover-title-text"
|
||||
>
|
||||
{{ contacto.title }}</a>
|
||||
</li>
|
||||
@ -71,10 +71,11 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="py-2 text-center mt-5 border-top border-light">
|
||||
<div class="py-2 text-center mt-5 border-top border-light text-footer">
|
||||
<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.', 'Sindikatua') }}</p>
|
||||
<p class="mb-0 fs-8">• {{ __('Todos los derechos reservados', 'Sindikatua') }}• {{"now"|date('Y')}}</p>
|
||||
<a class="nav-link d-inline" href="/politica-privacidad">{{ __('Aviso legal y política de privacidad', 'Sindikatua') }} •</a>
|
||||
<a class="nav-link d-inline" href="/politica-cookies">{{ __('Política de cookies', 'Sindikatua') }}</a>
|
||||
<p class="mb-0">• {{ __('Todos los derechos reservados', 'Sindikatua') }}• {{"now"|date('Y')}}</p>
|
||||
<a class="nav-link d-inline" href="/aviso-legal">{{ __('Aviso legal', 'Sindikatua') }} •</a>
|
||||
<a class="nav-link d-inline" href="/politica-privacidad">{{ __('Política de privacidad', 'Sindikatua') }} •</a>
|
||||
<a class="nav-link d-inline" href="/politica-de-cookies">{{ __('Política de cookies', 'Sindikatua') }}</a>
|
||||
</div>
|
||||
</div>
|
||||
@ -1,21 +1,43 @@
|
||||
{% extends 'layouts/base.twig' %}
|
||||
|
||||
{% block content %}
|
||||
<p class="mb-5 position-relative fs-4 fw-bold sp-module-title">{{ post.title }}</p>
|
||||
{% macro contenido_subpagina(post) %}
|
||||
<div class="card mb-3">
|
||||
<div class="card-header">
|
||||
<h5 class="card-title">{{ post.title }}</h5>
|
||||
</div>
|
||||
<div class="card-body" style="padding-bottom: 60px;">
|
||||
<div class="card-text">
|
||||
{{ post.content }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{% block content %}
|
||||
<script src="https://cdn.jsdelivr.net/npm/htmx.org@2.0.8/dist/htmx.min.js"></script>
|
||||
|
||||
<p class="mb-5 position-relative fs-4 fw-bold sp-module-title">{{ post.title }}</p>
|
||||
{# {{ dump(post.children) }} #}
|
||||
<div class="container mt-4">
|
||||
<div class="row">
|
||||
<div class="row" id="page-columns">
|
||||
|
||||
<!-- Columna izquierda: títulos -->
|
||||
<div class="col-md-4 border-end">
|
||||
<ul id="post-list" class="list-group">
|
||||
{% for pagina in SubpaginasAcercaCnt %}
|
||||
<li class="list-group-item {% if loop.first %}active-acerca{% endif %}" data-page-id="{{ pagina.id }}">
|
||||
<a href="#"
|
||||
data-page-id="{{ pagina.id }}"
|
||||
class="text-decoration-none d-block w-100 {% if loop.first %}text-white{% else %}text-black{% endif %}">
|
||||
{{ pagina.title }}
|
||||
</a>
|
||||
</li>
|
||||
{% for pagina in post.children('page') %}
|
||||
{% set is_active = (subpagina and subpagina.id == pagina.id) or (not subpagina and loop.first) %}
|
||||
{% set active_class = is_active ? 'bg-danger text-white' : 'text-black' %}
|
||||
|
||||
<li class="list-group-item {{active_class}}" data-page-id="{{ pagina.id }}">
|
||||
<a hx-get="{{ pagina.link }}"
|
||||
hx-target="#page-columns"
|
||||
hx-select="#page-columns"
|
||||
hx-swap="outerHTML"
|
||||
hx-push-url="true"
|
||||
href="{{ pagina.link }}" class="text-decoration-none d-block w-100 {{ active_class }}">
|
||||
{{ pagina.title }}
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
@ -23,188 +45,16 @@
|
||||
<!-- Columna derecha: contenido del post -->
|
||||
<div class="col-md-8">
|
||||
<div id="content-area">
|
||||
{% if SubpaginasAcercaCnt|length > 0 %}
|
||||
{% set primera = SubpaginasAcercaCnt|first %}
|
||||
<div class="card mb-3">
|
||||
<div class="card-header">
|
||||
<h5 class="card-title">{{ primera.title }}</h5>
|
||||
</div>
|
||||
<div class="card-body" style="padding-bottom: 60px;">
|
||||
<div class="card-text">
|
||||
{{ primera.content }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% if subpagina %}
|
||||
{% set primera = post.children('page')|first %}
|
||||
{{ _self.contenido_subpagina(subpagina) }}
|
||||
{% else %}
|
||||
{{ _self.contenido_subpagina(post.children('page')|first) }}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
// document.addEventListener('DOMContentLoaded', function() {
|
||||
// const postList = document.getElementById('post-list');
|
||||
// const contentArea = document.getElementById('content-area');
|
||||
|
||||
// postList.addEventListener('click', function(e) {
|
||||
// const link = e.target.closest('a');
|
||||
// if (!link) return;
|
||||
|
||||
// e.preventDefault();
|
||||
|
||||
// const pageId = link.getAttribute('data-page-id');
|
||||
|
||||
// // Remover clase active de todos
|
||||
// postList.querySelectorAll('.list-group-item').forEach(item => {
|
||||
// item.classList.remove('active-acerca');
|
||||
// const a = item.querySelector('a');
|
||||
// if (a) {
|
||||
// a.classList.remove('text-white');
|
||||
// a.classList.add('text-black');
|
||||
// }
|
||||
// });
|
||||
|
||||
// // Añadir clase active al clickeado
|
||||
// const listItem = link.closest('.list-group-item');
|
||||
// listItem.classList.add('active-acerca');
|
||||
// link.classList.add('text-white');
|
||||
// link.classList.remove('text-black');
|
||||
|
||||
// // Mostrar loader
|
||||
// contentArea.innerHTML = '<div class="text-center p-5"><div class="spinner-border" role="status"><span class="visually-hidden">Cargando...</span></div></div>';
|
||||
|
||||
// // Cargar contenido via AJAX
|
||||
// fetch('{{ site.url }}/wp-admin/admin-ajax.php', {
|
||||
// method: 'POST',
|
||||
// headers: {
|
||||
// 'Content-Type': 'application/x-www-form-urlencoded',
|
||||
// },
|
||||
// body: 'action=get_page_content&page_id=' + pageId
|
||||
// })
|
||||
// .then(response => response.json())
|
||||
// .then(data => {
|
||||
// if (data.success) {
|
||||
// contentArea.innerHTML = `
|
||||
// <div class="card mb-3">
|
||||
// <div class="card-header">
|
||||
// <h5 class="card-title">${data.data.title}</h5>
|
||||
// </div>
|
||||
// <div class="card-body" style="padding-bottom: 60px;">
|
||||
// <div class="card-text">
|
||||
// ${data.data.content}
|
||||
// </div>
|
||||
// </div>
|
||||
// </div>
|
||||
// `;
|
||||
|
||||
// // Actualizar URL en el navegador
|
||||
// if (data.data.url) {
|
||||
// history.pushState({pageId: pageId}, data.data.title, data.data.url);
|
||||
// document.title = data.data.title + ' - {{ site.name }}';
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
// .catch(error => {
|
||||
// contentArea.innerHTML = '<div class="alert alert-danger">Error al cargar el contenido</div>';
|
||||
// console.error('Error:', error);
|
||||
// });
|
||||
// });
|
||||
// });
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
const postList = document.getElementById('post-list');
|
||||
const contentArea = document.getElementById('content-area');
|
||||
|
||||
// Detectar si hay una subpágina en la URL
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
const subpageId = urlParams.get('subpage');
|
||||
|
||||
if (subpageId) {
|
||||
// Buscar y hacer click en la subpágina correspondiente
|
||||
const link = document.querySelector(`a[data-page-id="${subpageId}"]`);
|
||||
if (link) {
|
||||
link.click();
|
||||
}
|
||||
}
|
||||
|
||||
postList.addEventListener('click', function(e) {
|
||||
const link = e.target.closest('a');
|
||||
if (!link) return;
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
const pageId = link.getAttribute('data-page-id');
|
||||
|
||||
// Remover clase active de todos
|
||||
postList.querySelectorAll('.list-group-item').forEach(item => {
|
||||
item.classList.remove('active-acerca');
|
||||
const a = item.querySelector('a');
|
||||
if (a) {
|
||||
a.classList.remove('text-white');
|
||||
a.classList.add('text-black');
|
||||
}
|
||||
});
|
||||
|
||||
// Añadir clase active al clickeado
|
||||
const listItem = link.closest('.list-group-item');
|
||||
listItem.classList.add('active-acerca');
|
||||
link.classList.add('text-white');
|
||||
link.classList.remove('text-black');
|
||||
|
||||
// Mostrar loader
|
||||
contentArea.innerHTML = '<div class="text-center p-5"><div class="spinner-border" role="status"><span class="visually-hidden">Cargando...</span></div></div>';
|
||||
|
||||
// Cargar contenido via AJAX
|
||||
fetch('{{ site.url }}/wp-admin/admin-ajax.php', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
},
|
||||
body: 'action=get_page_content&page_id=' + pageId
|
||||
})
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
if (data.success) {
|
||||
contentArea.innerHTML = `
|
||||
<div class="card mb-3">
|
||||
<div class="card-header">
|
||||
<h5 class="card-title">${data.data.title}</h5>
|
||||
</div>
|
||||
<div class="card-body" style="padding-bottom: 60px;">
|
||||
<div class="card-text">
|
||||
${data.data.content}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
// Actualizar URL en el navegador
|
||||
if (data.data.url) {
|
||||
const parentUrl = window.location.pathname;
|
||||
const newUrl = parentUrl + '?subpage=' + pageId;
|
||||
history.pushState({pageId: pageId}, data.data.title, newUrl);
|
||||
document.title = data.data.title + ' - {{ site.name }}';
|
||||
}
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
contentArea.innerHTML = '<div class="alert alert-danger">Error al cargar el contenido</div>';
|
||||
console.error('Error:', error);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
// Manejar botones atrás/adelante del navegador
|
||||
window.addEventListener('popstate', function(e) {
|
||||
if (e.state && e.state.pageId) {
|
||||
// Simular click en el elemento correspondiente
|
||||
const link = document.querySelector(`a[data-page-id="${e.state.pageId}"]`);
|
||||
if (link) {
|
||||
link.click();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
15
views/templates/page-aviso-legales.twig
Normal file
15
views/templates/page-aviso-legales.twig
Normal file
@ -0,0 +1,15 @@
|
||||
{% extends 'layouts/base.twig' %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h1 class="my-5 position-relative fs-4 fw-bold sp-module-title">{{ post.title }}</h1>
|
||||
|
||||
<div class="seccion-politica-privacidad">
|
||||
<div class="container">
|
||||
<div class="page-content">
|
||||
{{ post.content }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
@ -40,15 +40,15 @@
|
||||
|
||||
<div class="btn-group m-1" role="group" aria-label="First group">
|
||||
{% if contacto_info.url_facebook %}
|
||||
<a href="{{ contacto_info.url_facebook }}" class="btn btn-outline-dark btn-sm pt-0" target="_blank" rel="noopener noreferrer">
|
||||
<a href="{{ contacto_info.url_facebook }}" class="btn btn-outline-dark btn-sm pt-0" target="_blank" rel="noopener">
|
||||
<i class="bi bi-facebook"></i></a>
|
||||
{% endif %}
|
||||
{% if contacto_info.url_twitter %}
|
||||
<a href="{{ contacto_info.url_twitter }}" class="btn btn-outline-dark btn-sm pt-0" target="_blank" rel="noopener noreferrer">
|
||||
<a href="{{ contacto_info.url_twitter }}" class="btn btn-outline-dark btn-sm pt-0" target="_blank" rel="noopener">
|
||||
<i class="bi bi-twitter-x"></i></a>
|
||||
{% endif %}
|
||||
{% if contacto_info.url_web %}
|
||||
<a href="{{ contacto_info.url_web }}" class="btn btn-outline-dark btn-sm pt-0" target="_blank" rel="noopener noreferrer">
|
||||
<a href="{{ contacto_info.url_web }}" class="btn btn-outline-dark btn-sm pt-0" target="_blank" rel="noopener">
|
||||
<i class="bi bi-globe"></i></a>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
15
views/templates/page-politica-de-cookies.twig
Normal file
15
views/templates/page-politica-de-cookies.twig
Normal file
@ -0,0 +1,15 @@
|
||||
{% extends 'layouts/base.twig' %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h1 class="my-5 position-relative fs-4 fw-bold sp-module-title">{{ post.title }}</h1>
|
||||
|
||||
<div class="seccion-politica-privacidad">
|
||||
<div class="container">
|
||||
<div class="page-content">
|
||||
{{ post.content }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
15
views/templates/page-politica-privacidad.twig
Normal file
15
views/templates/page-politica-privacidad.twig
Normal file
@ -0,0 +1,15 @@
|
||||
{% extends 'layouts/base.twig' %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h1 class="mys-5 position-relative fs-4 fw-bold sp-module-title">{{ post.title }}</h1>
|
||||
|
||||
<div class="seccion-politica-privacidad">
|
||||
<div class="container">
|
||||
<div class="page-content">
|
||||
{{ post.content }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user