Spaces:
Running
Running
File size: 8,797 Bytes
a886463 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 | <!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Resumen de Noticias Españolas</title>
<style>
* {
box-sizing: border-box;
margin: 0;
padding: 0;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
body {
background-color: #f5f5f5;
color: #333;
line-height: 1.6;
}
header {
background-color: #1a365d;
color: white;
padding: 1rem 2rem;
text-align: center;
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
h1 {
margin-bottom: 0.5rem;
}
.controls {
display: flex;
justify-content: center;
gap: 1rem;
padding: 1rem;
background-color: #2c5282;
}
button {
background-color: #4299e1;
color: white;
border: none;
padding: 0.5rem 1rem;
border-radius: 4px;
cursor: pointer;
font-weight: bold;
transition: background-color 0.3s;
}
button:hover {
background-color: #3182ce;
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 1rem;
}
.news-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
gap: 1.5rem;
margin-top: 1rem;
}
.news-card {
background-color: white;
border-radius: 8px;
overflow: hidden;
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
transition: transform 0.3s;
}
.news-card:hover {
transform: translateY(-5px);
}
.news-header {
padding: 1rem;
background-color: #2b6cb0;
color: white;
}
.news-source {
font-size: 0.8rem;
opacity: 0.8;
}
.news-title {
margin: 0.5rem 0;
font-size: 1.1rem;
font-weight: bold;
}
.news-content {
padding: 1rem;
}
.news-summary {
margin-bottom: 1rem;
}
.news-actions {
display: flex;
justify-content: space-between;
padding: 0 1rem 1rem;
}
.read-more {
color: #2b6cb0;
text-decoration: none;
font-weight: bold;
}
.read-more:hover {
text-decoration: underline;
}
.loading {
text-align: center;
padding: 2rem;
font-size: 1.2rem;
color: #666;
}
@media (max-width: 768px) {
.news-grid {
grid-template-columns: 1fr;
}
}
</style>
</head>
<body>
<header>
<h1>Resumen de Noticias Españolas</h1>
<p>Los titulares más importantes de los principales periódicos de España</p>
</header>
<div class="controls">
<button id="refresh-btn">Actualizar Noticias</button>
<button id="read-all-btn">Leer Todas</button>
</div>
<div class="container">
<div id="news-container" class="news-grid">
<div class="loading">Cargando noticias...</div>
</div>
</div>
<script>
// Lista de periódicos españoles importantes
const newspapers = [
{ name: "El País", url: "https://elpais.com" },
{ name: "El Mundo", url: "https://www.elmundo.es" },
{ name: "La Vanguardia", url: "https://www.lavanguardia.com" },
{ name: "ABC", url: "https://www.abc.es" },
{ name: "20 Minutos", url: "https://www.20minutos.es" },
{ name: "El Periódico", url: "https://www.elperiodico.com/es/" },
{ name: "La Razón", url: "https://www.larazon.es" },
{ name: "El Confidencial", url: "https://www.elconfidencial.com" },
{ name: "Público", url: "https://www.publico.es" },
{ name: "El Diario", url: "https://www.eldiario.es" }
];
// Elementos del DOM
const newsContainer = document.getElementById('news-container');
const refreshBtn = document.getElementById('refresh-btn');
const readAllBtn = document.getElementById('read-all-btn');
// Función para generar resúmenes ficticios (en una app real usarías una API)
function generateSummary(title) {
const summaries = [
`Este titular aborda un tema de actualidad que está generando mucha discusión en la sociedad española. ${title} es un asunto que afecta a diversos sectores y que probablemente tendrá repercusiones en los próximos días.`,
`La noticia sobre ${title.toLowerCase()} refleja una situación compleja que requiere atención inmediata. Expertos opinan que se trata de un desarrollo importante que podría marcar un antes y un después en este ámbito.`
];
return summaries;
}
// Función para cargar noticias
function loadNews() {
newsContainer.innerHTML = '<div class="loading">Cargando noticias...</div>';
// Simulación de carga de noticias (en una app real usarías fetch a una API)
setTimeout(() => {
newsContainer.innerHTML = '';
// Generamos noticias ficticias para cada periódico
newspapers.forEach((paper, index) => {
const newsItem = document.createElement('div');
newsItem.className = 'news-card';
// Título ficticio basado en el periódico
const title = `Noticia destacada de ${paper.name} - ${new Date().toLocaleDateString()}`;
const summary = generateSummary(title);
newsItem.innerHTML = `
<div class="news-header">
<div class="news-source">${paper.name}</div>
<h3 class="news-title">${title}</h3>
</div>
<div class="news-content">
<p class="news-summary">${summary[0]}</p>
<p class="news-summary">${summary[1]}</p>
</div>
<div class="news-actions">
<button class="read-castellano" data-id="${index}">Leer en Castellano</button>
<a href="${paper.url}" target="_blank" class="read-more">Leer más</a>
</div>
`;
newsContainer.appendChild(newsItem);
});
// Añadir event listeners a los botones "Leer en Castellano"
document.querySelectorAll('.read-castellano').forEach(btn => {
btn.addEventListener('click', function() {
const newsId = this.getAttribute('data-id');
alert(`Mostrando la noticia de ${newspapers[newsId].name} en castellano. En una aplicación real, aquí se traduciría el contenido.`);
});
});
}, 1000);
}
// Event listeners
refreshBtn.addEventListener('click', loadNews);
readAllBtn.addEventListener('click', () => {
alert("En una aplicación real, aquí se abrirían todas las noticias o se marcarían como leídas.");
});
// Cargar noticias al iniciar
loadNews();
</script>
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=note6/newspapers" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html> |