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

View File

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

View File

@ -106,7 +106,8 @@ app.get('/api/feeds/anssi', async (req, res) => {
pubDate: item.pubDate || '',
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);
} catch (err) {
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…)
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`;
try {
const response = await fetch(url, {
@ -134,7 +138,7 @@ app.get('/api/feeds/geo', async (req, res) => {
source: item.source?.['#text'] || item.source || ''
}))
.sort((a, b) => new Date(b.pubDate) - new Date(a.pubDate))
.slice(0, 15);
.slice(0, 7);
res.json(entries);
} catch (err) {
res.status(502).json({ error: 'Geo feed fetch failed', detail: err.message });