all: increase font, larger RSS

This commit is contained in:
Lopinosaurus 2026-03-12 13:41:55 +01:00
parent 02a1b5db91
commit fbc6dbf5c4
3 changed files with 20 additions and 15 deletions

View File

@ -27,7 +27,7 @@ function connectWS() {
renderRootme(msg.ranking); renderRootme(msg.ranking);
} else if (msg.type === 'rootme_flag') { } else if (msg.type === 'rootme_flag') {
renderRootme(rootmeCache); renderRootme(rootmeCache);
showNotif(`FLAG ! ${msg.login} +${msg.gained} PTS — TOTAL : ${msg.newScore} PTS`, true); showNotif(`FLAG ! ${msg.login} +${msg.gained} PTS — TOTAL : ${msg.newScore} PTS`);
} }
}); });
@ -67,9 +67,10 @@ const notifOverlay = document.getElementById('notif-overlay');
const notifMessage = document.getElementById('notif-message'); const notifMessage = document.getElementById('notif-message');
const notifBarInner = document.getElementById('notif-bar-inner'); const notifBarInner = document.getElementById('notif-bar-inner');
const softAlarmAudio = new Audio('/soft_alarm.mp3'); const softAlarmAudio = new Audio('/soft_alarm.mp3');
const newsAudio = new Audio('/news.mp3');
let notifTimer = null; let notifTimer = null;
function showNotif(message, sound = true) { function showNotif(message, audio = softAlarmAudio) {
notifMessage.textContent = message; notifMessage.textContent = message;
// Re-déclencher l'animation de la barre // Re-déclencher l'animation de la barre
@ -83,9 +84,9 @@ function showNotif(message, sound = true) {
notifOverlay.classList.remove('hidden'); notifOverlay.classList.remove('hidden');
if (sound) { if (audio) {
softAlarmAudio.currentTime = 0; audio.currentTime = 0;
softAlarmAudio.play().catch(err => console.error('soft_alarm:', err)); audio.play().catch(err => console.error('notif audio:', err));
} }
if (notifTimer) clearTimeout(notifTimer); if (notifTimer) clearTimeout(notifTimer);
@ -259,7 +260,7 @@ async function loadGeo() {
} else { } else {
const newGeoItems = items.filter(i => !seenGeoLinks.has(i.link)); const newGeoItems = items.filter(i => !seenGeoLinks.has(i.link));
if (newGeoItems.length) { if (newGeoItems.length) {
showNotif(`Nouvelle actualité géopolitique : ${newGeoItems[0].title}`, false); showNotif(`Nouvelle actualité géopolitique : ${newGeoItems[0].title}`, newsAudio);
seenGeoLinks = currentLinks; seenGeoLinks = currentLinks;
} }
} }

View File

@ -92,7 +92,7 @@ main.grid {
.rootme-rank { .rootme-rank {
color: var(--text-dim); color: var(--text-dim);
font-size: 11px; font-size: 13px;
letter-spacing: 1px; letter-spacing: 1px;
text-align: right; text-align: right;
} }
@ -103,7 +103,7 @@ main.grid {
.rootme-login { .rootme-login {
color: var(--green); color: var(--green);
font-size: 13px; font-size: 15px;
font-weight: bold; font-weight: bold;
letter-spacing: 1px; letter-spacing: 1px;
overflow: hidden; overflow: hidden;
@ -113,7 +113,7 @@ main.grid {
.rootme-score { .rootme-score {
color: var(--green-dim); color: var(--green-dim);
font-size: 11px; font-size: 13px;
letter-spacing: 1px; letter-spacing: 1px;
white-space: nowrap; white-space: nowrap;
} }
@ -191,9 +191,9 @@ main.grid {
.anssi-item a { .anssi-item a {
color: var(--green); color: var(--green);
text-decoration: none; text-decoration: none;
font-size: 12px; font-size: 14px;
display: block; display: block;
margin-bottom: 2px; margin-bottom: 3px;
line-height: 1.4; line-height: 1.4;
} }
@ -201,7 +201,7 @@ main.grid {
.anssi-date { .anssi-date {
color: var(--text-dim); color: var(--text-dim);
font-size: 10px; font-size: 11px;
} }
/* CVE items */ /* CVE items */

View File

@ -106,7 +106,8 @@ app.get('/api/feeds/anssi', async (req, res) => {
pubDate: item.pubDate || '', pubDate: item.pubDate || '',
description: item.description || '' description: item.description || ''
})) }))
.sort((a, b) => new Date(b.pubDate) - new Date(a.pubDate)); .sort((a, b) => new Date(b.pubDate) - new Date(a.pubDate))
.slice(0, 7);
res.json(entries); res.json(entries);
} catch (err) { } catch (err) {
res.status(502).json({ error: 'Feed fetch failed', detail: err.message }); res.status(502).json({ error: 'Feed fetch failed', detail: err.message });
@ -115,7 +116,10 @@ app.get('/api/feeds/anssi', async (req, res) => {
// Géopolitique — Google News RSS (conflits, cyberattaques, Ukraine, Iran…) // Géopolitique — Google News RSS (conflits, cyberattaques, Ukraine, Iran…)
app.get('/api/feeds/geo', async (req, res) => { app.get('/api/feeds/geo', async (req, res) => {
const query = encodeURIComponent('Ukraine OR Iran OR "Moyen-Orient" OR cyberattaque OR guerre'); const query = encodeURIComponent(
'Ukraine OR Russie OR Iran OR "Moyen-Orient" OR OTAN OR guerre OR conflit' +
' OR cyberattaque OR ransomware OR APT OR "zero-day" OR vulnérabilité OR hack OR malware OR breach'
);
const url = `https://news.google.com/rss/search?q=${query}&hl=fr&gl=FR&ceid=FR:fr`; const url = `https://news.google.com/rss/search?q=${query}&hl=fr&gl=FR&ceid=FR:fr`;
try { try {
const response = await fetch(url, { const response = await fetch(url, {
@ -134,7 +138,7 @@ app.get('/api/feeds/geo', async (req, res) => {
source: item.source?.['#text'] || item.source || '' source: item.source?.['#text'] || item.source || ''
})) }))
.sort((a, b) => new Date(b.pubDate) - new Date(a.pubDate)) .sort((a, b) => new Date(b.pubDate) - new Date(a.pubDate))
.slice(0, 15); .slice(0, 7);
res.json(entries); res.json(entries);
} catch (err) { } catch (err) {
res.status(502).json({ error: 'Geo feed fetch failed', detail: err.message }); res.status(502).json({ error: 'Geo feed fetch failed', detail: err.message });