note6 commited on
Commit
a886463
·
verified ·
1 Parent(s): da5b549

Add 3 files

Browse files
Files changed (3) hide show
  1. README.md +7 -5
  2. index.html +238 -19
  3. prompts.txt +0 -0
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: Newspapers
3
- emoji: 🏆
4
- colorFrom: yellow
5
- colorTo: gray
6
  sdk: static
7
  pinned: false
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
+ title: newspapers
3
+ emoji: 🐳
4
+ colorFrom: gray
5
+ colorTo: pink
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite
10
  ---
11
 
12
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
index.html CHANGED
@@ -1,19 +1,238 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="es">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Resumen de Noticias Españolas</title>
7
+ <style>
8
+ * {
9
+ box-sizing: border-box;
10
+ margin: 0;
11
+ padding: 0;
12
+ font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
13
+ }
14
+
15
+ body {
16
+ background-color: #f5f5f5;
17
+ color: #333;
18
+ line-height: 1.6;
19
+ }
20
+
21
+ header {
22
+ background-color: #1a365d;
23
+ color: white;
24
+ padding: 1rem 2rem;
25
+ text-align: center;
26
+ box-shadow: 0 2px 5px rgba(0,0,0,0.1);
27
+ }
28
+
29
+ h1 {
30
+ margin-bottom: 0.5rem;
31
+ }
32
+
33
+ .controls {
34
+ display: flex;
35
+ justify-content: center;
36
+ gap: 1rem;
37
+ padding: 1rem;
38
+ background-color: #2c5282;
39
+ }
40
+
41
+ button {
42
+ background-color: #4299e1;
43
+ color: white;
44
+ border: none;
45
+ padding: 0.5rem 1rem;
46
+ border-radius: 4px;
47
+ cursor: pointer;
48
+ font-weight: bold;
49
+ transition: background-color 0.3s;
50
+ }
51
+
52
+ button:hover {
53
+ background-color: #3182ce;
54
+ }
55
+
56
+ .container {
57
+ max-width: 1200px;
58
+ margin: 0 auto;
59
+ padding: 1rem;
60
+ }
61
+
62
+ .news-grid {
63
+ display: grid;
64
+ grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
65
+ gap: 1.5rem;
66
+ margin-top: 1rem;
67
+ }
68
+
69
+ .news-card {
70
+ background-color: white;
71
+ border-radius: 8px;
72
+ overflow: hidden;
73
+ box-shadow: 0 2px 5px rgba(0,0,0,0.1);
74
+ transition: transform 0.3s;
75
+ }
76
+
77
+ .news-card:hover {
78
+ transform: translateY(-5px);
79
+ }
80
+
81
+ .news-header {
82
+ padding: 1rem;
83
+ background-color: #2b6cb0;
84
+ color: white;
85
+ }
86
+
87
+ .news-source {
88
+ font-size: 0.8rem;
89
+ opacity: 0.8;
90
+ }
91
+
92
+ .news-title {
93
+ margin: 0.5rem 0;
94
+ font-size: 1.1rem;
95
+ font-weight: bold;
96
+ }
97
+
98
+ .news-content {
99
+ padding: 1rem;
100
+ }
101
+
102
+ .news-summary {
103
+ margin-bottom: 1rem;
104
+ }
105
+
106
+ .news-actions {
107
+ display: flex;
108
+ justify-content: space-between;
109
+ padding: 0 1rem 1rem;
110
+ }
111
+
112
+ .read-more {
113
+ color: #2b6cb0;
114
+ text-decoration: none;
115
+ font-weight: bold;
116
+ }
117
+
118
+ .read-more:hover {
119
+ text-decoration: underline;
120
+ }
121
+
122
+ .loading {
123
+ text-align: center;
124
+ padding: 2rem;
125
+ font-size: 1.2rem;
126
+ color: #666;
127
+ }
128
+
129
+ @media (max-width: 768px) {
130
+ .news-grid {
131
+ grid-template-columns: 1fr;
132
+ }
133
+ }
134
+ </style>
135
+ </head>
136
+ <body>
137
+ <header>
138
+ <h1>Resumen de Noticias Españolas</h1>
139
+ <p>Los titulares más importantes de los principales periódicos de España</p>
140
+ </header>
141
+
142
+ <div class="controls">
143
+ <button id="refresh-btn">Actualizar Noticias</button>
144
+ <button id="read-all-btn">Leer Todas</button>
145
+ </div>
146
+
147
+ <div class="container">
148
+ <div id="news-container" class="news-grid">
149
+ <div class="loading">Cargando noticias...</div>
150
+ </div>
151
+ </div>
152
+
153
+ <script>
154
+ // Lista de periódicos españoles importantes
155
+ const newspapers = [
156
+ { name: "El País", url: "https://elpais.com" },
157
+ { name: "El Mundo", url: "https://www.elmundo.es" },
158
+ { name: "La Vanguardia", url: "https://www.lavanguardia.com" },
159
+ { name: "ABC", url: "https://www.abc.es" },
160
+ { name: "20 Minutos", url: "https://www.20minutos.es" },
161
+ { name: "El Periódico", url: "https://www.elperiodico.com/es/" },
162
+ { name: "La Razón", url: "https://www.larazon.es" },
163
+ { name: "El Confidencial", url: "https://www.elconfidencial.com" },
164
+ { name: "Público", url: "https://www.publico.es" },
165
+ { name: "El Diario", url: "https://www.eldiario.es" }
166
+ ];
167
+
168
+ // Elementos del DOM
169
+ const newsContainer = document.getElementById('news-container');
170
+ const refreshBtn = document.getElementById('refresh-btn');
171
+ const readAllBtn = document.getElementById('read-all-btn');
172
+
173
+ // Función para generar resúmenes ficticios (en una app real usarías una API)
174
+ function generateSummary(title) {
175
+ const summaries = [
176
+ `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.`,
177
+ `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.`
178
+ ];
179
+ return summaries;
180
+ }
181
+
182
+ // Función para cargar noticias
183
+ function loadNews() {
184
+ newsContainer.innerHTML = '<div class="loading">Cargando noticias...</div>';
185
+
186
+ // Simulación de carga de noticias (en una app real usarías fetch a una API)
187
+ setTimeout(() => {
188
+ newsContainer.innerHTML = '';
189
+
190
+ // Generamos noticias ficticias para cada periódico
191
+ newspapers.forEach((paper, index) => {
192
+ const newsItem = document.createElement('div');
193
+ newsItem.className = 'news-card';
194
+
195
+ // Título ficticio basado en el periódico
196
+ const title = `Noticia destacada de ${paper.name} - ${new Date().toLocaleDateString()}`;
197
+ const summary = generateSummary(title);
198
+
199
+ newsItem.innerHTML = `
200
+ <div class="news-header">
201
+ <div class="news-source">${paper.name}</div>
202
+ <h3 class="news-title">${title}</h3>
203
+ </div>
204
+ <div class="news-content">
205
+ <p class="news-summary">${summary[0]}</p>
206
+ <p class="news-summary">${summary[1]}</p>
207
+ </div>
208
+ <div class="news-actions">
209
+ <button class="read-castellano" data-id="${index}">Leer en Castellano</button>
210
+ <a href="${paper.url}" target="_blank" class="read-more">Leer más</a>
211
+ </div>
212
+ `;
213
+
214
+ newsContainer.appendChild(newsItem);
215
+ });
216
+
217
+ // Añadir event listeners a los botones "Leer en Castellano"
218
+ document.querySelectorAll('.read-castellano').forEach(btn => {
219
+ btn.addEventListener('click', function() {
220
+ const newsId = this.getAttribute('data-id');
221
+ alert(`Mostrando la noticia de ${newspapers[newsId].name} en castellano. En una aplicación real, aquí se traduciría el contenido.`);
222
+ });
223
+ });
224
+ }, 1000);
225
+ }
226
+
227
+ // Event listeners
228
+ refreshBtn.addEventListener('click', loadNews);
229
+
230
+ readAllBtn.addEventListener('click', () => {
231
+ alert("En una aplicación real, aquí se abrirían todas las noticias o se marcarían como leídas.");
232
+ });
233
+
234
+ // Cargar noticias al iniciar
235
+ loadNews();
236
+ </script>
237
+ <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>
238
+ </html>
prompts.txt ADDED
File without changes