MarceloSmile commited on
Commit
10a731d
·
verified ·
1 Parent(s): 6933208

Add 2 files

Browse files
Files changed (2) hide show
  1. README.md +7 -5
  2. index.html +486 -19
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: Smyspace
3
- emoji: 🚀
4
- colorFrom: gray
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: smyspace
3
+ emoji: 🐳
4
+ colorFrom: purple
5
+ colorTo: yellow
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,486 @@
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="pt-br">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>GameFeed - Notícias de Jogos em Tempo Real</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
9
+ <style>
10
+ .news-card {
11
+ transition: all 0.3s ease;
12
+ transform-origin: center;
13
+ }
14
+ .news-card:hover {
15
+ transform: translateY(-5px) scale(1.02);
16
+ box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
17
+ }
18
+ .pinned {
19
+ border-left: 4px solid #3b82f6;
20
+ background-color: rgba(59, 130, 246, 0.05);
21
+ }
22
+ .loading-spinner {
23
+ border: 3px solid rgba(255, 255, 255, 0.3);
24
+ border-radius: 50%;
25
+ border-top: 3px solid #3b82f6;
26
+ width: 30px;
27
+ height: 30px;
28
+ animation: spin 1s linear infinite;
29
+ }
30
+ @keyframes spin {
31
+ 0% { transform: rotate(0deg); }
32
+ 100% { transform: rotate(360deg); }
33
+ }
34
+ .category-tag {
35
+ transition: all 0.2s ease;
36
+ }
37
+ .category-tag:hover {
38
+ transform: scale(1.05);
39
+ }
40
+ .search-bar:focus {
41
+ outline: none;
42
+ box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);
43
+ }
44
+ </style>
45
+ </head>
46
+ <body class="bg-gray-100 min-h-screen">
47
+ <!-- Header -->
48
+ <header class="bg-gradient-to-r from-blue-600 to-indigo-800 shadow-lg">
49
+ <div class="container mx-auto px-4 py-6">
50
+ <div class="flex flex-col md:flex-row justify-between items-center">
51
+ <div class="flex items-center mb-4 md:mb-0">
52
+ <i class="fas fa-gamepad text-white text-3xl mr-3"></i>
53
+ <h1 class="text-white text-2xl md:text-3xl font-bold">GameFeed</h1>
54
+ </div>
55
+ <div class="relative w-full md:w-1/3">
56
+ <input type="text" placeholder="Buscar notícias..."
57
+ class="search-bar w-full px-4 py-2 rounded-full bg-blue-500 text-white placeholder-blue-200 focus:bg-blue-400 transition">
58
+ <i class="fas fa-search absolute right-3 top-2.5 text-blue-200"></i>
59
+ </div>
60
+ </div>
61
+ </div>
62
+ </header>
63
+
64
+ <!-- Main Content -->
65
+ <main class="container mx-auto px-4 py-8">
66
+ <!-- Categories -->
67
+ <div class="flex flex-wrap gap-2 mb-8 justify-center">
68
+ <button class="category-tag bg-blue-500 hover:bg-blue-600 text-white px-4 py-1 rounded-full text-sm font-medium">Todos</button>
69
+ <button class="category-tag bg-gray-700 hover:bg-gray-800 text-white px-4 py-1 rounded-full text-sm font-medium">Lançamentos</button>
70
+ <button class="category-tag bg-red-500 hover:bg-red-600 text-white px-4 py-1 rounded-full text-sm font-medium">Promoções</button>
71
+ <button class="category-tag bg-green-500 hover:bg-green-600 text-white px-4 py-1 rounded-full text-sm font-medium">eSports</button>
72
+ <button class="category-tag bg-purple-500 hover:bg-purple-600 text-white px-4 py-1 rounded-full text-sm font-medium">Tecnologia</button>
73
+ <button class="category-tag bg-yellow-500 hover:bg-yellow-600 text-white px-4 py-1 rounded-full text-sm font-medium">Dicas</button>
74
+ </div>
75
+
76
+ <!-- News Grid -->
77
+ <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
78
+ <!-- News Card 1 -->
79
+ <div class="news-card bg-white rounded-lg overflow-hidden shadow-md relative">
80
+ <div class="absolute top-2 right-2">
81
+ <button class="pin-btn p-2 text-gray-400 hover:text-blue-500">
82
+ <i class="far fa-bookmark"></i>
83
+ </button>
84
+ </div>
85
+ <img src="https://images.unsplash.com/photo-1542751371-adc38448a05e?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=800&q=80"
86
+ alt="Novo jogo anunciado" class="w-full h-48 object-cover">
87
+ <div class="p-4">
88
+ <div class="flex items-center mb-2">
89
+ <span class="bg-blue-100 text-blue-800 text-xs px-2 py-1 rounded mr-2">Lançamento</span>
90
+ <span class="text-gray-500 text-xs">há 2 horas</span>
91
+ </div>
92
+ <h3 class="text-xl font-bold mb-2">Novo RPG de mundo aberto promete revolucionar o gênero</h3>
93
+ <p class="text-gray-600 mb-4">A desenvolvedora anunciou hoje seu mais novo projeto, um RPG com gráficos impressionantes e um mundo vasto para explorar.</p>
94
+ <div class="flex justify-between items-center">
95
+ <span class="text-sm text-gray-500">Fonte: IGN Brasil</span>
96
+ <button class="text-blue-500 hover:text-blue-700 font-medium">Ler mais</button>
97
+ </div>
98
+ </div>
99
+ </div>
100
+
101
+ <!-- News Card 2 -->
102
+ <div class="news-card bg-white rounded-lg overflow-hidden shadow-md relative pinned">
103
+ <div class="absolute top-2 right-2">
104
+ <button class="pin-btn p-2 text-blue-500">
105
+ <i class="fas fa-bookmark"></i>
106
+ </button>
107
+ </div>
108
+ <img src="https://images.unsplash.com/photo-1551103782-8ab07afd45c1?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=800&q=80"
109
+ alt="Campeonato de eSports" class="w-full h-48 object-cover">
110
+ <div class="p-4">
111
+ <div class="flex items-center mb-2">
112
+ <span class="bg-green-100 text-green-800 text-xs px-2 py-1 rounded mr-2">eSports</span>
113
+ <span class="text-gray-500 text-xs">há 5 horas</span>
114
+ </div>
115
+ <h3 class="text-xl font-bold mb-2">Time brasileiro vence campeonato mundial de Valorant</h3>
116
+ <p class="text-gray-600 mb-4">Em uma virada espetacular, o time brasileiro conquistou o título mundial contra os favoritos europeus.</p>
117
+ <div class="flex justify-between items-center">
118
+ <span class="text-sm text-gray-500">Fonte: ESPN eSports</span>
119
+ <button class="text-blue-500 hover:text-blue-700 font-medium">Ler mais</button>
120
+ </div>
121
+ </div>
122
+ </div>
123
+
124
+ <!-- News Card 3 -->
125
+ <div class="news-card bg-white rounded-lg overflow-hidden shadow-md relative">
126
+ <div class="absolute top-2 right-2">
127
+ <button class="pin-btn p-2 text-gray-400 hover:text-blue-500">
128
+ <i class="far fa-bookmark"></i>
129
+ </button>
130
+ </div>
131
+ <img src="https://images.unsplash.com/photo-1585771724684-38269d6639fd?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=800&q=80"
132
+ alt="Promoção de jogos" class="w-full h-48 object-cover">
133
+ <div class="p-4">
134
+ <div class="flex items-center mb-2">
135
+ <span class="bg-red-100 text-red-800 text-xs px-2 py-1 rounded mr-2">Promoção</span>
136
+ <span class="text-gray-500 text-xs">há 8 horas</span>
137
+ </div>
138
+ <h3 class="text-xl font-bold mb-2">Steam anuncia mega promoção de verão com descontos de até 90%</h3>
139
+ <p class="text-gray-600 mb-4">A plataforma de jogos digitais começou sua tradicional promoção de verão com milhares de jogos em desconto.</p>
140
+ <div class="flex justify-between items-center">
141
+ <span class="text-sm text-gray-500">Fonte: Steam Oficial</span>
142
+ <button class="text-blue-500 hover:text-blue-700 font-medium">Ler mais</button>
143
+ </div>
144
+ </div>
145
+ </div>
146
+
147
+ <!-- News Card 4 -->
148
+ <div class="news-card bg-white rounded-lg overflow-hidden shadow-md relative">
149
+ <div class="absolute top-2 right-2">
150
+ <button class="pin-btn p-2 text-gray-400 hover:text-blue-500">
151
+ <i class="far fa-bookmark"></i>
152
+ </button>
153
+ </div>
154
+ <img src="https://images.unsplash.com/photo-1598550476439-6847785fcea6?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=800&q=80"
155
+ alt="Novo console" class="w-full h-48 object-cover">
156
+ <div class="p-4">
157
+ <div class="flex items-center mb-2">
158
+ <span class="bg-purple-100 text-purple-800 text-xs px-2 py-1 rounded mr-2">Tecnologia</span>
159
+ <span class="text-gray-500 text-xs">há 1 dia</span>
160
+ </div>
161
+ <h3 class="text-xl font-bold mb-2">Vazamentos sugerem novo console portátil da Sony</h3>
162
+ <p class="text-gray-600 mb-4">Patentes recentes indicam que a Sony pode estar desenvolvendo um sucessor para o PlayStation Vita.</p>
163
+ <div class="flex justify-between items-center">
164
+ <span class="text-sm text-gray-500">Fonte: TechRadar</span>
165
+ <button class="text-blue-500 hover:text-blue-700 font-medium">Ler mais</button>
166
+ </div>
167
+ </div>
168
+ </div>
169
+
170
+ <!-- News Card 5 -->
171
+ <div class="news-card bg-white rounded-lg overflow-hidden shadow-md relative">
172
+ <div class="absolute top-2 right-2">
173
+ <button class="pin-btn p-2 text-gray-400 hover:text-blue-500">
174
+ <i class="far fa-bookmark"></i>
175
+ </button>
176
+ </div>
177
+ <img src="https://images.unsplash.com/photo-1560253023-3ec5d502959f?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=800&q=80"
178
+ alt="Dicas de jogo" class="w-full h-48 object-cover">
179
+ <div class="p-4">
180
+ <div class="flex items-center mb-2">
181
+ <span class="bg-yellow-100 text-yellow-800 text-xs px-2 py-1 rounded mr-2">Dicas</span>
182
+ <span class="text-gray-500 text-xs">há 1 dia</span>
183
+ </div>
184
+ <h3 class="text-xl font-bold mb-2">10 segredos que você não conhecia em Elden Ring</h3>
185
+ <p class="text-gray-600 mb-4">Descubra áreas secretas, armas poderosas e easter eggs que a maioria dos jogadores nunca encontrou.</p>
186
+ <div class="flex justify-between items-center">
187
+ <span class="text-sm text-gray-500">Fonte: GameSpot</span>
188
+ <button class="text-blue-500 hover:text-blue-700 font-medium">Ler mais</button>
189
+ </div>
190
+ </div>
191
+ </div>
192
+
193
+ <!-- News Card 6 -->
194
+ <div class="news-card bg-white rounded-lg overflow-hidden shadow-md relative">
195
+ <div class="absolute top-2 right-2">
196
+ <button class="pin-btn p-2 text-gray-400 hover:text-blue-500">
197
+ <i class="far fa-bookmark"></i>
198
+ </button>
199
+ </div>
200
+ <img src="https://images.unsplash.com/photo-1542751371-adc38448a05e?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=800&q=80"
201
+ alt="Atualização de jogo" class="w-full h-48 object-cover">
202
+ <div class="p-4">
203
+ <div class="flex items-center mb-2">
204
+ <span class="bg-blue-100 text-blue-800 text-xs px-2 py-1 rounded mr-2">Atualização</span>
205
+ <span class="text-gray-500 text-xs">há 2 dias</span>
206
+ </div>
207
+ <h3 class="text-xl font-bold mb-2">Cyberpunk 2077 recebe grande atualização com novas missões</h3>
208
+ <p class="text-gray-600 mb-4">A CD Projekt Red lançou a tão esperada atualização 2.0, trazendo melhorias significativas e novo conteúdo.</p>
209
+ <div class="flex justify-between items-center">
210
+ <span class="text-sm text-gray-500">Fonte: Eurogamer</span>
211
+ <button class="text-blue-500 hover:text-blue-700 font-medium">Ler mais</button>
212
+ </div>
213
+ </div>
214
+ </div>
215
+ </div>
216
+
217
+ <!-- Loading More -->
218
+ <div class="mt-10 text-center">
219
+ <button id="loadMore" class="bg-blue-500 hover:bg-blue-600 text-white px-6 py-2 rounded-full font-medium flex items-center mx-auto">
220
+ <span id="loadText">Carregar mais notícias</span>
221
+ <div id="loadSpinner" class="loading-spinner ml-2 hidden"></div>
222
+ </button>
223
+ </div>
224
+ </main>
225
+
226
+ <!-- Pinned News Modal -->
227
+ <div id="pinnedModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
228
+ <div class="bg-white rounded-lg w-11/12 md:w-3/4 lg:w-1/2 max-h-[90vh] overflow-y-auto">
229
+ <div class="p-4 border-b border-gray-200 flex justify-between items-center">
230
+ <h2 class="text-xl font-bold">Notícias Favoritas</h2>
231
+ <button id="closePinned" class="text-gray-500 hover:text-gray-700">
232
+ <i class="fas fa-times"></i>
233
+ </button>
234
+ </div>
235
+ <div id="pinnedContainer" class="p-4">
236
+ <!-- Pinned news will be added here dynamically -->
237
+ <div class="p-4 bg-blue-50 rounded-lg mb-4">
238
+ <div class="flex items-center mb-2">
239
+ <span class="bg-green-100 text-green-800 text-xs px-2 py-1 rounded mr-2">eSports</span>
240
+ <span class="text-gray-500 text-xs">há 5 horas</span>
241
+ </div>
242
+ <h3 class="text-lg font-bold mb-2">Time brasileiro vence campeonato mundial de Valorant</h3>
243
+ <p class="text-gray-600 mb-2">Em uma virada espetacular, o time brasileiro conquistou o título mundial contra os favoritos europeus.</p>
244
+ <div class="flex justify-between items-center">
245
+ <span class="text-sm text-gray-500">Fonte: ESPN eSports</span>
246
+ <button class="text-blue-500 hover:text-blue-700 text-sm font-medium">Ler mais</button>
247
+ </div>
248
+ </div>
249
+ </div>
250
+ </div>
251
+ </div>
252
+
253
+ <!-- Floating Action Button -->
254
+ <button id="pinnedFab" class="fixed bottom-6 right-6 bg-blue-500 hover:bg-blue-600 text-white w-12 h-12 rounded-full shadow-lg flex items-center justify-center">
255
+ <i class="fas fa-bookmark text-xl"></i>
256
+ <span id="pinnedCount" class="absolute -top-1 -right-1 bg-red-500 text-white text-xs rounded-full w-5 h-5 flex items-center justify-center">1</span>
257
+ </button>
258
+
259
+ <!-- Footer -->
260
+ <footer class="bg-gray-800 text-white py-8 mt-12">
261
+ <div class="container mx-auto px-4">
262
+ <div class="flex flex-col md:flex-row justify-between">
263
+ <div class="mb-6 md:mb-0">
264
+ <h3 class="text-xl font-bold mb-4">GameFeed</h3>
265
+ <p class="text-gray-400">O melhor agregador de notícias de jogos em tempo real.</p>
266
+ </div>
267
+ <div class="grid grid-cols-2 md:grid-cols-3 gap-8">
268
+ <div>
269
+ <h4 class="text-lg font-semibold mb-3">Links</h4>
270
+ <ul class="space-y-2">
271
+ <li><a href="#" class="text-gray-400 hover:text-white">Início</a></li>
272
+ <li><a href="#" class="text-gray-400 hover:text-white">Sobre</a></li>
273
+ <li><a href="#" class="text-gray-400 hover:text-white">Contato</a></li>
274
+ </ul>
275
+ </div>
276
+ <div>
277
+ <h4 class="text-lg font-semibold mb-3">Redes Sociais</h4>
278
+ <div class="flex space-x-4">
279
+ <a href="#" class="text-gray-400 hover:text-white"><i class="fab fa-twitter"></i></a>
280
+ <a href="#" class="text-gray-400 hover:text-white"><i class="fab fa-facebook"></i></a>
281
+ <a href="#" class="text-gray-400 hover:text-white"><i class="fab fa-instagram"></i></a>
282
+ <a href="#" class="text-gray-400 hover:text-white"><i class="fab fa-discord"></i></a>
283
+ </div>
284
+ </div>
285
+ <div>
286
+ <h4 class="text-lg font-semibold mb-3">Newsletter</h4>
287
+ <div class="flex">
288
+ <input type="email" placeholder="Seu email" class="px-3 py-2 bg-gray-700 text-white rounded-l focus:outline-none">
289
+ <button class="bg-blue-500 hover:bg-blue-600 px-3 py-2 rounded-r">
290
+ <i class="fas fa-paper-plane"></i>
291
+ </button>
292
+ </div>
293
+ </div>
294
+ </div>
295
+ </div>
296
+ <div class="border-t border-gray-700 mt-8 pt-6 text-center text-gray-400">
297
+ <p>&copy; 2023 GameFeed. Todos os direitos reservados.</p>
298
+ </div>
299
+ </div>
300
+ </footer>
301
+
302
+ <script>
303
+ document.addEventListener('DOMContentLoaded', function() {
304
+ // Pin/Unpin functionality
305
+ const pinButtons = document.querySelectorAll('.pin-btn');
306
+ const pinnedFab = document.getElementById('pinnedFab');
307
+ const pinnedCount = document.getElementById('pinnedCount');
308
+ const pinnedModal = document.getElementById('pinnedModal');
309
+ const closePinned = document.getElementById('closePinned');
310
+ const pinnedContainer = document.getElementById('pinnedContainer');
311
+ const loadMoreBtn = document.getElementById('loadMore');
312
+ const loadText = document.getElementById('loadText');
313
+ const loadSpinner = document.getElementById('loadSpinner');
314
+
315
+ let pinnedNews = [
316
+ {
317
+ category: 'eSports',
318
+ time: 'há 5 horas',
319
+ title: 'Time brasileiro vence campeonato mundial de Valorant',
320
+ content: 'Em uma virada espetacular, o time brasileiro conquistou o título mundial contra os favoritos europeus.',
321
+ source: 'Fonte: ESPN eSports'
322
+ }
323
+ ];
324
+
325
+ pinButtons.forEach(button => {
326
+ button.addEventListener('click', function() {
327
+ const card = this.closest('.news-card');
328
+ const isPinned = card.classList.contains('pinned');
329
+
330
+ if (isPinned) {
331
+ // Unpin
332
+ card.classList.remove('pinned');
333
+ this.innerHTML = '<i class="far fa-bookmark"></i>';
334
+ this.classList.remove('text-blue-500');
335
+ this.classList.add('text-gray-400', 'hover:text-blue-500');
336
+
337
+ // Remove from pinned news
338
+ const title = card.querySelector('h3').textContent;
339
+ pinnedNews = pinnedNews.filter(news => news.title !== title);
340
+ } else {
341
+ // Pin
342
+ card.classList.add('pinned');
343
+ this.innerHTML = '<i class="fas fa-bookmark"></i>';
344
+ this.classList.remove('text-gray-400', 'hover:text-blue-500');
345
+ this.classList.add('text-blue-500');
346
+
347
+ // Add to pinned news
348
+ const newsItem = {
349
+ category: card.querySelector('span:first-child').textContent,
350
+ time: card.querySelector('span:nth-child(2)').textContent,
351
+ title: card.querySelector('h3').textContent,
352
+ content: card.querySelector('p').textContent,
353
+ source: card.querySelector('div:last-child span').textContent
354
+ };
355
+ pinnedNews.push(newsItem);
356
+ }
357
+
358
+ // Update pinned count
359
+ pinnedCount.textContent = pinnedNews.length;
360
+
361
+ // Show/hide FAB
362
+ if (pinnedNews.length > 0) {
363
+ pinnedFab.classList.remove('hidden');
364
+ } else {
365
+ pinnedFab.classList.add('hidden');
366
+ }
367
+ });
368
+ });
369
+
370
+ // Show pinned modal
371
+ pinnedFab.addEventListener('click', function() {
372
+ // Clear existing pinned news
373
+ pinnedContainer.innerHTML = '';
374
+
375
+ // Add current pinned news
376
+ pinnedNews.forEach(news => {
377
+ const newsElement = document.createElement('div');
378
+ newsElement.className = 'p-4 bg-blue-50 rounded-lg mb-4';
379
+ newsElement.innerHTML = `
380
+ <div class="flex items-center mb-2">
381
+ <span class="bg-green-100 text-green-800 text-xs px-2 py-1 rounded mr-2">${news.category}</span>
382
+ <span class="text-gray-500 text-xs">${news.time}</span>
383
+ </div>
384
+ <h3 class="text-lg font-bold mb-2">${news.title}</h3>
385
+ <p class="text-gray-600 mb-2">${news.content}</p>
386
+ <div class="flex justify-between items-center">
387
+ <span class="text-sm text-gray-500">${news.source}</span>
388
+ <button class="text-blue-500 hover:text-blue-700 text-sm font-medium">Ler mais</button>
389
+ </div>
390
+ `;
391
+ pinnedContainer.appendChild(newsElement);
392
+ });
393
+
394
+ pinnedModal.classList.remove('hidden');
395
+ });
396
+
397
+ // Close pinned modal
398
+ closePinned.addEventListener('click', function() {
399
+ pinnedModal.classList.add('hidden');
400
+ });
401
+
402
+ // Load more news
403
+ loadMoreBtn.addEventListener('click', function() {
404
+ loadText.textContent = 'Carregando...';
405
+ loadSpinner.classList.remove('hidden');
406
+
407
+ // Simulate API call
408
+ setTimeout(() => {
409
+ // In a real app, this would be an API call to get more news
410
+ loadText.textContent = 'Carregar mais notícias';
411
+ loadSpinner.classList.add('hidden');
412
+
413
+ // Show a toast notification
414
+ showToast('Mais notícias carregadas com sucesso!');
415
+ }, 1500);
416
+ });
417
+
418
+ // Search functionality
419
+ const searchBar = document.querySelector('.search-bar');
420
+ searchBar.addEventListener('keypress', function(e) {
421
+ if (e.key === 'Enter') {
422
+ const query = this.value.trim();
423
+ if (query) {
424
+ // In a real app, this would trigger a search
425
+ showToast(`Buscando por: ${query}`);
426
+ }
427
+ }
428
+ });
429
+
430
+ // Category filter
431
+ const categoryTags = document.querySelectorAll('.category-tag');
432
+ categoryTags.forEach(tag => {
433
+ tag.addEventListener('click', function() {
434
+ // Remove active class from all tags
435
+ categoryTags.forEach(t => t.classList.remove('ring-2', 'ring-offset-2', 'ring-blue-500'));
436
+
437
+ // Add active class to clicked tag
438
+ this.classList.add('ring-2', 'ring-offset-2', 'ring-blue-500');
439
+
440
+ // In a real app, this would filter the news
441
+ const category = this.textContent;
442
+ showToast(`Filtrando por: ${category}`);
443
+ });
444
+ });
445
+
446
+ // Helper function to show toast notifications
447
+ function showToast(message) {
448
+ const toast = document.createElement('div');
449
+ toast.className = 'fixed bottom-4 left-1/2 transform -translate-x-1/2 bg-gray-800 text-white px-4 py-2 rounded-md shadow-lg animate-fade-in';
450
+ toast.textContent = message;
451
+
452
+ document.body.appendChild(toast);
453
+
454
+ setTimeout(() => {
455
+ toast.classList.remove('animate-fade-in');
456
+ toast.classList.add('animate-fade-out');
457
+
458
+ setTimeout(() => {
459
+ toast.remove();
460
+ }, 300);
461
+ }, 3000);
462
+ }
463
+
464
+ // Add animation styles dynamically
465
+ const style = document.createElement('style');
466
+ style.textContent = `
467
+ @keyframes fade-in {
468
+ from { opacity: 0; transform: translateY(10px) translateX(-50%); }
469
+ to { opacity: 1; transform: translateY(0) translateX(-50%); }
470
+ }
471
+ @keyframes fade-out {
472
+ from { opacity: 1; transform: translateY(0) translateX(-50%); }
473
+ to { opacity: 0; transform: translateY(-10px) translateX(-50%); }
474
+ }
475
+ .animate-fade-in {
476
+ animation: fade-in 0.3s ease-out forwards;
477
+ }
478
+ .animate-fade-out {
479
+ animation: fade-out 0.3s ease-out forwards;
480
+ }
481
+ `;
482
+ document.head.appendChild(style);
483
+ });
484
+ </script>
485
+ <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=MarceloSmile/smyspace" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
486
+ </html>