File size: 86,031 Bytes
9e2e9ef |
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 |
<!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;
--header-bg: #697E50;
--button-bg: #697E50;
--text-main: #20331B;
--text-light: #FFFFFF;
--alert-bg: #e53e3e;
}
* { box-sizing: border-box; }
body {
margin:0; padding:0;
font-family: Arial, sans-serif;
background-color: var(--bg-main);
color: var(--text-main);
}
header {
background-color: var(--header-bg);
color: var(--text-light);
padding: 1rem;
text-align: center;
}
nav {
background-color: var(--header-bg);
padding: 0.5rem;
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
justify-content: center;
}
nav button {
background-color: var(--button-bg);
color: var(--text-light);
border: none;
padding: 0.5rem 1rem;
border-radius: 4px;
cursor: pointer;
transition: background-color 0.3s;
}
nav button:hover {
background-color: var(--card-bg-alt);
}
.container {
max-width: 800px;
margin: 1rem auto;
padding: 0 1rem;
}
.card {
background-color: var(--card-bg);
padding: 1rem;
margin-bottom: 1rem;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.hidden { display: none; }
input, select, textarea {
width: 100%;
padding: 0.5rem;
margin-bottom: 0.5rem;
border: 1px solid #ccc;
border-radius: 4px;
font-size: 1rem;
}
button.primary {
background-color: var(--button-bg);
color: var(--text-light);
}
footer {
background-color: var(--header-bg);
color: var(--text-light);
text-align: center;
padding: 1rem;
margin-top: 2rem;
}
.alert {
background-color: var(--alert-bg);
color: var(--text-light);
padding: 0.5rem;
border-radius: 4px;
margin-bottom: 0.5rem;
}
</style>
</head>
<body>
<header>
<h1>Jornal Oliveira</h1>
<p>Feito de alunos para alunos</p>
</header>
<nav>
<button onclick="filterArticles('Colunas')">Colunas</button>
<button onclick="filterArticles('Notícias da Escola')">Notícias da Escola</button>
<button onclick="filterArticles('Entrevistas')">Entrevistas</button>
<button onclick="filterArticles('Opinião')">Opinião</button>
<button onclick="filterArticles('Cultura e Arte')">Cultura e Arte</button>
<button onclick="filterArticles('Esportes')">Esportes</button>
<button onclick="filterArticles('Humor')">Humor</button>
<button onclick="filterArticles('Você Sabia?')">Você Sabia?</button>
<button onclick="filterArticles('Projetos e Grêmios')">Projetos e Grêmios</button>
<button onclick="filterArticles('Fala Estudante')">Fala Estudante</button>
<button onclick="filterArticles('Investigação')">Investigação</button>
<button id="openLogin" class="primary">Painel</button>
</nav><div class="container" id="articlesSection">
<h2>Artigos Publicados</h2>
<div id="articlesList"></div>
</div><div id="loginModal" class="hidden">
<div class="card" style="max-width:300px;margin:2rem auto;">
<h3>Acesso ao Painel</h3>
<input id="accessCode" type="password" placeholder="Código de Acesso">
<button id="loginSubmit" class="primary">Entrar</button>
<div id="loginError" class="alert hidden">Código inválido.</div>
</div>
</div><div class="container hidden" id="publishPanel">
<div class="card">
<h3>Publicar Nova Matéria</h3>
<input id="pubAuthor" type="text" placeholder="Seu Nome (obrigatório)">
<input id="pubTitle" type="text" placeholder="Título da Matéria">
<select id="pubCategory">
<option value="">Selecione categoria</option>
</select>
<textarea id="pubContent" rows="5" placeholder="Conteúdo da matéria"></textarea>
<input id="pubParticipants" type="text" placeholder="Quem participou (opcional)">
<button id="btnPublish" class="primary">Publicar</button>
</div>
</div><footer>
<p>Jornal Oliveira © 2025</p>
</footer><script>
const ACCESS_CODE = '1903A';
const categories = ['Colunas','Notícias da Escola','Entrevistas','Opinião','Cultura e Arte','Esportes','Humor','Você Sabia?','Projetos e Grêmios','Fala Estudante','Investigação'];
let articles = JSON.parse(localStorage.getItem('jo_published') || '[]');
// Init
window.addEventListener('DOMContentLoaded', () => {
const sel = document.getElementById('pubCategory');
categories.forEach(c => {
const o = document.createElement('option'); o.value=c; o.textContent=c;
sel.appendChild(o);
});
if(!articles.length){
articles.push({ title:'Bem-vindo ao Jornal Oliveira!', author:'Equipe', date:new Date().toLocaleDateString('pt-BR'), category:'Colunas', content:'Primeira matéria do nosso jornal.' });
localStorage.setItem('jo_published',JSON.stringify(articles));
}
renderArticles();
});
function renderArticles(filter='Todas'){
const list=document.getElementById('articlesList'); list.innerHTML='';
let arr=articles.slice().sort((a,b)=>new Date(b.date)-new Date(a.date));
if(filter!=='Todas') arr=arr.filter(a=>a.category===filter);
if(!arr.length){ list.innerHTML='<p>Nenhuma matéria encontrada.</p>'; return; }
arr.forEach(a=>{
const card=document.createElement('div'); card.className='card';
card.innerHTML=`<h3>${a.title}</h3><p><strong>${a.author}</strong> - ${a.date} | <em>${a.category}</em></p><p>${a.content}</p>${a.participants?'<p><em>Participantes: '+a.participants+'</em></p>':''}`;
list.appendChild(card);
});
}
function filterArticles(cat){ renderArticles(cat); }
// Login Panel
document.getElementById('openLogin').onclick=()=>{
document.getElementById('loginModal').classList.remove('hidden');
};
document.getElementById('loginSubmit').onclick=()=>{
const code=document.getElementById('accessCode').value.trim();
if(code===ACCESS_CODE){
document.getElementById('loginModal').classList.add('hidden');
document.getElementById('publishPanel').classList.remove('hidden');
} else {
document.getElementById('loginError').classList.remove('hidden');
}
};
// Publish
document.getElementById('btnPublish').onclick=()=>{
const author=document.getElementById('pubAuthor').value.trim();
const title=document.getElementById('pubTitle').value.trim();
const category=document.getElementById('pubCategory').value;
const content=document.getElementById('pubContent').value.trim();
const participants=document.getElementById('pubParticipants').value.trim();
if(!author||!title||!category||!content){ alert('Preencha todos os campos obrigatórios!'); return; }
const newArt={ author,title,category,content,date:new Date().toLocaleDateString('pt-BR'),participants };
articles.unshift(newArt);
localStorage.setItem('jo_published',JSON.stringify(articles));
renderArticles(); alert('Matéria publicada!');
document.getElementById('pubAuthor').value='';document.getElementById('pubTitle').value='';document.getElementById('pubContent').value='';document.getElementById('pubParticipants').value='';
};
</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-1" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html> |