Rwhehhehe commited on
Commit
d90a7de
·
verified ·
1 Parent(s): a33e9cc

Add 2 files

Browse files
Files changed (2) hide show
  1. index.html +528 -36
  2. prompts.txt +1 -0
index.html CHANGED
@@ -1,41 +1,533 @@
1
  <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>My app</title>
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
- <meta charset="utf-8">
7
- <style>
8
- body {
9
- display: flex;
10
- justify-content: center;
11
- align-items: center;
12
- overflow: hidden;
13
- height: 100dvh;
14
- font-family: "Arial", sans-serif;
15
- text-align: center;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  }
17
- .arrow {
18
- position: absolute;
19
- bottom: 32px;
20
- left: 0px;
21
- width: 100px;
22
- transform: rotate(30deg);
 
23
  }
24
- h1 {
25
- font-size: 50px;
 
 
 
 
 
 
 
 
26
  }
27
- h1 span {
28
- color: #acacac;
29
- font-size: 32px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
  }
31
- </style>
32
- </head>
33
- <body>
34
- <h1>
35
- <span>I'm ready to work,</span><br />
36
- Ask me anything.
37
- </h1>
38
- <img src="https://enzostvs-deepsite.hf.space/arrow.svg" class="arrow" />
39
- <script></script>
40
- </body
41
- </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>Jornal Oliveira</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
+ @import url('https://fonts.googleapis.com/css2?family=Merriweather:wght@400;700&family=Open+Sans:wght@400;600;700&display=swap');
11
+
12
+ :root {
13
+ --primary: #4E653D;
14
+ --primary-light: #697E50;
15
+ --secondary: #A4B17B;
16
+ --background: #F5F7F0;
17
+ --text-dark: #20331B;
18
+ --text-light: #FFFFFF;
19
+ }
20
+
21
+ body {
22
+ font-family: 'Open Sans', sans-serif;
23
+ background-color: var(--background);
24
+ color: var(--text-dark);
25
+ }
26
+
27
+ .title-font {
28
+ font-family: 'Merriweather', serif;
29
+ }
30
+
31
+ .card-shadow {
32
+ box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
33
+ }
34
+
35
+ .tab-animation {
36
+ transition: all 0.3s ease;
37
+ }
38
+
39
+ .fade-in {
40
+ animation: fadeIn 0.5s ease-in;
41
+ }
42
+
43
+ @keyframes fadeIn {
44
+ from { opacity: 0; }
45
+ to { opacity: 1; }
46
+ }
47
+
48
+ /* Custom scrollbar */
49
+ ::-webkit-scrollbar {
50
+ width: 8px;
51
+ }
52
+ ::-webkit-scrollbar-track {
53
+ background: #f1f1f1;
54
+ }
55
+ ::-webkit-scrollbar-thumb {
56
+ background: var(--primary-light);
57
+ border-radius: 4px;
58
+ }
59
+ ::-webkit-scrollbar-thumb:hover {
60
+ background: var(--primary);
61
+ }
62
+ </style>
63
+ </head>
64
+ <body class="min-h-screen flex flex-col">
65
+ <!-- Header -->
66
+ <header class="bg-green-900 text-white py-4 px-6 shadow-md">
67
+ <div class="container mx-auto">
68
+ <h1 class="title-font text-3xl md:text-4xl font-bold mb-1">Jornal Oliveira</h1>
69
+ <p class="text-green-200 italic">Feito de alunos para alunos</p>
70
+ </div>
71
+ </header>
72
+
73
+ <!-- Navigation -->
74
+ <nav class="bg-green-800 text-white py-3 px-6 sticky top-0 z-10 shadow-sm">
75
+ <div class="container mx-auto flex flex-wrap justify-center gap-2">
76
+ <button data-tab="home" class="tab-animation px-4 py-2 rounded-md bg-green-700 hover:bg-green-600 font-medium flex items-center gap-2">
77
+ <i class="fas fa-home"></i> Início
78
+ </button>
79
+ <button data-tab="enviar" class="tab-animation px-4 py-2 rounded-md bg-green-700 hover:bg-green-600 font-medium flex items-center gap-2 restricted hidden">
80
+ <i class="fas fa-paper-plane"></i> Enviar
81
+ </button>
82
+ <button data-tab="avaliar" class="tab-animation px-4 py-2 rounded-md bg-green-700 hover:bg-green-600 font-medium flex items-center gap-2">
83
+ <i class="fas fa-star"></i> Avaliar
84
+ </button>
85
+ <button data-tab="sugestoes" class="tab-animation px-4 py-2 rounded-md bg-green-700 hover:bg-green-600 font-medium flex items-center gap-2">
86
+ <i class="fas fa-lightbulb"></i> Sugestões
87
+ </button>
88
+ <button id="loginBtn" class="tab-animation px-4 py-2 rounded-md bg-green-600 hover:bg-green-500 font-medium flex items-center gap-2">
89
+ <i class="fas fa-sign-in-alt"></i> Login
90
+ </button>
91
+ </div>
92
+ </nav>
93
+
94
+ <!-- Main Content -->
95
+ <main class="flex-grow container mx-auto py-6 px-4">
96
+ <!-- Home Section -->
97
+ <section id="home" class="fade-in">
98
+ <div class="max-w-4xl mx-auto">
99
+ <h2 class="title-font text-2xl md:text-3xl font-bold mb-6 text-green-900 border-b pb-2">Últimas Matérias</h2>
100
+
101
+ <div id="articlesContainer" class="grid md:grid-cols-2 gap-6">
102
+ <!-- Articles will be loaded here -->
103
+ <div class="text-center py-10">
104
+ <i class="fas fa-newspaper text-5xl text-green-700 mb-4"></i>
105
+ <p class="text-lg">Carregando matérias...</p>
106
+ </div>
107
+ </div>
108
+ </div>
109
+ </section>
110
+
111
+ <!-- Submit Article Section -->
112
+ <section id="enviar" class="hidden max-w-2xl mx-auto">
113
+ <div class="bg-white rounded-lg p-6 card-shadow">
114
+ <h2 class="title-font text-2xl font-bold mb-6 text-green-900 flex items-center gap-3">
115
+ <i class="fas fa-pen-fancy"></i> Enviar Matéria
116
+ </h2>
117
+
118
+ <div class="space-y-4">
119
+ <div>
120
+ <label for="artTitle" class="block text-sm font-medium text-gray-700 mb-1">Título</label>
121
+ <input id="artTitle" type="text" placeholder="Título da matéria"
122
+ class="w-full px-4 py-2 border border-gray-300 rounded-md focus:ring-2 focus:ring-green-600 focus:border-green-600">
123
+ </div>
124
+
125
+ <div>
126
+ <label for="artAuthor" class="block text-sm font-medium text-gray-700 mb-1">Autor</label>
127
+ <input id="artAuthor" type="text" placeholder="Seu nome"
128
+ class="w-full px-4 py-2 border border-gray-300 rounded-md focus:ring-2 focus:ring-green-600 focus:border-green-600">
129
+ </div>
130
+
131
+ <div>
132
+ <label for="artDate" class="block text-sm font-medium text-gray-700 mb-1">Data</label>
133
+ <input id="artDate" type="date"
134
+ class="w-full px-4 py-2 border border-gray-300 rounded-md focus:ring-2 focus:ring-green-600 focus:border-green-600">
135
+ </div>
136
+
137
+ <div>
138
+ <label for="artCat" class="block text-sm font-medium text-gray-700 mb-1">Categoria</label>
139
+ <select id="artCat"
140
+ class="w-full px-4 py-2 border border-gray-300 rounded-md focus:ring-2 focus:ring-green-600 focus:border-green-600">
141
+ <option value="">Selecione uma categoria</option>
142
+ <option value="Cultura">Cultura</option>
143
+ <option value="Esportes">Esportes</option>
144
+ <option value="Opinião">Opinião</option>
145
+ <option value="Notícias">Notícias</option>
146
+ <option value="Entrevista">Entrevista</option>
147
+ </select>
148
+ </div>
149
+
150
+ <div>
151
+ <label for="artContent" class="block text-sm font-medium text-gray-700 mb-1">Conteúdo</label>
152
+ <textarea id="artContent" rows="8" placeholder="Escreva sua matéria aqui..."
153
+ class="w-full px-4 py-2 border border-gray-300 rounded-md focus:ring-2 focus:ring-green-600 focus:border-green-600"></textarea>
154
+ </div>
155
+
156
+ <button id="btnSubmit"
157
+ class="w-full bg-green-700 hover:bg-green-600 text-white font-bold py-3 px-4 rounded-md transition duration-300 flex items-center justify-center gap-2">
158
+ <i class="fas fa-paper-plane"></i> Enviar Matéria
159
+ </button>
160
+ </div>
161
+ </div>
162
+ </section>
163
+
164
+ <!-- Evaluate Section -->
165
+ <section id="avaliar" class="hidden max-w-2xl mx-auto">
166
+ <div class="bg-white rounded-lg p-6 card-shadow">
167
+ <h2 class="title-font text-2xl font-bold mb-6 text-green-900 flex items-center gap-3">
168
+ <i class="fas fa-star-half-alt"></i> Avalie o Jornal
169
+ </h2>
170
+
171
+ <div class="space-y-4">
172
+ <div>
173
+ <label class="block text-sm font-medium text-gray-700 mb-2">Sua avaliação</label>
174
+ <div class="flex justify-center space-x-2 mb-4">
175
+ <i class="far fa-star text-3xl cursor-pointer text-yellow-400 hover:text-yellow-500 rating-star" data-value="1"></i>
176
+ <i class="far fa-star text-3xl cursor-pointer text-yellow-400 hover:text-yellow-500 rating-star" data-value="2"></i>
177
+ <i class="far fa-star text-3xl cursor-pointer text-yellow-400 hover:text-yellow-500 rating-star" data-value="3"></i>
178
+ <i class="far fa-star text-3xl cursor-pointer text-yellow-400 hover:text-yellow-500 rating-star" data-value="4"></i>
179
+ <i class="far fa-star text-3xl cursor-pointer text-yellow-400 hover:text-yellow-500 rating-star" data-value="5"></i>
180
+ </div>
181
+ </div>
182
+
183
+ <div>
184
+ <label for="evalComment" class="block text-sm font-medium text-gray-700 mb-1">Comentário (opcional)</label>
185
+ <textarea id="evalComment" rows="4" placeholder="O que você achou do jornal?"
186
+ class="w-full px-4 py-2 border border-gray-300 rounded-md focus:ring-2 focus:ring-green-600 focus:border-green-600"></textarea>
187
+ </div>
188
+
189
+ <button id="btnEval"
190
+ class="w-full bg-green-700 hover:bg-green-600 text-white font-bold py-3 px-4 rounded-md transition duration-300 flex items-center justify-center gap-2">
191
+ <i class="fas fa-check"></i> Enviar Avaliação
192
+ </button>
193
+ </div>
194
+ </div>
195
+ </section>
196
+
197
+ <!-- Suggestions Section -->
198
+ <section id="sugestoes" class="hidden max-w-2xl mx-auto">
199
+ <div class="bg-white rounded-lg p-6 card-shadow">
200
+ <h2 class="title-font text-2xl font-bold mb-6 text-green-900 flex items-center gap-3">
201
+ <i class="fas fa-lightbulb"></i> Envie uma Sugestão
202
+ </h2>
203
+
204
+ <div class="space-y-4">
205
+ <div>
206
+ <label for="suggestText" class="block text-sm font-medium text-gray-700 mb-1">Sua sugestão</label>
207
+ <textarea id="suggestText" rows="5" placeholder="O que podemos melhorar?"
208
+ class="w-full px-4 py-2 border border-gray-300 rounded-md focus:ring-2 focus:ring-green-600 focus:border-green-600"></textarea>
209
+ </div>
210
+
211
+ <button id="btnSuggest"
212
+ class="w-full bg-green-700 hover:bg-green-600 text-white font-bold py-3 px-4 rounded-md transition duration-300 flex items-center justify-center gap-2">
213
+ <i class="fas fa-paper-plane"></i> Enviar Sugestão
214
+ </button>
215
+ </div>
216
+ </div>
217
+ </section>
218
+ </main>
219
+
220
+ <!-- Login Modal -->
221
+ <div id="loginModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
222
+ <div class="bg-white rounded-lg p-6 w-full max-w-md mx-4 card-shadow">
223
+ <div class="flex justify-between items-center mb-4">
224
+ <h3 class="title-font text-xl font-bold text-green-900">
225
+ <i class="fas fa-sign-in-alt mr-2"></i> Login de Editor
226
+ </h3>
227
+ <button id="closeLoginModal" class="text-gray-500 hover:text-gray-700">
228
+ <i class="fas fa-times"></i>
229
+ </button>
230
+ </div>
231
+
232
+ <div class="space-y-4">
233
+ <div>
234
+ <label for="loginName" class="block text-sm font-medium text-gray-700 mb-1">Nome</label>
235
+ <input id="loginName" type="text" placeholder="Seu nome"
236
+ class="w-full px-4 py-2 border border-gray-300 rounded-md focus:ring-2 focus:ring-green-600 focus:border-green-600">
237
+ </div>
238
+
239
+ <div>
240
+ <label for="loginPass" class="block text-sm font-medium text-gray-700 mb-1">Senha</label>
241
+ <input id="loginPass" type="password" placeholder="Sua senha"
242
+ class="w-full px-4 py-2 border border-gray-300 rounded-md focus:ring-2 focus:ring-green-600 focus:border-green-600">
243
+ </div>
244
+
245
+ <button id="btnLogin"
246
+ class="w-full bg-green-700 hover:bg-green-600 text-white font-bold py-2 px-4 rounded-md transition duration-300">
247
+ Entrar
248
+ </button>
249
+
250
+ <p class="text-sm text-gray-600 text-center">
251
+ Senha padrão: <span class="font-semibold">jornal Oliveira</span>
252
+ </p>
253
+ </div>
254
+ </div>
255
+ </div>
256
+
257
+ <!-- Footer -->
258
+ <footer class="bg-green-900 text-white py-4 px-6">
259
+ <div class="container mx-auto text-center">
260
+ <p class="text-green-200">Jornal Oliveira &copy; <span id="currentYear"></span> - Todos os direitos reservados</p>
261
+ <div class="flex justify-center space-x-4 mt-2">
262
+ <a href="#" class="text-green-200 hover:text-white"><i class="fab fa-facebook"></i></a>
263
+ <a href="#" class="text-green-200 hover:text-white"><i class="fab fa-instagram"></i></a>
264
+ <a href="#" class="text-green-200 hover:text-white"><i class="fab fa-twitter"></i></a>
265
+ </div>
266
+ </div>
267
+ </footer>
268
+
269
+ <script>
270
+ // Initialize data
271
+ let authUsers = JSON.parse(localStorage.getItem('jo_users')) || [
272
+ { name: 'Mikael Silva', pass: 'Editor chefe 1' },
273
+ { name: 'Lorena Rangel', pass: 'Editor chefe 2' }
274
+ ];
275
+ localStorage.setItem('jo_users', JSON.stringify(authUsers));
276
+
277
+ let isLogged = false;
278
+ let currentRating = 0;
279
+
280
+ // Set current year in footer
281
+ document.getElementById('currentYear').textContent = new Date().getFullYear();
282
+
283
+ // Tab switching
284
+ document.querySelectorAll('[data-tab]').forEach(tab => {
285
+ tab.addEventListener('click', () => {
286
+ const tabId = tab.getAttribute('data-tab');
287
+
288
+ // Hide all sections
289
+ document.querySelectorAll('main > section').forEach(section => {
290
+ section.classList.add('hidden');
291
+ });
292
+
293
+ // Show selected section
294
+ document.getElementById(tabId).classList.remove('hidden');
295
+ document.getElementById(tabId).classList.add('fade-in');
296
+
297
+ // Update active tab styling
298
+ document.querySelectorAll('[data-tab]').forEach(t => {
299
+ t.classList.remove('bg-green-600');
300
+ t.classList.add('bg-green-700');
301
+ });
302
+ tab.classList.remove('bg-green-700');
303
+ tab.classList.add('bg-green-600');
304
+
305
+ // Load articles if home tab
306
+ if (tabId === 'home') {
307
+ loadArticles();
308
+ }
309
+ });
310
+ });
311
+
312
+ // Login modal
313
+ document.getElementById('loginBtn').addEventListener('click', () => {
314
+ document.getElementById('loginModal').classList.remove('hidden');
315
+ });
316
+
317
+ document.getElementById('closeLoginModal').addEventListener('click', () => {
318
+ document.getElementById('loginModal').classList.add('hidden');
319
+ });
320
+
321
+ // Login functionality
322
+ document.getElementById('btnLogin').addEventListener('click', () => {
323
+ const name = document.getElementById('loginName').value.trim();
324
+ const pass = document.getElementById('loginPass').value.trim();
325
+
326
+ const user = authUsers.find(u => u.name === name && u.pass === pass);
327
+
328
+ if (user || pass === 'jornal Oliveira') {
329
+ showToast('Login bem-sucedido!', 'success');
330
+ isLogged = true;
331
+ document.getElementById('loginModal').classList.add('hidden');
332
+
333
+ // Show restricted tabs
334
+ document.querySelectorAll('.restricted').forEach(tab => {
335
+ tab.classList.remove('hidden');
336
+ });
337
+
338
+ // Clear login fields
339
+ document.getElementById('loginName').value = '';
340
+ document.getElementById('loginPass').value = '';
341
+ } else {
342
+ showToast('Nome ou senha incorretos.', 'error');
343
  }
344
+ });
345
+
346
+ // Submit article
347
+ document.getElementById('btnSubmit').addEventListener('click', () => {
348
+ if (!isLogged) {
349
+ showToast('Você precisa estar logado para enviar uma matéria!', 'error');
350
+ return;
351
  }
352
+
353
+ const title = document.getElementById('artTitle').value.trim();
354
+ const author = document.getElementById('artAuthor').value.trim();
355
+ const date = document.getElementById('artDate').value;
356
+ const category = document.getElementById('artCat').value;
357
+ const content = document.getElementById('artContent').value.trim();
358
+
359
+ if (!title || !author || !date || !category || !content) {
360
+ showToast('Preencha todos os campos!', 'error');
361
+ return;
362
  }
363
+
364
+ let pending = JSON.parse(localStorage.getItem('jo_pending')) || [];
365
+ pending.push({
366
+ title,
367
+ author,
368
+ date: formatDate(date),
369
+ category,
370
+ content,
371
+ approved: false
372
+ });
373
+ localStorage.setItem('jo_pending', JSON.stringify(pending));
374
+
375
+ showToast('Matéria enviada para aprovação!', 'success');
376
+
377
+ // Clear form
378
+ document.getElementById('artTitle').value = '';
379
+ document.getElementById('artAuthor').value = '';
380
+ document.getElementById('artDate').value = '';
381
+ document.getElementById('artCat').value = '';
382
+ document.getElementById('artContent').value = '';
383
+ });
384
+
385
+ // Rating stars
386
+ document.querySelectorAll('.rating-star').forEach(star => {
387
+ star.addEventListener('click', () => {
388
+ const value = parseInt(star.getAttribute('data-value'));
389
+ currentRating = value;
390
+
391
+ document.querySelectorAll('.rating-star').forEach(s => {
392
+ if (parseInt(s.getAttribute('data-value')) <= value) {
393
+ s.classList.remove('far');
394
+ s.classList.add('fas');
395
+ } else {
396
+ s.classList.remove('fas');
397
+ s.classList.add('far');
398
+ }
399
+ });
400
+ });
401
+ });
402
+
403
+ // Submit evaluation
404
+ document.getElementById('btnEval').addEventListener('click', () => {
405
+ const comment = document.getElementById('evalComment').value.trim();
406
+
407
+ if (currentRating === 0) {
408
+ showToast('Por favor, selecione uma avaliação!', 'error');
409
+ return;
410
  }
411
+
412
+ let evaluations = JSON.parse(localStorage.getItem('jo_evaluations')) || [];
413
+ evaluations.push({
414
+ rating: currentRating,
415
+ comment,
416
+ date: new Date().toISOString()
417
+ });
418
+ localStorage.setItem('jo_evaluations', JSON.stringify(evaluations));
419
+
420
+ showToast('Obrigado pela sua avaliação!', 'success');
421
+
422
+ // Reset form
423
+ document.getElementById('evalComment').value = '';
424
+ document.querySelectorAll('.rating-star').forEach(s => {
425
+ s.classList.remove('fas');
426
+ s.classList.add('far');
427
+ });
428
+ currentRating = 0;
429
+ });
430
+
431
+ // Submit suggestion
432
+ document.getElementById('btnSuggest').addEventListener('click', () => {
433
+ const suggestion = document.getElementById('suggestText').value.trim();
434
+
435
+ if (!suggestion) {
436
+ showToast('Por favor, escreva sua sugestão!', 'error');
437
+ return;
438
+ }
439
+
440
+ let suggestions = JSON.parse(localStorage.getItem('jo_suggestions')) || [];
441
+ suggestions.push({
442
+ text: suggestion,
443
+ date: new Date().toISOString()
444
+ });
445
+ localStorage.setItem('jo_suggestions', JSON.stringify(suggestions));
446
+
447
+ showToast('Sugestão enviada com sucesso!', 'success');
448
+ document.getElementById('suggestText').value = '';
449
+ });
450
+
451
+ // Load articles for home page
452
+ function loadArticles() {
453
+ const articlesContainer = document.getElementById('articlesContainer');
454
+ articlesContainer.innerHTML = '<div class="text-center py-10"><i class="fas fa-spinner fa-spin text-5xl text-green-700 mb-4"></i><p class="text-lg">Carregando matérias...</p></div>';
455
+
456
+ // Simulate loading
457
+ setTimeout(() => {
458
+ const approvedArticles = JSON.parse(localStorage.getItem('jo_pending')) || [];
459
+
460
+ if (approvedArticles.length === 0) {
461
+ articlesContainer.innerHTML = `
462
+ <div class="col-span-full text-center py-10">
463
+ <i class="fas fa-newspaper text-5xl text-green-700 mb-4"></i>
464
+ <p class="text-lg">Nenhuma matéria publicada ainda.</p>
465
+ <p class="text-gray-600 mt-2">Seja o primeiro a contribuir!</p>
466
+ </div>
467
+ `;
468
+ return;
469
+ }
470
+
471
+ let html = '';
472
+ approvedArticles.forEach(article => {
473
+ html += `
474
+ <div class="bg-white rounded-lg overflow-hidden card-shadow hover:shadow-lg transition duration-300">
475
+ <div class="p-5">
476
+ <div class="flex justify-between items-start mb-2">
477
+ <span class="inline-block px-3 py-1 bg-green-100 text-green-800 text-xs font-semibold rounded-full">
478
+ ${article.category}
479
+ </span>
480
+ <span class="text-sm text-gray-500">${article.date}</span>
481
+ </div>
482
+ <h3 class="title-font text-xl font-bold mb-2 text-green-900">${article.title}</h3>
483
+ <p class="text-gray-700 mb-4 line-clamp-3">${article.content}</p>
484
+ <div class="flex justify-between items-center">
485
+ <span class="text-sm text-gray-600">Por: ${article.author}</span>
486
+ <button class="text-green-700 hover:text-green-600 font-medium text-sm">
487
+ Ler mais <i class="fas fa-arrow-right ml-1"></i>
488
+ </button>
489
+ </div>
490
+ </div>
491
+ </div>
492
+ `;
493
+ });
494
+
495
+ articlesContainer.innerHTML = html;
496
+ }, 800);
497
+ }
498
+
499
+ // Helper functions
500
+ function formatDate(dateString) {
501
+ if (!dateString) return '';
502
+ const date = new Date(dateString);
503
+ return date.toLocaleDateString('pt-BR');
504
+ }
505
+
506
+ function showToast(message, type) {
507
+ const toast = document.createElement('div');
508
+ toast.className = `fixed bottom-4 right-4 px-6 py-3 rounded-md shadow-lg text-white font-medium ${
509
+ type === 'success' ? 'bg-green-600' : 'bg-red-600'
510
+ }`;
511
+ toast.innerHTML = `
512
+ <div class="flex items-center gap-3">
513
+ <i class="fas ${type === 'success' ? 'fa-check-circle' : 'fa-exclamation-circle'}"></i>
514
+ <span>${message}</span>
515
+ </div>
516
+ `;
517
+ document.body.appendChild(toast);
518
+
519
+ setTimeout(() => {
520
+ toast.classList.add('opacity-0', 'transition-opacity', 'duration-300');
521
+ setTimeout(() => {
522
+ toast.remove();
523
+ }, 300);
524
+ }, 3000);
525
+ }
526
+
527
+ // Load articles on initial page load
528
+ document.addEventListener('DOMContentLoaded', () => {
529
+ loadArticles();
530
+ });
531
+ </script>
532
+ <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=Rwhehhehe/teste" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
533
+ </html>
prompts.txt CHANGED
@@ -0,0 +1 @@
 
 
1
+ <!DOCTYPE html> <html lang="pt-BR"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Jornal Oliveira</title> <style> :root { --bg-main: #C3CA92; --card-bg: #A4B17B; --card-bg-alt: #859864; --button-primary: #4E653D; --button-secondary: #697E50; --header-bg: #354C2B; --footer-bg: #20331B; --text-main: #20331B; --text-light: #FFFFFF; } * { box-sizing: border-box; } body { margin: 0; padding: 0; background-color: var(--bg-main); color: var(--text-main); font-family: Arial, sans-serif; } header, nav, footer { background-color: var(--header-bg); color: var(--text-light); text-align: center; padding: 1rem; } nav { display: flex; gap: 0.5rem; justify-content: center; flex-wrap: wrap; } nav .tab { background-color: var(--card-bg); padding: 0.5rem 1rem; border-radius: 4px; cursor: pointer; } nav .tab.active { background-color: var(--button-primary); color: var(--text-light); } section { display: none; padding: 1rem; } section.active { display: block; } .card { background-color: var(--card-bg); padding: 1rem; margin: 1rem auto; border-radius: 8px; max-width: 500px; box-shadow: 0 2px 5px rgba(0,0,0,0.1); } input, select, textarea, button { width: 100%; margin: 0.5rem 0; padding: 0.5rem; border-radius: 4px; border: 1px solid #ccc; font-size: 1rem; } button { background-color: var(--button-primary); color: var(--text-light); border: none; cursor: pointer; } button:hover { background-color: var(--button-secondary); } </style> </head> <body> <header> <h1>Jornal Oliveira</h1> <p>Feito de alunos para alunos</p> </header> <nav> <div class="tab active" data-tab="home">Início</div> <div class="tab restricted" data-tab="enviar">Enviar</div> <div class="tab" data-tab="avaliar">Avaliar</div> <div class="tab" data-tab="sugestoes">Sugestões</div> </nav> <main> <section id="home" class="active"> <h2>Bem-vindo!</h2> <p>Explore as matérias feitas por nossos alunos!</p> </section> <section id="enviar" class="restricted"> <h2>Enviar Matéria</h2> <input id="artTitle" type="text" placeholder="Título"> <input id="artAuthor" type="text" placeholder="Autor"> <input id="artDate" type="date"> <select id="artCat"> <option value="">Selecione uma categoria</option> <option value="Cultura">Cultura</option> <option value="Esportes">Esportes</option> <option value="Opinião">Opinião</option> <option value="Notícias">Notícias</option> </select> <textarea id="artContent" rows="5" placeholder="Conteúdo da matéria"></textarea> <button id="btnSubmit">Enviar Matéria</button> </section> <section id="avaliar"> <h2>Avalie o Jornal</h2> <p>Deixe sua opinião!</p> <textarea id="evalComment" rows="3" placeholder="Seu comentário..."></textarea> <button id="btnEval">Enviar Avaliação</button> </section> <section id="sugestoes"> <h2>Envie uma Sugestão</h2> <textarea id="suggestText" rows="3" placeholder="Sua sugestão..."></textarea> <button id="btnSuggest">Enviar Sugestão</button> </section> <section id="login" class="card"> <h2>Login de Editor</h2> <input id="loginName" type="text" placeholder="Nome"> <input id="loginPass" type="password" placeholder="Senha"> <button id="btnLogin">Entrar</button> <small>Senha padrão: <strong>jornal Oliveira</strong></small> </section> </main> <footer> <p>Jornal Oliveira &copy; 2025</p> </footer> <script> // Dados iniciais let authUsers = JSON.parse(localStorage.getItem('jo_users')) || [ { name: 'Mikael Silva', pass: 'Editor chefe 1' }, { name: 'Lorena Rangel', pass: 'Editor chefe 2' } ]; localStorage.setItem('jo_users', JSON.stringify(authUsers)); let isLogged = false; // Troca de abas document.querySelectorAll('.tab').forEach(tab => { tab.onclick = () => { document.querySelectorAll('.tab').forEach(t => t.classList.remove('active')); tab.classList.add('active'); document.querySelectorAll('section').forEach(sec => sec.classList.remove('active')); document.getElementById(tab.dataset.tab).classList.add('active'); }; }); // Login document.getElementById('btnLogin').onclick = () => { const name = document.getElementById('loginName').value.trim(); const pass = document.getElementById('loginPass').value.trim(); const user = authUsers.find(u => u.name === name && u.pass === pass); if (user || pass === 'jornal Oliveira') { alert('Login bem-sucedido!'); isLogged = true; document.getElementById('login').style.display = 'none'; document.querySelectorAll('.restricted').forEach(tab => tab.style.display = 'block'); } else { alert('Nome ou senha incorretos.'); } }; // Enviar matéria document.getElementById('btnSubmit').onclick = () => { if (!isLogged) { alert('Você precisa estar logado para enviar uma matéria!'); return; } const title = document.getElementById('artTitle').value.trim(); const author = document.getElementById('artAuthor').value.trim(); const date = document.getElementById('artDate').value; const category = document.getElementById('artCat').value; const content = document.getElementById('artContent').value.trim(); if (!title || !author || !date || !category || !content) { alert('Preencha todos os campos!'); return; } let pending = JSON.parse(localStorage.getItem('jo_pending')) || []; pending.push({ title, author, date, category, content }); localStorage.setItem('jo_pending', JSON.stringify(pending)); alert('Matéria enviada para aprovação!'); document.getElementById('artTitle').value = ''; document.getElementById('artAuthor').value = ''; document.getElementById('artDate').value = ''; document.getElementById('artCat').value = ''; document.getElementById('artContent').value = ''; }; // Avaliação document.getElementById('btnEval').onclick = () => { alert('Obrigado pela sua avaliação!'); document.getElementById('evalComment').value = ''; }; // Sugestões document.getElementById('btnSuggest').onclick = () => { alert('Sugestão enviada!'); document.getElementById('suggestText').value = ''; }; // Esconde abas restritas no começo document.querySelectorAll('.restricted').forEach(tab => tab.style.display = 'none'); </script> </body> </html>