ADD new pages
This commit is contained in:
@ -1,5 +1,9 @@
|
||||
{% extends 'layouts/base.twig' %}
|
||||
|
||||
{% block content %}
|
||||
Sorry, we couldn't find what you're looking for.
|
||||
<main class="container py-5 text-center">
|
||||
<h1 class="display-4">404 - Página no encontrada</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>
|
||||
</main>
|
||||
{% endblock %}
|
||||
|
@ -1,7 +1,52 @@
|
||||
{% extends 'layouts/base.twig' %}
|
||||
|
||||
{% block content %}
|
||||
<div class="alert alert-warning" role="alert">
|
||||
Acerca de la CNT ---- A simple warning alert—check it out!
|
||||
{% include 'partials/breadcrumb.twig' %}
|
||||
|
||||
<div class="container mt-4">
|
||||
<div class="row">
|
||||
<!-- Columna izquierda: títulos -->
|
||||
<div class="col-md-4 border-end">
|
||||
<ul id="post-list" class="list-group">
|
||||
{% for pagina in paginas_acerca %}
|
||||
|
||||
<li class="list-group-item {% if pagina.id == post.id %}active{% endif %}" data-post-id="{{ pagina.id }}">
|
||||
<a href="#"
|
||||
data-post-id="{{ pagina.id }}"
|
||||
class="text-decoration-none d-block w-100 {% if pagina.id == post.id %}text-white{% endif %}">
|
||||
{{ pagina.title }}
|
||||
</a>
|
||||
</li>
|
||||
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<!-- Columna derecha: contenido dinámico del post (se llena con el primer post) -->
|
||||
<div class="col-md-8" id="post-content">
|
||||
<!-- Aquí se inyectará dinámicamente el primer post con JS -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Plantilla oculta con el contenido completo de cada post -->
|
||||
<div id="post-templates" class="d-none">
|
||||
{% for pagina in paginas_acerca %}
|
||||
<div class="post-template" data-post-id="{{ pagina.id }}">
|
||||
|
||||
<div class="card mb-3">
|
||||
<div class="card-header">
|
||||
<h5 class="card-title">{{ pagina.title }}</h5>
|
||||
</div>
|
||||
<div class="card-body" style="padding-bottom: 60px;">
|
||||
<p class="card-text">
|
||||
{{ pagina.content }}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
|
@ -1,8 +1,71 @@
|
||||
{% extends 'layouts/base.twig' %}
|
||||
|
||||
{% block content %}
|
||||
<h1 class="badge text-bg-primary text-wrap">DOCUMENTOS</h1>
|
||||
<div class="alert alert-warning" role="alert">
|
||||
DOCUMENTOS ---- A simple warning alert—check it out!
|
||||
<p class="alert alert-info" role="alert">
|
||||
<i class="bi bi-folder-fill"></i>
|
||||
Dokumentuak / Documentos</p>
|
||||
|
||||
<section class="documentos">
|
||||
<div class="container">
|
||||
{% if documentos %}
|
||||
{#<pre>{{ dump(documentos) }}</pre>#}
|
||||
|
||||
{% for doc in documentos %}
|
||||
<div class="card mb-3">
|
||||
<div class="card-header">
|
||||
<h6 class="card-title mb-1">{{ doc.title }}</h6>
|
||||
</div>
|
||||
<div class="row g-0">
|
||||
<div class="col-2">
|
||||
{% if doc.thumbnail %}
|
||||
<img src="{{ doc.thumbnail }}"
|
||||
class="img-fluid object-fit-cover"
|
||||
alt="{{ doc.title }}"
|
||||
loading="lazy"
|
||||
>
|
||||
{% else %}
|
||||
<div class="bg-light d-flex align-items-center justify-content-center h-100 rounded-start">
|
||||
<i class="bi bi-file-earmark-image-fill"></i>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="col-10">
|
||||
<div class="card-body d-flex flex-column justify-content-between h-100 py-2">
|
||||
<div>
|
||||
{% if doc.content %}
|
||||
<p class="card-text small mb-2">{{ doc.content }}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{% if doc.documento_url %}
|
||||
<a href="{{ doc.documento_url }}"
|
||||
class="btn btn-primary btn-sm me-2"
|
||||
target="_blank">
|
||||
<i class="bi bi-eye-fill"></i>
|
||||
Ver documento
|
||||
</a>
|
||||
|
||||
<a href="{{ doc.documento_url }}" download
|
||||
class="btn btn-primary btn-sm me-2" >
|
||||
<i class="bi bi-cloud-download-fill"></i>
|
||||
Descargar
|
||||
</a>
|
||||
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<div class="alert alert-info" role="alert">
|
||||
No hay documentos disponibles.
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{% endblock %}
|
||||
|
@ -1,7 +1,41 @@
|
||||
{% extends 'layouts/base.twig' %}
|
||||
|
||||
{% block content %}
|
||||
<div class="alert alert-warning" role="alert">
|
||||
NOTICIAS ---- A simple warning alert—check it out!
|
||||
</div>
|
||||
{% include 'partials/breadcrumb.twig' %}
|
||||
|
||||
{% if recent_posts_noticias %}
|
||||
{% for noticias in recent_posts_noticias %}
|
||||
|
||||
<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;"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<div class="card-body" style="padding-bottom: 60px;">
|
||||
<h5 class="card-title">{{ noticias.title }}</h5>
|
||||
<p class="card-text"> {{
|
||||
noticias.excerpt({
|
||||
words: 50,
|
||||
read_more: ''
|
||||
})
|
||||
}}</p>
|
||||
<p class="card-text"><small class="text-body-secondary">{{ noticias.date }}</small></p>
|
||||
<a href="{{ noticias.link }}"
|
||||
class="btn btn-secondary position-absolute"
|
||||
style="position: absolute; bottom: 15px; right: 15px; z-index: 10;"
|
||||
>Sigue leyendo...</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<h2>no hay artículos</h2>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
@ -1,7 +1,90 @@
|
||||
{% extends 'layouts/base.twig' %}
|
||||
|
||||
{% block content %}
|
||||
<div class="alert alert-warning" role="alert">
|
||||
VIDEOS ---- A simple warning alert—check it out!
|
||||
{% include 'partials/breadcrumb.twig' %}
|
||||
|
||||
<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 %}
|
||||
|
||||
{# 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>
|
||||
|
||||
{# 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 se ha configurado URL para este vídeo.</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<p>No hay vídeos disponibles.</p>
|
||||
{% 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>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
|
39
views/templates/single-acerca.twig
Normal file
39
views/templates/single-acerca.twig
Normal file
@ -0,0 +1,39 @@
|
||||
{% extends 'layouts/base.twig' %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="container mt-4">
|
||||
<div class="row">
|
||||
|
||||
<!-- Columna izquierda: títulos -->
|
||||
<div class="col-md-4 border-end">
|
||||
<ul id="post-list" class="list-group">
|
||||
{% for pagina in paginas_acerca %}
|
||||
<li class="list-group-item {% if pagina.id == post.id %}active-acerca{% endif %}">
|
||||
<a href="{{ pagina.link }}"
|
||||
class="text-decoration-none d-block w-100 text-black {% if pagina.id == post.id %}text-white{% endif %}">
|
||||
{{ pagina.title }}
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<!-- Columna derecha: contenido del post actual -->
|
||||
<div class="col-md-8">
|
||||
<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>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
Reference in New Issue
Block a user