varios cambios esteticos y optimizaciones

This commit is contained in:
jlimolina 2025-11-25 03:13:54 +01:00
parent e3a99d9604
commit 9a243db633
8 changed files with 64 additions and 105 deletions

View file

@ -94,26 +94,6 @@
{% block content %}{% endblock %}
</div>
<script>
document.addEventListener('click', function(event) {
if (event.target.classList.contains('ver-mas-btn')) {
const container = event.target.closest('.resumen-container');
const corto = container.querySelector('.resumen-corto');
const completo = container.querySelector('.resumen-completo');
if (completo.style.display === 'none' || completo.style.display === '') {
corto.style.display = 'none';
completo.style.display = 'block';
event.target.textContent = 'Ver menos';
} else {
corto.style.display = 'block';
completo.style.display = 'none';
event.target.textContent = 'Ver más';
}
}
});
</script>
</body>
</html>

View file

@ -58,6 +58,18 @@
{% for e in eventos %}
{% set lista = noticias_por_evento.get(e.id) or [] %}
{% set primera = lista[0] if lista else None %}
{% set titulo_evento = e.titulo %}
{% if not titulo_evento %}
{% if primera %}
{% if primera.titulo_trad %}
{% set titulo_evento = primera.titulo_trad %}
{% else %}
{% set titulo_evento = primera.titulo_orig %}
{% endif %}
{% else %}
{% set titulo_evento = 'Evento' %}
{% endif %}
{% endif %}
<li class="noticia-item">
{% if primera and primera.imagen_url %}
@ -70,7 +82,7 @@
<div class="noticia-texto">
<h3 class="m0">
{{ e.titulo or (primera.titulo_trad or primera.titulo_orig if primera else 'Evento') }}
{{ titulo_evento }}
{% if e.n_noticias %}
<span class="badge badge-secondary" title="Número de noticias agrupadas">
{{ e.n_noticias }} noticias
@ -88,7 +100,7 @@
{% endif %}
{% endif %}
{% if e.fecha_fin and e.fecha_fin != e.fecha_inicio %}
{% if e.fecha_fin is string %}
{{ e.fecha_fin }}
{% else %}