| <!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> |
| body { |
| margin: 0; |
| font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; |
| background-color: #C3CA92; |
| color: #20331B; |
| }header { |
| background-color: #697E50; |
| padding: 10px 20px; |
| color: white; |
| display: flex; |
| justify-content: space-between; |
| align-items: center; |
| } |
| |
| nav button { |
| margin: 0 5px; |
| padding: 10px; |
| background-color: #859864; |
| color: white; |
| border: none; |
| cursor: pointer; |
| border-radius: 8px; |
| } |
| |
| nav button:hover { |
| background-color: #A4B17B; |
| } |
| |
| section { |
| display: none; |
| padding: 20px; |
| background-color: #C3CA92; |
| } |
| |
| .visible { |
| display: block; |
| } |
| |
| .card { |
| background: white; |
| border-radius: 10px; |
| padding: 15px; |
| margin-bottom: 15px; |
| box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); |
| } |
| |
| .login-modal { |
| position: fixed; |
| top: 0; |
| left: 0; |
| width: 100%; |
| height: 100%; |
| background: rgba(0, 0, 0, 0.7); |
| display: flex; |
| align-items: center; |
| justify-content: center; |
| } |
| |
| .login-box { |
| background: white; |
| padding: 20px; |
| border-radius: 10px; |
| max-width: 300px; |
| text-align: center; |
| } |
| |
| .error { |
| color: red; |
| margin-top: 10px; |
| } |
| |
| </style> |
| </head><body> |
| <header> |
| <h1>Jornal Oliveira</h1> |
| <nav> |
| <button onclick="showSection('inicio')">Início</button> |
| <button onclick="showSection('avaliar')">Avaliar</button> |
| <button onclick="showSection('sugestoes')">Sugestões</button> |
| <button onclick="showSection('participar')">Participe</button> |
| <button onclick="toggleLogin()">Login</button> |
| </nav> |
| </header> <section id="inicio" class="visible"> |
| <h2>Últimas Matérias</h2> |
| <div id="materias"></div> |
| </section> <section id="avaliar"> |
| <h2>Avaliar</h2> |
| <form onsubmit="salvarAvaliacao(event)"> |
| <label>Nota:</label><br> |
| <input type="number" min="1" max="5" id="estrela" required><br> |
| <label>Comentário:</label><br> |
| <textarea id="comentario" required></textarea><br> |
| <button type="submit">Enviar Avaliação</button> |
| </form> |
| </section> <section id="sugestoes"> |
| <h2>Sugestões</h2> |
| <form onsubmit="salvarSugestao(event)"> |
| <textarea id="sugestao" required></textarea><br> |
| <button type="submit">Enviar Sugestão</button> |
| </form> |
| </section> <section id="participar"> |
| <h2>Participe</h2> |
| <form onsubmit="salvarParticipacao(event)"> |
| <input type="text" id="nome" placeholder="Seu nome" required><br> |
| <input type="text" id="sala" placeholder="Sua sala" required><br> |
| <input type="text" id="periodo" placeholder="Período" required><br> |
| <textarea id="descricao" placeholder="Descrição (opcional)"></textarea><br> |
| <button type="submit">Participar</button> |
| </form> |
| </section> <section id="painel-editor"> |
| <h2>Painel do Editor</h2> |
| <button onclick="showSection('enviarMateria')">Enviar Matéria</button> |
| <button onclick="verAvaliacoes()">Ver Avaliações</button> |
| <button onclick="verSugestoes()">Ver Sugestões</button> |
| <button onclick="verParticipacoes()">Ver Participações</button> |
| </section> <section id="enviarMateria"> |
| <h2>Enviar Matéria</h2> |
| <form onsubmit="salvarMateria(event)"> |
| <input type="text" id="titulo" placeholder="Título" required><br> |
| <textarea id="conteudo" placeholder="Conteúdo" required></textarea><br> |
| <input type="text" id="autor" placeholder="Autor" required><br> |
| <input type="text" id="participantes" placeholder="Participantes (opcional)"><br> |
| <button type="submit">Publicar</button> |
| </form> |
| </section> <div id="loginModal" class="login-modal" style="display:none"> |
| <div class="login-box"> |
| <h3>Login do Editor</h3> |
| <input type="password" id="senha"><br> |
| <button onclick="verificarSenha()">Entrar</button> |
| <p class="error" id="erroLogin"></p> |
| </div> |
| </div> <script> |
| const SECAO_IDS = ['inicio', 'avaliar', 'sugestoes', 'participar', 'painel-editor', 'enviarMateria']; |
| |
| function showSection(id) { |
| SECAO_IDS.forEach(secao => { |
| document.getElementById(secao).classList.remove('visible'); |
| }); |
| document.getElementById(id).classList.add('visible'); |
| } |
| |
| function toggleLogin() { |
| document.getElementById('loginModal').style.display = 'flex'; |
| } |
| |
| let tentativas = 0; |
| function verificarSenha() { |
| const senha = document.getElementById('senha').value; |
| if (senha === 'BRJORNAL') { |
| document.getElementById('loginModal').style.display = 'none'; |
| showSection('painel-editor'); |
| } else { |
| tentativas++; |
| if (tentativas >= 3) { |
| document.getElementById('erroLogin').innerText = 'Muitas tentativas. Tente mais tarde ou fale com o responsável do jornal.'; |
| } else { |
| document.getElementById('erroLogin').innerText = 'Senha incorreta. Tente novamente.'; |
| } |
| } |
| } |
| |
| function salvarMateria(e) { |
| e.preventDefault(); |
| const titulo = document.getElementById('titulo').value; |
| const conteudo = document.getElementById('conteudo').value; |
| const autor = document.getElementById('autor').value; |
| const participantes = document.getElementById('participantes').value; |
| const materias = JSON.parse(localStorage.getItem('materias') || '[]'); |
| materias.push({ titulo, conteudo, autor, participantes, data: new Date().toLocaleDateString() }); |
| localStorage.setItem('materias', JSON.stringify(materias)); |
| alert('Matéria enviada!'); |
| showSection('inicio'); |
| exibirMaterias(); |
| } |
| |
| function exibirMaterias() { |
| const materias = JSON.parse(localStorage.getItem('materias') || '[]'); |
| const container = document.getElementById('materias'); |
| container.innerHTML = ''; |
| materias.forEach(mat => { |
| container.innerHTML += `<div class="card"><h3>${mat.titulo}</h3><p>${mat.conteudo}</p><p><strong>Por:</strong> ${mat.autor}</p><p><em>${mat.data}</em></p></div>`; |
| }); |
| } |
| |
| function salvarAvaliacao(e) { |
| e.preventDefault(); |
| const estrela = document.getElementById('estrela').value; |
| const comentario = document.getElementById('comentario').value; |
| const avals = JSON.parse(localStorage.getItem('avaliacoes') || '[]'); |
| avals.push({ estrela, comentario }); |
| localStorage.setItem('avaliacoes', JSON.stringify(avals)); |
| alert('Avaliação enviada!'); |
| } |
| |
| function salvarSugestao(e) { |
| e.preventDefault(); |
| const sugestao = document.getElementById('sugestao').value; |
| const sugs = JSON.parse(localStorage.getItem('sugestoes') || '[]'); |
| sugs.push(sugestao); |
| localStorage.setItem('sugestoes', JSON.stringify(sugs)); |
| alert('Sugestão enviada!'); |
| } |
| |
| function salvarParticipacao(e) { |
| e.preventDefault(); |
| const nome = document.getElementById('nome').value; |
| const sala = document.getElementById('sala').value; |
| const periodo = document.getElementById('periodo').value; |
| const descricao = document.getElementById('descricao').value; |
| const part = JSON.parse(localStorage.getItem('participacoes') || '[]'); |
| part.push({ nome, sala, periodo, descricao }); |
| localStorage.setItem('participacoes', JSON.stringify(part)); |
| alert('Participação registrada!'); |
| } |
| |
| function verAvaliacoes() { |
| const avals = JSON.parse(localStorage.getItem('avaliacoes') || '[]'); |
| alert(avals.map(a => `Nota: ${a.estrela}\nComentário: ${a.comentario}`).join('\n\n')); |
| } |
| |
| function verSugestoes() { |
| const sugs = JSON.parse(localStorage.getItem('sugestoes') || '[]'); |
| alert(sugs.join('\n---\n')); |
| } |
| |
| function verParticipacoes() { |
| const part = JSON.parse(localStorage.getItem('participacoes') || '[]'); |
| alert(part.map(p => `Nome: ${p.nome}, Sala: ${p.sala}, Período: ${p.periodo}\nDescrição: ${p.descricao}`).join('\n\n')); |
| } |
| |
| window.onload = exibirMaterias; |
| </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=Rwhehhehe/teste-1-2" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body></html> |