rss/templates/base.html
2025-10-10 19:50:54 +02:00

88 lines
3.6 KiB
HTML

<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{% block title %}Agregador de Noticias RSS{% endblock %}</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css">
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
<!-- Estilos mínimos para chapa "Traducido" y (opcional) switch -->
<style>
.badge{
display:inline-block; font-size:.75rem; line-height:1;
padding:.35rem .5rem; border-radius:.5rem;
background: var(--secondary-color, #6c63ff); color:#fff; vertical-align: middle;
margin-left:.4rem;
}
/* Toggle switch opcional (si lo usas en alguna vista) */
.switch { position: relative; display: inline-block; width: 42px; height: 22px; vertical-align: middle; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
position: absolute; cursor: pointer; top:0; left:0; right:0; bottom:0;
background:#ccc; transition:.2s; border-radius:999px;
}
.slider:before {
position: absolute; content:""; height:16px; width:16px; left:3px; bottom:3px;
background:#fff; transition:.2s; border-radius:50%;
}
.switch input:checked + .slider { background: var(--secondary-color, #6c63ff); }
.switch input:checked + .slider:before { transform: translateX(20px); }
</style>
</head>
<body>
<div class="container">
<header>
<a href="{{ url_for('home') }}" style="text-decoration:none;">
<h1>Noticias</h1>
</a>
<nav class="main-nav">
<a href="{{ url_for('home') }}" class="nav-link">Noticias</a>
<a href="{{ url_for('dashboard') }}" class="nav-link">Dashboard</a>
<a href="{{ url_for('manage_feeds') }}" class="nav-link">Gestionar Feeds</a>
<a href="{{ url_for('manage_urls') }}" class="nav-link">Gestionar URLs</a>
</nav>
</header>
{% with messages = get_flashed_messages(with_categories=true) %}
{% if messages %}
<ul class="flash-messages">
{% for category, message in messages %}
<li class="{{ category }}">{{ message }}</li>
{% endfor %}
</ul>
{% endif %}
{% endwith %}
{% block content %}{% endblock %}
</div>
<script>
// Toggle "Ver más / Ver menos" en resúmenes
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>