Compare commits

...

2 Commits

Author SHA1 Message Date
f44c07c93c STYLE titles 2025-10-23 09:52:45 +00:00
83adeb1b54 Clean funciones documentos y acerca 2025-10-23 09:52:30 +00:00
7 changed files with 15 additions and 66 deletions

View File

@@ -380,59 +380,6 @@ class StarterSite extends Site {
return $logos;
}
// Recoge los posts del Post Type (ACF) Acerca
// private function getPaginasAcerca() {
// return Timber::get_posts([
// 'post_type' => 'acerca',
// 'post_status' => 'publish',
// 'orderby' => 'menu_order',
// 'order' => 'ASC',
// 'posts_per_page' => -1,
// ]);
// }
private function getDocumentos() {
$args = ([
'post_type' => 'documento',
'post_status' => 'publish',
'orderby' => 'menu_order',
'order' => 'ASC',
'posts_per_page' => -1,
'lang' => '',
]);
$posts = Timber::get_posts($args);
//error_log('✅ Número de posts "Documentos" encontrados: ' . count($posts));
$documentos = [];
foreach ($posts as $post) {
$doc = [
'id' => $post->ID,
'title' => $post->title,
'link' => $post->link,
'content' => $post->content,
'excerpt' => $post->excerpt,
'lang' => pll_get_post_language($post->ID),
];
$archivo = get_field('documento', $post->ID);
if ($archivo && is_array($archivo)) {
$doc['documento_url'] = $archivo['url'] ?? '';
$doc['documento_filename'] = $archivo['filename'] ?? '';
$doc['documento_filesize'] = size_format($archivo['filesize'] ?? 0);
$doc['documento_extension'] = pathinfo($archivo['filename'] ?? '', PATHINFO_EXTENSION);
$doc['thumbnail'] = get_the_post_thumbnail_url($post->ID, 'medium');
}
$documentos[] = $doc;
}
return $documentos;
}
private function getEnlaces() {
$grupos = [];
@@ -745,8 +692,6 @@ class StarterSite extends Site {
//Otras páginas
$context['SubpaginasAcercaCnt'] = $this->getSubpaginasAcercaCnt();
//$context['paginas_acerca'] = $this->getPaginasAcerca();
//$context['documentos'] = $this->getDocumentos();
$context['enlaces'] = $this->getEnlaces();
$context['contacto_info'] = $this->getContactoFields();
$context['posts_industry'] = $this->getPostIndustry();

View File

@@ -299,8 +299,8 @@ button[type="reset"] {
align-items: center;
}
.posts-noticias .card-title-text:hover {
font-weight: bolder;
.hover-title-text:hover {
color: var(--rojo-cnt) !important;
}
/* efecto img */
@@ -494,7 +494,7 @@ button[type="reset"] {
}
/**
* Texto sección tease.twig
* Animación en hover.
*/
.link-underline-animate {
position: relative;

View File

@@ -2,13 +2,14 @@
id="tease-{{ post.id }}"
style="padding-bottom: 65px !important;">
<div class="row align-items-center section-tease">
<!-- Columna izquierda: título y excerpt -->
<div class="col">
<h2 class="h2">
<p class="fs-5 text-black fw-bolder">
<a href="{{ post.link }}"
class="text-decoration-none text-dark link-underline-animate">
class="text-decoration-none text-dark hover-title-text">
{{ post.title }}</a>
</h2>
</p>
<p>{{ post.excerpt({
words: 50,
read_more: ''

View File

@@ -23,7 +23,7 @@
<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>
<h5 class="fw-bolder hover-title-text">{{ noticias.title }}</h5>
</a>
<p class="card-text"> {{

View File

@@ -3,14 +3,17 @@
{% block content %}
<h1 class="my-5 position-relative fs-3 fw-bold sp-module-title">{{ __('Documentos', 'Sindikatua') }}</h1>
<section class="documentos">
<section class="page-documentos">
<div class="container">
{% if documentos %}
{% for doc in documentos %}
<div class="card mb-3">
<div class="card-header">
<h6 class="card-title mb-1">{{ doc.title }}</h6>
<a href="{{ doc.documento_url }}" class="text-decoration-none" target="_blank">
<p class="card-title mb-1 fs-5 text-black fw-bolder hover-title-text">{{ doc.title }}</p>
</a>
</div>
<div class="row g-0">
<div class="col-1">

View File

@@ -23,7 +23,7 @@
<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>
<h5 class="fw-bolder hover-title-text">{{ noticias.title }}</h5>
</a>
<p class="card-text"> {{
noticias.excerpt({

View File

@@ -22,7 +22,7 @@
<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>
<h5 class="fw-bolder hover-title-text">{{ noticias.title }}</h5>
</a>
<p class="card-text"> {{
noticias.excerpt({