Ces choix valent aussi pour la liste des stations, plus bas.
Forum
-
+
Rejoindre la discussion →
Déjà un compte ? GSe connecter avec Gastinel
GL'écosystème Gastinel. Un compte pour le forum, vos favoris et toutes nos applications. Sans publicité, une alternative aux GAFAM.
@@ -700,6 +701,7 @@ const dec = s => L === 'en' ? s : s.replace('.', ',');
// les noms de stations et de lieux ne sont jamais traduits.
const I18N = {
fr: {
+ 'fb.auteur': nom => `par ${nom}`, 'fb.compte': n => `${n} ${n === 1 ? 'sujet' : 'sujets'} sur 7 jours`,
moment: h => h < 5 ? 'Cette nuit' : h < 12 ? 'Ce matin' : h < 18 ? 'Cet après-midi' : h < 23 ? 'Ce soir' : 'Cette nuit',
'phrase.charge': 'Relevés en cours de chargement…',
'reseau.n': n => `${n} stations dans le massif`,
@@ -757,6 +759,7 @@ const I18N = {
'record.label': 'Highlight', 'record.auto': 'By season', 'record.froid': 'Coldest', 'record.chaud': 'Warmest', 'record.vent': 'Windiest', 'record.pluie': 'Wettest',
retour: '← Whole massif', 'direct.attente': 'Loading readings…', suite: 'All stations ↓',
'fb.titre': 'Forum', 'fb.une': 'Featured · Weekly summary', 'fb.lien': 'The weekly summary will appear here', 'fb.cta': 'Join the discussion →',
+ 'fb.auteur': nom => `by ${nom}`, 'fb.compte': n => `${n} ${n === 1 ? 'topic' : 'topics'} in 7 days`,
'fb.co': 'Already have an account?', 'fb.connexion': 'Sign in with Gastinel',
'fb.bas': '
The Gastinel ecosystem. One account for the forum, your favourites and all our apps. No ads, an alternative to Big Tech.',
'sous-carte': 'Contour lines every 100 m · zoom: mouse wheel (PC) or two fingers (phone)',
@@ -836,6 +839,7 @@ const I18N = {
'record.label': 'Hervorheben', 'record.auto': 'Je nach Jahreszeit', 'record.froid': 'Am kältesten', 'record.chaud': 'Am wärmsten', 'record.vent': 'Am windigsten', 'record.pluie': 'Am meisten Regen',
retour: '← Ganzes Massiv', 'direct.attente': 'Messwerte werden geladen…', suite: 'Alle Stationen ↓',
'fb.titre': 'Forum', 'fb.une': 'Im Fokus · Wochenrückblick', 'fb.lien': 'Hier erscheint der Wochenrückblick', 'fb.cta': 'Mitdiskutieren →',
+ 'fb.auteur': nom => `von ${nom}`, 'fb.compte': n => `${n} ${n === 1 ? 'Thema' : 'Themen'} in 7 Tagen`,
'fb.co': 'Schon ein Konto?', 'fb.connexion': 'Mit Gastinel anmelden',
'fb.bas': '
Das Gastinel-Ökosystem. Ein Konto für das Forum, Ihre Favoriten und alle unsere Apps. Ohne Werbung, eine Alternative zu den großen Tech-Konzernen.',
'sous-carte': 'Höhenlinien alle 100 m · Zoom: Mausrad (PC) oder zwei Finger (Handy)',
@@ -1914,12 +1918,28 @@ btnLecture.addEventListener('click', () => {
btnLecture.textContent = '❚❚'; btnLecture.setAttribute('aria-label', t('lecture.pause'));
lectureId = setInterval(() => { curseur.value = Math.min(N, +curseur.value + 1); poserTemps(); if (+curseur.value >= N) arreterLecture(); }, 260);
});
-(FORUM_OUVERT ? fetch('data/forum-une.json?' + Math.floor(Date.now() / 300000)).then(r => r.ok ? r.json() : null).then(u => {
- if (!u || !u.titre) return;
- document.querySelectorAll('[data-une]').forEach(a => { a.textContent = u.titre; if (typeof u.url === 'string' && u.url.startsWith('/forum/') && !u.url.startsWith('//')) a.href = u.url; });
- document.querySelectorAll('[data-auteur]').forEach(e => { e.textContent = u.auteur ? 'par ' + u.auteur : ''; });
- if (u.n) document.querySelectorAll('[data-n]').forEach(e => { e.textContent = u.n + (u.n > 1 ? ' sujets' : ' sujet') + ' cette semaine'; });
-}).catch(() => {}) : 0);
+let uneForum = null;
+function afficherUneForum(){
+ if (!uneForum) return;
+ const {titre, auteur, extrait, url, n} = uneForum;
+ if (Number.isSafeInteger(n) && n > 0) {
+ document.querySelectorAll('[data-n]').forEach(e => { e.textContent = t('fb.compte', n); });
+ }
+ if (typeof titre !== 'string' || !titre || typeof url !== 'string' || !/^\/forum\/t\/[1-9][0-9]*$/.test(url)) return;
+ document.querySelectorAll('[data-une]').forEach(a => { a.textContent = titre; a.href = url; });
+ if (typeof auteur === 'string' && auteur) {
+ document.querySelectorAll('[data-auteur]').forEach(e => { e.textContent = t('fb.auteur', auteur); });
+ }
+ if (typeof extrait === 'string' && extrait) {
+ document.querySelectorAll('[data-extrait]').forEach(e => { e.textContent = extrait; e.hidden = false; });
+ }
+}
+if (FORUM_OUVERT) {
+ fetch('/forum/api/une.json', {credentials: 'omit'}).then(r => r.ok ? r.json() : null).then(u => {
+ uneForum = u;
+ afficherUneForum();
+ }).catch(() => {});
+}
remplirBilan(); // le bilan est déplié dès l'arrivée
function apresDonnees(){ chargerSeries(); if (TEMPS != null) { snapshotLive(); appliquerTemps(); } }
const selRecord = document.getElementById('record');
@@ -2356,7 +2376,7 @@ dlgPrm.addEventListener('change', ev => {
});
// après un changement de langue ou d'affichage : textes refaits, étiquettes remesurées, puces replacées
function apresReglage(){
- traduirePage(); formatsDates(); forumTextes(); majAlt(); majTempsTxt(); majDate(); afficherDirect();
+ traduirePage(); formatsDates(); forumTextes(); afficherUneForum(); majAlt(); majTempsTxt(); majDate(); afficherDirect();
btnLecture.setAttribute('aria-label', t(lectureId ? 'lecture.pause' : 'lecture.rejouer'));
plein.setAttribute('aria-label', t('plein.aria')); plein.querySelector('.plein-ferme').textContent = t('plein.retour');
phraseDuJour(); listeStations(); coupe();
diff --git a/maquettes/accueil-carte/modele.html b/maquettes/accueil-carte/modele.html
index ce555ab..f98bf1d 100644
--- a/maquettes/accueil-carte/modele.html
+++ b/maquettes/accueil-carte/modele.html
@@ -300,6 +300,7 @@ a:focus-visible,button:focus-visible,input:focus-visible{outline:2px solid var(-
.fb-une a{display:block;margin-top:2px;font-family:var(--titre);font-weight:600;font-size:17px;line-height:1.3;color:var(--roche);text-decoration:none}
.fb-une a:hover{text-decoration:underline}
.fb-une span{font-size:12.5px;color:var(--gris)}
+.fb-une p{margin:4px 0 0;font-size:14px;overflow-wrap:anywhere}
.fb-cta{display:block;margin:12px 16px 6px;padding:11px 14px;background:var(--sapin);color:#fff;text-align:center;font-size:13px;font-weight:600;letter-spacing:.07em;text-transform:uppercase;text-decoration:none;border:1px solid var(--sapin)}
.fb-cta:hover{background:#17382b}
.fb-co{margin:0 16px 12px;text-align:center;font-size:12.5px;color:var(--gris)}
@@ -564,7 +565,7 @@ html[data-aff=acces]{--gris:#3a3f3c;--pierre:#b9b4a6}
Toutes les stations ↓
Forum
-
+
Rejoindre la discussion →
Déjà un compte ? GSe connecter avec Gastinel
GL'écosystème Gastinel. Un compte pour le forum, vos favoris et toutes nos applications. Sans publicité, une alternative aux GAFAM.
@@ -578,7 +579,7 @@ html[data-aff=acces]{--gris:#3a3f3c;--pierre:#b9b4a6}
Ces choix valent aussi pour la liste des stations, plus bas.
Forum
-
+
Rejoindre la discussion →
Déjà un compte ? GSe connecter avec Gastinel
GL'écosystème Gastinel. Un compte pour le forum, vos favoris et toutes nos applications. Sans publicité, une alternative aux GAFAM.
@@ -700,6 +701,7 @@ const dec = s => L === 'en' ? s : s.replace('.', ',');
// les noms de stations et de lieux ne sont jamais traduits.
const I18N = {
fr: {
+ 'fb.auteur': nom => `par ${nom}`, 'fb.compte': n => `${n} ${n === 1 ? 'sujet' : 'sujets'} sur 7 jours`,
moment: h => h < 5 ? 'Cette nuit' : h < 12 ? 'Ce matin' : h < 18 ? 'Cet après-midi' : h < 23 ? 'Ce soir' : 'Cette nuit',
'phrase.charge': 'Relevés en cours de chargement…',
'reseau.n': n => `${n} stations dans le massif`,
@@ -757,6 +759,7 @@ const I18N = {
'record.label': 'Highlight', 'record.auto': 'By season', 'record.froid': 'Coldest', 'record.chaud': 'Warmest', 'record.vent': 'Windiest', 'record.pluie': 'Wettest',
retour: '← Whole massif', 'direct.attente': 'Loading readings…', suite: 'All stations ↓',
'fb.titre': 'Forum', 'fb.une': 'Featured · Weekly summary', 'fb.lien': 'The weekly summary will appear here', 'fb.cta': 'Join the discussion →',
+ 'fb.auteur': nom => `by ${nom}`, 'fb.compte': n => `${n} ${n === 1 ? 'topic' : 'topics'} in 7 days`,
'fb.co': 'Already have an account?', 'fb.connexion': 'Sign in with Gastinel',
'fb.bas': '
The Gastinel ecosystem. One account for the forum, your favourites and all our apps. No ads, an alternative to Big Tech.',
'sous-carte': 'Contour lines every 100 m · zoom: mouse wheel (PC) or two fingers (phone)',
@@ -836,6 +839,7 @@ const I18N = {
'record.label': 'Hervorheben', 'record.auto': 'Je nach Jahreszeit', 'record.froid': 'Am kältesten', 'record.chaud': 'Am wärmsten', 'record.vent': 'Am windigsten', 'record.pluie': 'Am meisten Regen',
retour: '← Ganzes Massiv', 'direct.attente': 'Messwerte werden geladen…', suite: 'Alle Stationen ↓',
'fb.titre': 'Forum', 'fb.une': 'Im Fokus · Wochenrückblick', 'fb.lien': 'Hier erscheint der Wochenrückblick', 'fb.cta': 'Mitdiskutieren →',
+ 'fb.auteur': nom => `von ${nom}`, 'fb.compte': n => `${n} ${n === 1 ? 'Thema' : 'Themen'} in 7 Tagen`,
'fb.co': 'Schon ein Konto?', 'fb.connexion': 'Mit Gastinel anmelden',
'fb.bas': '
Das Gastinel-Ökosystem. Ein Konto für das Forum, Ihre Favoriten und alle unsere Apps. Ohne Werbung, eine Alternative zu den großen Tech-Konzernen.',
'sous-carte': 'Höhenlinien alle 100 m · Zoom: Mausrad (PC) oder zwei Finger (Handy)',
@@ -1914,12 +1918,28 @@ btnLecture.addEventListener('click', () => {
btnLecture.textContent = '❚❚'; btnLecture.setAttribute('aria-label', t('lecture.pause'));
lectureId = setInterval(() => { curseur.value = Math.min(N, +curseur.value + 1); poserTemps(); if (+curseur.value >= N) arreterLecture(); }, 260);
});
-(FORUM_OUVERT ? fetch('data/forum-une.json?' + Math.floor(Date.now() / 300000)).then(r => r.ok ? r.json() : null).then(u => {
- if (!u || !u.titre) return;
- document.querySelectorAll('[data-une]').forEach(a => { a.textContent = u.titre; if (typeof u.url === 'string' && u.url.startsWith('/forum/') && !u.url.startsWith('//')) a.href = u.url; });
- document.querySelectorAll('[data-auteur]').forEach(e => { e.textContent = u.auteur ? 'par ' + u.auteur : ''; });
- if (u.n) document.querySelectorAll('[data-n]').forEach(e => { e.textContent = u.n + (u.n > 1 ? ' sujets' : ' sujet') + ' cette semaine'; });
-}).catch(() => {}) : 0);
+let uneForum = null;
+function afficherUneForum(){
+ if (!uneForum) return;
+ const {titre, auteur, extrait, url, n} = uneForum;
+ if (Number.isSafeInteger(n) && n > 0) {
+ document.querySelectorAll('[data-n]').forEach(e => { e.textContent = t('fb.compte', n); });
+ }
+ if (typeof titre !== 'string' || !titre || typeof url !== 'string' || !/^\/forum\/t\/[1-9][0-9]*$/.test(url)) return;
+ document.querySelectorAll('[data-une]').forEach(a => { a.textContent = titre; a.href = url; });
+ if (typeof auteur === 'string' && auteur) {
+ document.querySelectorAll('[data-auteur]').forEach(e => { e.textContent = t('fb.auteur', auteur); });
+ }
+ if (typeof extrait === 'string' && extrait) {
+ document.querySelectorAll('[data-extrait]').forEach(e => { e.textContent = extrait; e.hidden = false; });
+ }
+}
+if (FORUM_OUVERT) {
+ fetch('/forum/api/une.json', {credentials: 'omit'}).then(r => r.ok ? r.json() : null).then(u => {
+ uneForum = u;
+ afficherUneForum();
+ }).catch(() => {});
+}
remplirBilan(); // le bilan est déplié dès l'arrivée
function apresDonnees(){ chargerSeries(); if (TEMPS != null) { snapshotLive(); appliquerTemps(); } }
const selRecord = document.getElementById('record');
@@ -2356,7 +2376,7 @@ dlgPrm.addEventListener('change', ev => {
});
// après un changement de langue ou d'affichage : textes refaits, étiquettes remesurées, puces replacées
function apresReglage(){
- traduirePage(); formatsDates(); forumTextes(); majAlt(); majTempsTxt(); majDate(); afficherDirect();
+ traduirePage(); formatsDates(); forumTextes(); afficherUneForum(); majAlt(); majTempsTxt(); majDate(); afficherDirect();
btnLecture.setAttribute('aria-label', t(lectureId ? 'lecture.pause' : 'lecture.rejouer'));
plein.setAttribute('aria-label', t('plein.aria')); plein.querySelector('.plein-ferme').textContent = t('plein.retour');
phraseDuJour(); listeStations(); coupe();