cambios de interfaz y de imagen

This commit is contained in:
jlimolina 2025-05-27 16:02:48 +02:00
parent 4ca48836c9
commit 86a2cdb48e
2 changed files with 165 additions and 19 deletions

View file

@ -48,26 +48,24 @@
<div class="card">
<h2 style="margin-top:0;">Noticias recientes</h2>
<ul style="list-style:none; padding:0;">
<ul class="noticias-list">
{% for fecha, titulo, resumen, url, imagen_url, cat_nom, pais_nom, cont_nom in noticias %}
<li style="margin-bottom: 2em; border-bottom: 1px solid #eee; padding-bottom: 1em;">
<div style="display: flex; gap:18px;">
{% if imagen_url %}
<div>
<img src="{{ imagen_url }}" alt="img" style="max-width:160px; max-height:100px; border-radius:6px;">
</div>
{% endif %}
<div style="flex:1;">
<div style="color:#64748b; font-size:0.97em;"><b>{{ fecha }}</b></div>
<a href="{{ url }}" target="_blank"><strong>{{ titulo }}</strong></a><br>
<span>{{ resumen|safe }}</span><br>
<small style="color:#64748b;">
Categoría: {{ cat_nom or 'N/A' }} |
País: {{ pais_nom or 'N/A' }} |
Continente: {{ cont_nom or 'N/A' }}
</small>
</div>
<li class="noticia-item">
<div class="noticia-texto">
<div style="color:#64748b; font-size:0.97em;"><b>{{ fecha }}</b></div>
<a href="{{ url }}" target="_blank"><strong>{{ titulo }}</strong></a><br>
<span>{{ resumen|safe }}</span><br>
<small style="color:#64748b;">
Categoría: {{ cat_nom or 'N/A' }} |
País: {{ pais_nom or 'N/A' }} |
Continente: {{ cont_nom or 'N/A' }}
</small>
</div>
{% if imagen_url %}
<div class="noticia-imagen">
<img src="{{ imagen_url }}" alt="img">
</div>
{% endif %}
</li>
{% else %}
<li>No hay noticias que mostrar con estos filtros.</li>