Styles footer & titles

This commit is contained in:
2025-10-15 15:34:24 +00:00
parent b038f66178
commit 2f6b47a576
6 changed files with 130 additions and 101 deletions

View File

@@ -44,7 +44,7 @@ class StarterSite extends Site {
}
});
/** POST "QUÉ ES LA CNT" */
/** ***************** ACERCA DE - POST "QUÉ ES LA CNT" */
// Previene borrar el post "Qué es la cnt" porque forma parte del menú //
$ids_especiales = [10982, 4791, 10981];
define('POST_ESPECIAL_TYPE', 'acerca');
@@ -84,9 +84,30 @@ class StarterSite extends Site {
}
return $post_states;
}, 10, 2);
/** FIN *************POST "QUÉ ES LA CNT" */
// ***************TEMP: Debug archivo vídeos
// add_action('template_redirect', function() {
// global $wp_query;
// error_log('🔍 Template: ' . get_query_var('post_type'));
// error_log('🔍 Is post type archive: ' . (is_post_type_archive() ? 'YES' : 'NO'));
// error_log('🔍 Post type archive: ' . (is_post_type_archive('videos') ? 'VIDEOS' : 'NO'));
// });
// add_action('init', function() {
// add_rewrite_rule(
// '(eu|es)/videos/?$',
// 'index.php?lang=$matches[1]&post_type=videos',
// 'top'
// );
// add_rewrite_rule(
// '(eu|es)/videos/page/([0-9]{1,})/?$',
// 'index.php?lang=$matches[1]&post_type=videos&paged=$matches[2]',
// 'top'
// );
// });
// ******************************************
parent::__construct();
}
@@ -370,18 +391,7 @@ class StarterSite extends Site {
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
if ($post && ( $post->ID === 84 || $post->ID === 331) ) {
return [
'posts' => Timber::get_posts([
'post_type' => 'videos',
'posts_per_page' => -1,
'post_status' => 'publish',
'orderby' => 'date',
'order' => 'DESC'
]),
'pagination' => null
];
} elseif ($post && ( $post->ID === 9 || $post->ID === 392) ) {
if ($post && ( $post->ID === 9 || $post->ID === 392) ) {
global $wp_query;
$temp_query = $wp_query;
@@ -695,7 +705,7 @@ class StarterSite extends Site {
$context['footer_2'] = get_field('footer_text_2', 'option');
//Otras páginas
$context['videos'] = $this->getVideos();
//$context['videos'] = $this->getVideos();
$context['paginas_acerca'] = $this->getPaginasAcerca();
$context['documentos'] = $this->getDocumentos();
$context['enlaces'] = $this->getEnlaces();
@@ -783,6 +793,19 @@ class StarterSite extends Site {
]);
}
public function getVideosSlider() {
return [
'posts' => Timber::get_posts([
'post_type' => 'videos',
'posts_per_page' => -1,
'post_status' => 'publish',
'orderby' => 'date',
'order' => 'DESC'
]),
'pagination' => null
];
}
/**
* Funciones globales
*/
@@ -858,4 +881,6 @@ class StarterSite extends Site {
return $twig;
}
}

View File

@@ -182,15 +182,15 @@ button[type="reset"] {
background: rgba(0, 0, 0, 0.8);
}
@media (991px <= width < 1400px) {
/* @media (991px <= width < 1400px) {
.page-portada .opinion-article .card-img-overlay {
height: 40%;
}
height: 45%;
}
} */
@media (width < 990px) {
@media (width < 1400px) {
.page-portada .opinion-article .card-img-overlay {
height: 20%;
height: 45%;
}
}
@@ -208,6 +208,10 @@ button[type="reset"] {
text-overflow: ellipsis;
}
.page-portada .opinion-article .card-title {
-webkit-line-clamp: 1; /* Número de líneas */
}
.page-portada .recent-posts .card-title a,
.page-portada .opinion-article .card-title a {
color: var(--white);

View File

@@ -51,11 +51,12 @@
</div>
<div class="py-2 text-center mt-5 border-top border-light">
{% if function('pll_current_language') == 'eu' %}
{# {% 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>
{% 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>
{% endif %}
{% endif %} #}
<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">&bullet; {{ __('Todos los derechos reservados', 'Sindikatua') }}&bullet; {{"now"|date('Y')}}</p>
<a class="nav-link d-inline" href="/politica-de-privacidad">{{ __('Aviso legal y política de privacidad', 'Sindikatua') }} &bullet;</a>
<a class="nav-link d-inline" href="/politica-de-cookies">{{ __('Política de cookies', 'Sindikatua') }}</a>

View File

@@ -1,7 +1,7 @@
{% extends 'layouts/base.twig' %}
{% block content %}
<h1 class="mb-5 position-relative fs-3 fw-bold sp-module-title">{{ post.title }}</h1>
<h1 class="my-5 position-relative fs-3 fw-bold sp-module-title">{{ post.title }}</h1>
<section class="posts-noticias">
{% if posts_noticias %}

View File

@@ -1,15 +1,12 @@
{% extends 'layouts/base.twig' %}
{% block content %}
<h1 class="mb-5 position-relative fs-3 fw-bold sp-module-title">{{ post.title }}</h1>
<h1 class="my-5 position-relative fs-3 fw-bold sp-module-title">{{ __('Opinión', 'Sindikatua') }}</h1>
<section class="posts-noticias">
{% if posts_opinion %}
{% for noticias in posts_opinion %}
{% set imagen = noticias.thumbnail.src | default('/wp-content/uploads/2025/10/Imagen_por_defecto_300.jpg') %}
{% set alt = noticias.thumbnail.alt | default('Imagen por defecto') %}

View File

@@ -1,9 +1,10 @@
{% extends 'layouts/base.twig' %}
{% block content %}
<h1 class="mb-5 position-relative fs-4 fw-bold sp-module-title">{{ post.title }}</h1>
<h1 class="my-5 position-relative fs-4 fw-bold sp-module-title">{{ __('Vídeos', 'Sindikatua') }}</h1>
{# {{ dump(videos.pagination) }}#}
<section class="archive-videos my-3">
<div class="container text-center">
<div class="row">
{% if videos %}
@@ -91,5 +92,6 @@
</div>
</div>
</section>
{% endblock %}