News et newsletter : page /news/ (5 langues), bouton News, reglages (theme clair par defaut, sombre au choix), formulaire newsletter

Repris des copies site-principal-news et site-principal-reglages.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Cette révision appartient à :
Théo GastineletClaude Opus 5.5 a révisé 2026-11-08 22:23:21 +01:00
1 Parent cb8f0f4b54
révision baa25612e9
15 fichiers modifiés
+2264 -3

Aucun fichier ne correspond à votre recherche

+365
Voir le fichier
@@ -0,0 +1,365 @@
/* news/actus.js : composant News autonome (sans bibliothèque).
* Deux usages :
* <aside data-actus-widget hidden></aside> -> les 3 dernières news, en version courte
* <div data-actus-list></div> -> liste complète (page /news/), au niveau choisi
* Les données viennent de /data/actus.json (attribut data-src pour changer).
* Réglages du visiteur (niveau + thèmes) : lus dans localStorage (clé « gastinel-actus »).
* Sans réglage : niveau « normal », tous les thèmes. Sans localStorage : même chose, la page marche.
* Le panneau de réglages (news/reglages.js) prévient ce composant par l'évènement « gastinel:prefs ».
* Si le fichier manque ou est invalide : le widget reste caché, la page ne casse pas.
*/
(function () {
'use strict';
/* Langue de la page (attribut lang), français par défaut. Textes de l'interface par langue (26/10). */
var LANG = String(document.documentElement.getAttribute('lang') || 'fr').slice(0, 2).toLowerCase();
var I18N = {
fr: { themes: ['Audiovisuel', 'Applications', 'Technique et projets', 'Mises à jour du site', 'Météo', 'Minecraft', 'Mind et IA', 'Hub et comptes', 'Vie locale à Lans'],
levels: ['Simple', 'Normal', 'Développeur'], locale: 'fr-FR', loading: 'Chargement des news…', none: 'Il n’y a pas encore de news.',
flux: function (lv, n) { return 'Ton flux : niveau ' + lv.toLowerCase() + ', ' + (n ? n + (n > 1 ? ' thèmes choisis' : ' thème choisi') : 'tous les thèmes') + '.'; },
change: 'Changer mon flux', count: function (n) { return n + (n > 1 ? ' news affichées.' : ' news affichée.'); },
empty: 'Aucune news pour les thèmes choisis. Change ton flux pour en voir plus.', error: 'Les news ne sont pas disponibles pour le moment. Reviens un peu plus tard.',
back: '← Toutes les news', latest: 'Dernières news', all: 'Toutes les news', emptyW: 'Aucune news pour tes thèmes pour le moment.' },
en: { themes: ['Audiovisual', 'Apps', 'Tech and projects', 'Site updates', 'Weather', 'Minecraft', 'Mind and AI', 'Hub and accounts', 'Local life in Lans'],
levels: ['Simple', 'Normal', 'Developer'], locale: 'en-GB', loading: 'Loading news…', none: 'No news yet.',
flux: function (lv, n) { return 'Your feed: ' + lv.toLowerCase() + ' level, ' + (n ? n + (n > 1 ? ' topics chosen' : ' topic chosen') : 'all topics') + '.'; },
change: 'Change my feed', count: function (n) { return n + (n > 1 ? ' news items shown.' : ' news item shown.'); },
empty: 'No news for the chosen topics. Change your feed to see more.', error: 'News is not available right now. Please come back a little later.',
back: '← All news', latest: 'Latest news', all: 'All news', emptyW: 'No news for your topics yet.' },
de: { themes: ['Audiovisuell', 'Apps', 'Technik und Projekte', 'Website-Updates', 'Wetter', 'Minecraft', 'Mind und KI', 'Hub und Konten', 'Lokales aus Lans'],
levels: ['Einfach', 'Normal', 'Entwickler'], locale: 'de-DE', loading: 'News werden geladen…', none: 'Noch keine News.',
flux: function (lv, n) { return 'Dein Feed: Stufe ' + lv + ', ' + (n ? n + (n > 1 ? ' Themen gewählt' : ' Thema gewählt') : 'alle Themen') + '.'; },
change: 'Feed ändern', count: function (n) { return n + ' News angezeigt.'; },
empty: 'Keine News für die gewählten Themen. Ändere deinen Feed, um mehr zu sehen.', error: 'Die News sind gerade nicht verfügbar. Schau etwas später wieder vorbei.',
back: '← Alle News', latest: 'Neueste News', all: 'Alle News', emptyW: 'Noch keine News für deine Themen.' },
it: { themes: ['Audiovisivo', 'App', 'Tecnica e progetti', 'Aggiornamenti del sito', 'Meteo', 'Minecraft', 'Mind e IA', 'Hub e account', 'Vita locale a Lans'],
levels: ['Semplice', 'Normale', 'Sviluppatore'], locale: 'it-IT', loading: 'Caricamento delle news…', none: 'Non ci sono ancora news.',
flux: function (lv, n) { return 'Il tuo feed: livello ' + lv.toLowerCase() + ', ' + (n ? n + (n > 1 ? ' temi scelti' : ' tema scelto') : 'tutti i temi') + '.'; },
change: 'Cambia il mio feed', count: function (n) { return n + ' news ' + (n > 1 ? 'mostrate.' : 'mostrata.'); },
empty: 'Nessuna news per i temi scelti. Cambia il feed per vederne di più.', error: 'Le news non sono disponibili al momento. Torna un po’ più tardi.',
back: '← Tutte le news', latest: 'Ultime news', all: 'Tutte le news', emptyW: 'Ancora nessuna news per i tuoi temi.' },
es: { themes: ['Audiovisual', 'Apps', 'Técnica y proyectos', 'Novedades del sitio', 'Tiempo', 'Minecraft', 'Mind e IA', 'Hub y cuentas', 'Vida local en Lans'],
levels: ['Simple', 'Normal', 'Desarrollador'], locale: 'es-ES', loading: 'Cargando las news…', none: 'Todavía no hay news.',
flux: function (lv, n) { return 'Tu feed: nivel ' + lv.toLowerCase() + ', ' + (n ? n + (n > 1 ? ' temas elegidos' : ' tema elegido') : 'todos los temas') + '.'; },
change: 'Cambiar mi feed', count: function (n) { return n + ' news ' + (n > 1 ? 'mostradas.' : 'mostrada.'); },
empty: 'No hay news para los temas elegidos. Cambia tu feed para ver más.', error: 'Las news no están disponibles por ahora. Vuelve un poco más tarde.',
back: '← Todas las news', latest: 'Últimas news', all: 'Todas las news', emptyW: 'Todavía no hay news para tus temas.' }
};
if (!Object.prototype.hasOwnProperty.call(I18N, LANG)) LANG = 'fr';
var TX = I18N[LANG];
var THEMES = {}, LEVELS = {};
['audiovisuel', 'applications', 'technique', 'site', 'meteo', 'minecraft', 'mind', 'hub', 'vie-locale'].forEach(function (k, i) { THEMES[k] = TX.themes[i]; });
['simple', 'normal', 'developpeur'].forEach(function (k, i) { LEVELS[k] = TX.levels[i]; });
var LEGACY = { 'application': 'applications' };
var STORE_KEY = 'gastinel-actus';
var DEFAULT_SRC = '/data/actus.json';
var NEWS_URL = LANG === 'fr' ? '/news/' : '/news/' + LANG + '/';
var has = function (o, k) { return Object.prototype.hasOwnProperty.call(o, k); };
/* ---------- Réglages (lecture seule ici) ---------- */
var prefs = readPrefs();
function normalizePrefs(p) {
var level = p && typeof p.level === 'string' && has(LEVELS, p.level) ? p.level : 'normal';
var themes = null; /* null = tous les thèmes */
if (p && Array.isArray(p.themes)) {
var list = p.themes.filter(function (t) { return typeof t === 'string' && has(THEMES, t); });
if (list.length) themes = list;
}
return { level: level, themes: themes };
}
function readPrefs() {
try {
var raw = window.localStorage.getItem(STORE_KEY);
return normalizePrefs(raw ? JSON.parse(raw) : null);
} catch (e) { return normalizePrefs(null); }
}
/* ---------- Utilitaires ---------- */
var CSS = '' +
'.actus-widget{background:#fafafa;border-top:1px solid #eaeaea;padding:48px 20px 72px;font-family:var(--font-sans,Inter,system-ui,sans-serif);color:#111}' +
'.actus-widget[hidden]{display:none}' +
'.actus-wrap{max-width:1120px;margin:0 auto}' +
'.actus-head{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:8px 16px;margin-bottom:22px}' +
'.actus-title{font-size:1.6rem;font-weight:700;letter-spacing:-.02em;margin:0;color:#111}' +
'.actus-all{font-weight:600;font-size:.95rem;color:#111;text-decoration:underline;text-underline-offset:3px;padding:8px 0}' +
'.actus-all:hover{color:#1e4d8b}' +
'.actus-all:focus-visible{outline:3px solid #1e4d8b;outline-offset:3px}' +
'.actus-list{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(3,1fr);gap:22px}' +
'.actus-list.actus-full{grid-template-columns:repeat(auto-fill,minmax(280px,1fr))}' +
'@media(max-width:900px){.actus-list{grid-template-columns:1fr}.actus-widget{padding:36px 16px 72px}}' +
'.actus-card{position:relative;display:flex;flex-direction:column;background:#fff;border:1px solid #d9d9d9;border-radius:8px;padding:22px 20px;height:100%;box-sizing:border-box}' +
'.actus-card:hover{border-color:#111;box-shadow:0 8px 22px rgba(0,0,0,.08)}' +
'.actus-card:focus-within{outline:3px solid #1e4d8b;outline-offset:2px}' +
'.actus-img{width:100%;aspect-ratio:16/9;object-fit:cover;border-radius:6px;margin:0 0 14px;background:#eee;display:block}' +
'.actus-meta{display:flex;flex-wrap:wrap;gap:8px 12px;align-items:center;margin-bottom:10px;font-size:.82rem}' +
'.actus-cat{background:#eceef1;color:#1a1d21;font-weight:700;padding:3px 10px;border-radius:4px;text-transform:uppercase;letter-spacing:.03em;font-size:.74rem}' +
'.actus-date{color:#4b5563}' +
'.actus-card-title{font-size:1.05rem;line-height:1.35;font-weight:700;margin:0 0 8px;color:#111}' +
'.actus-card-title a{color:inherit;text-decoration:none}' +
'.actus-card-title a::after{content:"";position:absolute;inset:0;border-radius:8px}' +
'.actus-card-title a:hover{text-decoration:underline}' +
'.actus-card-title a:focus-visible{outline:none}' +
'.actus-sum{margin:0;color:#3f4650;font-size:.92rem;line-height:1.55}' +
'.actus-flux{display:flex;flex-wrap:wrap;align-items:center;gap:8px 14px;margin:0 0 16px;font-size:.95rem;color:#3f4650}' +
'.actus-flux-btn{font:inherit;font-size:.9rem;font-weight:600;padding:9px 16px;min-height:44px;border-radius:999px;border:2px solid #242424;background:#fff;color:#242424;cursor:pointer}' +
'.actus-flux-btn:hover{background:#eceef1}' +
'.actus-flux-btn:focus-visible{outline:3px solid #1e4d8b;outline-offset:3px}' +
'.actus-status{margin:0 0 16px;color:#4b5563;font-size:.92rem}';
function injectCss() {
if (document.getElementById('actus-css')) return;
var s = document.createElement('style');
s.id = 'actus-css';
s.textContent = CSS;
document.head.appendChild(s);
}
function el(tag, cls, text) {
var e = document.createElement(tag);
if (cls) e.className = cls;
if (text != null) e.textContent = text;
return e;
}
/* Seuls les liens relatifs (/...) et https sont acceptés. */
function safeUrl(u) {
if (typeof u !== 'string') return '';
return (/^\/(?!\/)/.test(u) || /^https:\/\//i.test(u)) ? u : '';
}
function str(v) { return typeof v === 'string' ? v.trim() : ''; }
/* Lit une version {title,text} ; renvoie null si inutilisable. */
function readVersion(v) {
if (!v || typeof v !== 'object') return null;
var t = str(v.title), x = str(v.text);
return (t || x) ? { title: t, text: x } : null;
}
function firstSentence(t) {
var m = t.match(/^.*?[.!?](\s|$)/);
var s = (m ? m[0] : t).trim();
return s.length > 160 ? s.slice(0, 159).replace(/\s+\S*$/, '') + '…' : s;
}
/* Garde les entrées au bon format. Accepte aussi l'ancien format (category + summary). */
function clean(raw) {
if (!Array.isArray(raw)) return [];
var out = [];
raw.forEach(function (n) {
if (!n || typeof n !== 'object') return;
if (typeof n.date !== 'string' || !/^\d{4}-\d{2}-\d{2}$/.test(n.date)) return;
var levels = {};
/* Traduction de l'article si elle existe (champ i18n.<langue>), sinon le français. */
var tr = LANG !== 'fr' && n.i18n && typeof n.i18n === 'object' && n.i18n[LANG] && typeof n.i18n[LANG] === 'object' ? n.i18n[LANG] : null;
if (tr) n = { id: n.id, date: n.date, themes: n.themes, link: n.link, image: n.image, imageAlt: n.imageAlt, short: tr.short, levels: tr.levels };
if (n.levels && typeof n.levels === 'object') {
Object.keys(LEVELS).forEach(function (k) { var v = readVersion(n.levels[k]); if (v) levels[k] = v; });
} else if (str(n.title)) { /* ancien format */
levels.normal = { title: str(n.title), text: str(n.summary) };
}
var normal = levels.normal;
if (!normal || !normal.title) return; /* « normal » est obligatoire */
var themes = [];
var src = Array.isArray(n.themes) ? n.themes : [n.category];
src.forEach(function (t) {
t = has(LEGACY, t) ? LEGACY[t] : t;
if (typeof t === 'string' && has(THEMES, t) && themes.indexOf(t) < 0) themes.push(t);
});
if (!themes.length) return;
var short = readVersion(n.short) || { title: normal.title, text: firstSentence(normal.text) };
if (!short.title) short.title = normal.title;
out.push({
id: n.id, date: n.date, themes: themes, levels: levels, short: short,
link: safeUrl(n.link), image: safeUrl(n.image), imageAlt: typeof n.imageAlt === 'string' ? n.imageAlt : ''
});
});
out.sort(function (a, b) {
if (a.date !== b.date) return a.date < b.date ? 1 : -1;
return (Number(b.id) || 0) - (Number(a.id) || 0);
});
return out;
}
/* Version du bon niveau ; repli sur « normal » si elle manque, titre compris. */
function versionFor(n, level) {
var v = n.levels[level] || n.levels.normal;
return { title: v.title || n.levels.normal.title, text: v.text || n.levels.normal.text };
}
function matches(n) {
if (!prefs.themes) return true;
return n.themes.some(function (t) { return prefs.themes.indexOf(t) >= 0; });
}
function fmtDate(iso) {
try {
return new Date(iso + 'T12:00:00').toLocaleDateString(TX.locale, { day: 'numeric', month: 'long', year: 'numeric' });
} catch (e) { return iso; }
}
function card(n, mode) {
var full = mode === 'full';
var v = full ? versionFor(n, prefs.level) : n.short;
var li = el('li');
var art = el('article', 'actus-card');
if (full && n.image) {
var img = el('img', 'actus-img');
img.src = n.image; img.alt = n.imageAlt; img.loading = 'lazy'; img.decoding = 'async';
img.onerror = function () { img.remove(); };
art.appendChild(img);
}
var meta = el('div', 'actus-meta');
n.themes.forEach(function (t) { meta.appendChild(el('span', 'actus-cat', THEMES[t])); });
var d = el('time', 'actus-date', fmtDate(n.date));
d.setAttribute('datetime', n.date);
meta.appendChild(d);
art.appendChild(meta);
var h = el('h3', 'actus-card-title');
if (full) { /* page News : le titre ouvre l'article en grand */
var ao = el('a', null, v.title);
ao.href = '#n-' + n.id;
h.appendChild(ao);
} else if (n.link) {
var a = el('a', null, v.title);
a.href = n.link;
if (/^https:/i.test(n.link)) a.rel = 'noopener';
h.appendChild(a);
} else {
h.textContent = v.title;
}
art.appendChild(h);
if (v.text) art.appendChild(el('p', 'actus-sum', v.text));
li.appendChild(art);
return li;
}
function load(src) {
return fetch(src, { credentials: 'same-origin' })
.then(function (r) { if (!r.ok) throw new Error('HTTP ' + r.status); return r.json(); })
.then(clean);
}
function describe() {
return TX.flux(LEVELS[prefs.level], prefs.themes ? prefs.themes.length : 0);
}
function onPrefs(fn) {
document.addEventListener('gastinel:prefs', function (e) {
prefs = normalizePrefs(e && e.detail ? e.detail : readPrefs());
fn();
});
}
/* ---------- Widget ---------- */
function initWidget(root) {
injectCss();
var items = [];
var wrap = null, ul = null, empty = null;
function render() {
var shown = items.filter(matches);
ul.textContent = '';
shown.slice(0, 3).forEach(function (n) { ul.appendChild(card(n, 'short')); });
empty.hidden = shown.length > 0;
}
load(root.getAttribute('data-src') || DEFAULT_SRC).then(function (list) {
if (!list.length) return; /* rien à montrer : reste caché */
items = list;
root.className = 'actus-widget';
root.setAttribute('aria-labelledby', 'actus-widget-title');
wrap = el('div', 'actus-wrap');
var head = el('div', 'actus-head');
var h = el('h2', 'actus-title', TX.latest);
h.id = 'actus-widget-title';
head.appendChild(h);
var all = el('a', 'actus-all', TX.all);
all.href = NEWS_URL;
head.appendChild(all);
wrap.appendChild(head);
empty = el('p', 'actus-status', TX.emptyW);
empty.hidden = true;
wrap.appendChild(empty);
ul = el('ul', 'actus-list');
wrap.appendChild(ul);
root.appendChild(wrap);
render();
root.hidden = false;
onPrefs(render);
}).catch(function () { /* fichier absent ou invalide : le widget reste caché */ });
}
/* ---------- Page de liste ---------- */
function initList(root) {
injectCss();
root.classList.add('actus-wrap');
var status = el('p', 'actus-status');
status.setAttribute('role', 'status');
status.setAttribute('aria-live', 'polite');
status.textContent = TX.loading;
root.appendChild(status);
load(root.getAttribute('data-src') || DEFAULT_SRC).then(function (items) {
if (!items.length) { status.textContent = TX.none; return; }
var bar = el('div', 'actus-flux');
var info = el('span', 'actus-flux-info');
info.id = 'actus-flux-info';
bar.appendChild(info);
var btn = el('button', 'actus-flux-btn', TX.change);
btn.type = 'button';
btn.setAttribute('data-actus-open-settings', '');
btn.addEventListener('click', function () {
document.dispatchEvent(new CustomEvent('gastinel:open-reglages'));
});
bar.appendChild(btn);
var ul = el('ul', 'actus-list actus-full');
root.insertBefore(bar, status);
root.appendChild(ul);
/* Article ouvert en grand : adresse « #n-<id> » (retour avec le bouton ou le retour du navigateur). */
var view = el('article', 'actus-article'); view.style.display = 'none';
root.appendChild(view);
function article(n) {
var v = versionFor(n, prefs.level);
view.textContent = '';
var back = el('a', 'actus-back', TX.back); back.href = '#';
view.appendChild(back);
var meta = el('div', 'actus-meta');
n.themes.forEach(function (t) { meta.appendChild(el('span', 'actus-cat', THEMES[t])); });
var d = el('time', 'actus-date', fmtDate(n.date)); d.setAttribute('datetime', n.date);
meta.appendChild(d); view.appendChild(meta);
view.appendChild(el('h2', 'actus-article-title', v.title));
if (n.image) { var img = el('img', 'actus-article-img'); img.src = n.image; img.alt = n.imageAlt; view.appendChild(img); }
if (v.text) view.appendChild(el('p', 'actus-article-text', v.text));
}
function route() {
var m = /^#n-(.+)$/.exec(location.hash);
var n = m ? items.filter(function (x) { return String(x.id) === decodeURIComponent(m[1]); })[0] : null;
view.style.display = n ? '' : 'none';
[bar, ul, status].forEach(function (x) { x.style.display = n ? 'none' : ''; });
if (n) { article(n); window.scrollTo(0, 0); var t = view.querySelector('h2'); if (t) { t.tabIndex = -1; t.focus({ preventScroll: true }); } }
}
window.addEventListener('hashchange', route);
function render() {
ul.textContent = '';
var shown = items.filter(matches);
shown.forEach(function (n) { ul.appendChild(card(n, 'full')); });
info.textContent = describe();
status.textContent = shown.length === 0 ? TX.empty : TX.count(shown.length);
route();
}
render();
onPrefs(render);
}).catch(function () {
status.textContent = TX.error;
});
}
function start() {
Array.prototype.forEach.call(document.querySelectorAll('[data-actus-widget]'), initWidget);
Array.prototype.forEach.call(document.querySelectorAll('[data-actus-list]'), initList);
}
if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', start); else start();
})();
+89
Voir le fichier
@@ -0,0 +1,89 @@
<!DOCTYPE html>
<html lang="de" data-news>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>News — Théo Gastinel: Videos, Projekte und Apps</title>
<meta name="description" content="Alle News von Théo Gastinel: neue Videos und Fotos, technische Projekte, App-Veröffentlichungen und Website-Updates.">
<link rel="canonical" href="https://gastinel.me/news/de/">
<meta name="robots" content="index, follow">
<meta name="author" content="Théo Gastinel">
<meta property="og:type" content="website">
<meta property="og:locale" content="de_DE">
<meta property="og:url" content="https://gastinel.me/news/de/">
<meta property="og:site_name" content="Théo Gastinel">
<meta property="og:title" content="News — Théo Gastinel: Videos, Projekte und Apps">
<meta property="og:description" content="Alle News von Théo Gastinel: neue Videos und Fotos, technische Projekte, App-Veröffentlichungen und Website-Updates.">
<meta property="og:image" content="https://gastinel.me/assets/img/dji-fly-20250919-194610-0004-1758304172909-photo.webp">
<meta property="og:image:alt" content="Ciel orangé au crépuscule sur le plateau du Vercors, vu du drone">
<meta name="twitter:card" content="summary_large_image">
<link rel="icon" type="image/svg+xml" href="/favicon.svg">
<link rel="icon" href="/favicon.ico" sizes="any">
<script type="application/ld+json">
{"@context":"https://schema.org","@graph":[
{"@type":"CollectionPage","@id":"https://gastinel.me/news/de/#page","url":"https://gastinel.me/news/de/","name":"News","inLanguage":"fr-FR","isPartOf":{"@id":"https://gastinel.me/#website"}},
{"@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https://gastinel.me/"},{"@type":"ListItem","position":2,"name":"News","item":"https://gastinel.me/news/de/"}]}
]}
</script>
<style>
@font-face{font-family:Inter;font-weight:400 700;font-display:swap;src:url(/assets/fonts/inter-latin.woff2) format("woff2")}
:root{--bg:#fff;--tx:#1a1d21;--mu:#4b5563;--ac:#1e4d8b;--ln:#e5e7eb;--font-sans:Inter,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif}
*{box-sizing:border-box}html,body{height:100%}body{display:flex;flex-direction:column;min-height:100vh;margin:0;background:var(--bg);color:var(--tx);font:18px/1.7 var(--font-sans)}
nav{display:flex;gap:6px;flex-wrap:wrap;padding:12px 18px;border-bottom:1px solid var(--ln)}
nav a{color:var(--tx);text-decoration:none;padding:8px 12px;border-radius:6px;font-weight:500}
nav a[aria-current]{background:var(--ln)}nav a:hover{text-decoration:underline}
nav a:focus-visible{outline:3px solid var(--ac);outline-offset:2px}
main{flex:1 0 auto;width:100%;max-width:1120px;margin:0 auto;padding:28px 18px 56px}
h1{font-size:1.9rem;line-height:1.25;margin:.2em 0 .4em}
a{color:var(--ac)}.lead{font-size:1.1rem;color:var(--mu);max-width:42rem;margin:0 0 1.2em}
.note{background:#fff4d6;border-left:4px solid #e0b100;padding:12px 16px;border-radius:4px;margin:0 0 1.5em;max-width:42rem;font-size:.95rem}
/* Article ouvert en grand */
.actus-article{max-width:46rem;margin:0 auto}
.actus-back{display:inline-block;margin:0 0 24px;font-weight:600;text-decoration:none}
.actus-back:hover{text-decoration:underline}
.actus-article-title{font-size:2.4rem;line-height:1.2;margin:.3em 0 .6em;outline:none}
.actus-article-img{width:100%;height:auto;margin:0 0 1.2em}
.actus-article-text{font-size:1.3rem;line-height:1.75;margin:0}
@media(max-width:600px){.actus-article-title{font-size:1.8rem}.actus-article-text{font-size:1.15rem}}
/* Pied de page identique au site principal (26/10) */
.global-footer { background:#242424; color:#d1d1d1; padding:60px 20px 30px; border-top:4px solid #111; font-size:.9rem; line-height:1.8; font-family:var(--font-sans); }
.global-footer .footer-content { max-width:1000px; margin:0 auto; display:grid; grid-template-columns:1fr 1fr; gap:40px; }
.global-footer h4 { font-family:var(--font-sans); text-transform:uppercase; letter-spacing:1px; margin-top:0; color:#fff; border-bottom:1px solid #444; padding-bottom:10px; }
.global-footer ul { list-style:none; padding:0; margin:0; }
.global-footer li { margin-bottom:8px; }
.global-footer a { color:#a8b2bd; text-decoration:none; transition:color .3s; font-weight:600; }
.global-footer a:hover { color:#fff; text-decoration:underline; }
.global-footer .footer-bottom { text-align:center; border-top:1px solid #333; margin-top:40px; padding-top:20px; font-size:.8rem; color:#888; }
@media (max-width:768px){ .global-footer .footer-content{ grid-template-columns:1fr; gap:30px; } }
.svg-icon { width:1em; height:1em; fill:currentColor; display:inline-block; vertical-align:-.125em; }
</style>
</head>
<body>
<nav aria-label="Menu"><a href="/de/" data-main>Startseite</a></nav>
<main>
<h1>News</h1>
<p class="lead">Hier findest du die neuesten Neuigkeiten: Videos und Fotos, technische Projekte, App-Veröffentlichungen und Website-Updates.</p>
<div data-actus-list></div>
<noscript><p>Diese Seite braucht JavaScript, um die News anzuzeigen.</p></noscript>
</main>
<footer class="global-footer">
<div class="footer-content">
<div class="footer-col"><h4>Kontakt</h4><ul>
<li><svg class="svg-icon" viewBox="0 0 512 512" style="margin-right:8px;color:#a8b2bd;" aria-hidden="true"><path d="M48 64C21.5 64 0 85.5 0 112c0 15.1 7.1 29.3 19.2 38.4L236.8 313.6c11.4 8.5 27 8.5 38.4 0L492.8 150.4c12.1-9.1 19.2-23.3 19.2-38.4c0-26.5-21.5-48-48-48H48zM0 176V384c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V176L294.4 339.2c-22.8 17.1-54 17.1-76.8 0L0 176z"/></svg> <a href="mailto:studio@gastinel.me">studio@gastinel.me</a></li>
<li><svg class="svg-icon" viewBox="0 0 448 512" style="margin-right:8px;color:#a8b2bd;" aria-hidden="true"><path d="M380.9 97.1C339 55.1 283.2 32 223.9 32c-122.4 0-222 99.6-222 222 0 39.1 10.2 77.3 29.6 111L0 480l117.7-30.9c32.4 17.7 68.9 27 106.1 27h.1c122.3 0 224.1-99.6 224.1-222 0-59.3-25.2-115-67.1-157zm-157 341.6c-33.2 0-65.7-8.9-94-25.7l-6.7-4-69.8 18.3L72 359.2l-4.4-7c-18.5-29.4-28.2-63.3-28.2-98.2 0-101.7 82.8-184.5 184.6-184.5 49.3 0 95.6 19.2 130.4 54.1 34.8 34.9 56.2 81.2 56.1 130.5 0 101.8-84.9 184.6-186.6 184.6zm101.2-138.2c-5.5-2.8-32.8-16.2-37.9-18-5.1-1.9-8.8-2.8-12.5 2.8-3.7 5.6-14.3 18-17.6 21.8-3.2 3.7-6.5 4.2-12 1.4-32.6-16.3-54-29.1-75.5-66-5.7-9.8 5.7-9.1 16.3-30.3 1.8-3.7.9-6.9-.5-9.7-1.4-2.8-12.5-30.1-17.1-41.2-4.5-10.8-9.1-9.3-12.5-9.5-3.2-.2-6.9-.2-10.6-.2-3.7 0-9.7 1.4-14.8 6.9-5.1 5.6-19.4 19-19.4 46.3 0 27.3 19.9 53.7 22.6 57.4 2.8 3.7 39.1 59.7 94.8 83.8 35.2 15.2 49 16.5 66.6 13.9 10.7-1.6 32.8-13.4 37.4-26.4 4.6-13 4.6-24.1 3.2-26.4-1.3-2.5-5-3.9-10.5-6.6z"/></svg> <strong>WhatsApp:</strong> <a href="https://wa.me/message/XAHBYTJZNQ6TK1">06 36 27 64 19</a></li>
<li><svg class="svg-icon" viewBox="0 0 512 512" style="margin-right:8px;color:#a8b2bd;" aria-hidden="true"><path d="M164.9 24.6c-7.7-18.6-28-28.5-47.4-23.2l-88 24C12.1 30.2 0 46 0 64C0 311.4 200.6 512 448 512c18 0 33.8-12.1 38.6-29.5l24-88c5.3-19.4-4.6-39.7-23.2-47.4l-96-40c-16.3-6.8-35.2-2.1-46.3 11.6L304.7 368C234.3 334.7 177.3 277.7 144 207.3L193.3 167c13.7-11.2 18.4-30 11.6-46.3l-40-96z"/></svg> <strong>Telefon:</strong> <a href="tel:0636276419">06 36 27 64 19</a></li>
</ul></div>
<div class="footer-col"><h4>Zeiten &amp; Infos</h4><ul>
<li><strong>Woche (Mo–Fr):</strong> Je nach Zeitplan</li>
<li><strong>Wochenende &amp; Feiertage:</strong> 10h - 20h</li>
<li><strong>Verfügbarkeit:</strong> Erreichbar innerhalb von 48 Std. (WhatsApp &amp; E-Mail bei jeder Frage)</li>
<li style="margin-top:15px;"><strong>SIRET-Nummer:</strong> <a href="https://entreprises.lefigaro.fr/nd-38/entreprise-104816749"> 10481674900014</a></li>
</ul></div>
</div>
<div class="footer-bottom">© 2026 THÉO - VISUELLE LÖSUNGEN &amp; OPTISCHE AUFNAHME | <a href="/de/#legal-cgv" data-main style="color:white;">Allgemeine Bedingungen der Website</a> | <a href="/de/#legal-rgpd" data-main style="color:white;">Datenschutz (DSGVO)</a> | <a href="/de/#legal-mentions" data-main style="color:white;">Impressum / Rechtliche Hinweise</a></div>
</footer>
<script src="/news/actus.js" defer></script>
<script src="/news/reglages.js" defer></script>
<script src="/news/newsletter.js" defer></script>
</body>
</html>
+89
Voir le fichier
@@ -0,0 +1,89 @@
<!DOCTYPE html>
<html lang="en" data-news>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>News — Théo Gastinel: videos, projects and apps</title>
<meta name="description" content="All the news from Théo Gastinel: new videos and photos, technical projects, app releases and site updates.">
<link rel="canonical" href="https://gastinel.me/news/en/">
<meta name="robots" content="index, follow">
<meta name="author" content="Théo Gastinel">
<meta property="og:type" content="website">
<meta property="og:locale" content="en_GB">
<meta property="og:url" content="https://gastinel.me/news/en/">
<meta property="og:site_name" content="Théo Gastinel">
<meta property="og:title" content="News — Théo Gastinel: videos, projects and apps">
<meta property="og:description" content="All the news from Théo Gastinel: new videos and photos, technical projects, app releases and site updates.">
<meta property="og:image" content="https://gastinel.me/assets/img/dji-fly-20250919-194610-0004-1758304172909-photo.webp">
<meta property="og:image:alt" content="Ciel orangé au crépuscule sur le plateau du Vercors, vu du drone">
<meta name="twitter:card" content="summary_large_image">
<link rel="icon" type="image/svg+xml" href="/favicon.svg">
<link rel="icon" href="/favicon.ico" sizes="any">
<script type="application/ld+json">
{"@context":"https://schema.org","@graph":[
{"@type":"CollectionPage","@id":"https://gastinel.me/news/en/#page","url":"https://gastinel.me/news/en/","name":"News","inLanguage":"fr-FR","isPartOf":{"@id":"https://gastinel.me/#website"}},
{"@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https://gastinel.me/"},{"@type":"ListItem","position":2,"name":"News","item":"https://gastinel.me/news/en/"}]}
]}
</script>
<style>
@font-face{font-family:Inter;font-weight:400 700;font-display:swap;src:url(/assets/fonts/inter-latin.woff2) format("woff2")}
:root{--bg:#fff;--tx:#1a1d21;--mu:#4b5563;--ac:#1e4d8b;--ln:#e5e7eb;--font-sans:Inter,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif}
*{box-sizing:border-box}html,body{height:100%}body{display:flex;flex-direction:column;min-height:100vh;margin:0;background:var(--bg);color:var(--tx);font:18px/1.7 var(--font-sans)}
nav{display:flex;gap:6px;flex-wrap:wrap;padding:12px 18px;border-bottom:1px solid var(--ln)}
nav a{color:var(--tx);text-decoration:none;padding:8px 12px;border-radius:6px;font-weight:500}
nav a[aria-current]{background:var(--ln)}nav a:hover{text-decoration:underline}
nav a:focus-visible{outline:3px solid var(--ac);outline-offset:2px}
main{flex:1 0 auto;width:100%;max-width:1120px;margin:0 auto;padding:28px 18px 56px}
h1{font-size:1.9rem;line-height:1.25;margin:.2em 0 .4em}
a{color:var(--ac)}.lead{font-size:1.1rem;color:var(--mu);max-width:42rem;margin:0 0 1.2em}
.note{background:#fff4d6;border-left:4px solid #e0b100;padding:12px 16px;border-radius:4px;margin:0 0 1.5em;max-width:42rem;font-size:.95rem}
/* Article ouvert en grand */
.actus-article{max-width:46rem;margin:0 auto}
.actus-back{display:inline-block;margin:0 0 24px;font-weight:600;text-decoration:none}
.actus-back:hover{text-decoration:underline}
.actus-article-title{font-size:2.4rem;line-height:1.2;margin:.3em 0 .6em;outline:none}
.actus-article-img{width:100%;height:auto;margin:0 0 1.2em}
.actus-article-text{font-size:1.3rem;line-height:1.75;margin:0}
@media(max-width:600px){.actus-article-title{font-size:1.8rem}.actus-article-text{font-size:1.15rem}}
/* Pied de page identique au site principal (26/10) */
.global-footer { background:#242424; color:#d1d1d1; padding:60px 20px 30px; border-top:4px solid #111; font-size:.9rem; line-height:1.8; font-family:var(--font-sans); }
.global-footer .footer-content { max-width:1000px; margin:0 auto; display:grid; grid-template-columns:1fr 1fr; gap:40px; }
.global-footer h4 { font-family:var(--font-sans); text-transform:uppercase; letter-spacing:1px; margin-top:0; color:#fff; border-bottom:1px solid #444; padding-bottom:10px; }
.global-footer ul { list-style:none; padding:0; margin:0; }
.global-footer li { margin-bottom:8px; }
.global-footer a { color:#a8b2bd; text-decoration:none; transition:color .3s; font-weight:600; }
.global-footer a:hover { color:#fff; text-decoration:underline; }
.global-footer .footer-bottom { text-align:center; border-top:1px solid #333; margin-top:40px; padding-top:20px; font-size:.8rem; color:#888; }
@media (max-width:768px){ .global-footer .footer-content{ grid-template-columns:1fr; gap:30px; } }
.svg-icon { width:1em; height:1em; fill:currentColor; display:inline-block; vertical-align:-.125em; }
</style>
</head>
<body>
<nav aria-label="Menu"><a href="/en/" data-main>Home</a></nav>
<main>
<h1>News</h1>
<p class="lead">Here you will find the latest updates: videos and photos, technical projects, app releases and site updates.</p>
<div data-actus-list></div>
<noscript><p>This page needs JavaScript to show the news.</p></noscript>
</main>
<footer class="global-footer">
<div class="footer-content">
<div class="footer-col"><h4>Contact</h4><ul>
<li><svg class="svg-icon" viewBox="0 0 512 512" style="margin-right:8px;color:#a8b2bd;" aria-hidden="true"><path d="M48 64C21.5 64 0 85.5 0 112c0 15.1 7.1 29.3 19.2 38.4L236.8 313.6c11.4 8.5 27 8.5 38.4 0L492.8 150.4c12.1-9.1 19.2-23.3 19.2-38.4c0-26.5-21.5-48-48-48H48zM0 176V384c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V176L294.4 339.2c-22.8 17.1-54 17.1-76.8 0L0 176z"/></svg> <a href="mailto:studio@gastinel.me">studio@gastinel.me</a></li>
<li><svg class="svg-icon" viewBox="0 0 448 512" style="margin-right:8px;color:#a8b2bd;" aria-hidden="true"><path d="M380.9 97.1C339 55.1 283.2 32 223.9 32c-122.4 0-222 99.6-222 222 0 39.1 10.2 77.3 29.6 111L0 480l117.7-30.9c32.4 17.7 68.9 27 106.1 27h.1c122.3 0 224.1-99.6 224.1-222 0-59.3-25.2-115-67.1-157zm-157 341.6c-33.2 0-65.7-8.9-94-25.7l-6.7-4-69.8 18.3L72 359.2l-4.4-7c-18.5-29.4-28.2-63.3-28.2-98.2 0-101.7 82.8-184.5 184.6-184.5 49.3 0 95.6 19.2 130.4 54.1 34.8 34.9 56.2 81.2 56.1 130.5 0 101.8-84.9 184.6-186.6 184.6zm101.2-138.2c-5.5-2.8-32.8-16.2-37.9-18-5.1-1.9-8.8-2.8-12.5 2.8-3.7 5.6-14.3 18-17.6 21.8-3.2 3.7-6.5 4.2-12 1.4-32.6-16.3-54-29.1-75.5-66-5.7-9.8 5.7-9.1 16.3-30.3 1.8-3.7.9-6.9-.5-9.7-1.4-2.8-12.5-30.1-17.1-41.2-4.5-10.8-9.1-9.3-12.5-9.5-3.2-.2-6.9-.2-10.6-.2-3.7 0-9.7 1.4-14.8 6.9-5.1 5.6-19.4 19-19.4 46.3 0 27.3 19.9 53.7 22.6 57.4 2.8 3.7 39.1 59.7 94.8 83.8 35.2 15.2 49 16.5 66.6 13.9 10.7-1.6 32.8-13.4 37.4-26.4 4.6-13 4.6-24.1 3.2-26.4-1.3-2.5-5-3.9-10.5-6.6z"/></svg> <strong>WhatsApp :</strong> <a href="https://wa.me/message/XAHBYTJZNQ6TK1">06 36 27 64 19</a></li>
<li><svg class="svg-icon" viewBox="0 0 512 512" style="margin-right:8px;color:#a8b2bd;" aria-hidden="true"><path d="M164.9 24.6c-7.7-18.6-28-28.5-47.4-23.2l-88 24C12.1 30.2 0 46 0 64C0 311.4 200.6 512 448 512c18 0 33.8-12.1 38.6-29.5l24-88c5.3-19.4-4.6-39.7-23.2-47.4l-96-40c-16.3-6.8-35.2-2.1-46.3 11.6L304.7 368C234.3 334.7 177.3 277.7 144 207.3L193.3 167c13.7-11.2 18.4-30 11.6-46.3l-40-96z"/></svg> <strong>Telephone:</strong> <a href="tel:0636276419">06 36 27 64 19</a></li>
</ul></div>
<div class="footer-col"><h4>Hours &amp; Info</h4><ul>
<li><strong>Weekdays (Mon-Fri):</strong> Depending on schedule</li>
<li><strong>Weekends &amp; holidays:</strong> 10am - 8pm</li>
<li><strong>Availability:</strong> Reachable within 48h (WhatsApp &amp; email for any question)</li>
<li style="margin-top:15px;"><strong>SIRET number:</strong> <a href="https://entreprises.lefigaro.fr/nd-38/entreprise-104816749"> 10481674900014</a></li>
</ul></div>
</div>
<div class="footer-bottom">© 2026 THÉO - VISUAL SOLUTIONS &amp; OPTICAL ACQUISITION | <a href="/en/#legal-cgv" data-main style="color:white;">Site terms and conditions</a> | <a href="/en/#legal-rgpd" data-main style="color:white;">Privacy (GDPR)</a> | <a href="/en/#legal-mentions" data-main style="color:white;">Legal notice</a></div>
</footer>
<script src="/news/actus.js" defer></script>
<script src="/news/reglages.js" defer></script>
<script src="/news/newsletter.js" defer></script>
</body>
</html>
+89
Voir le fichier
@@ -0,0 +1,89 @@
<!DOCTYPE html>
<html lang="es" data-news>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>News — Théo Gastinel: vídeos, proyectos y aplicaciones</title>
<meta name="description" content="Todas las news de Théo Gastinel: nuevos vídeos y fotos, proyectos técnicos, lanzamientos de apps y novedades del sitio.">
<link rel="canonical" href="https://gastinel.me/news/es/">
<meta name="robots" content="index, follow">
<meta name="author" content="Théo Gastinel">
<meta property="og:type" content="website">
<meta property="og:locale" content="es_ES">
<meta property="og:url" content="https://gastinel.me/news/es/">
<meta property="og:site_name" content="Théo Gastinel">
<meta property="og:title" content="News — Théo Gastinel: vídeos, proyectos y aplicaciones">
<meta property="og:description" content="Todas las news de Théo Gastinel: nuevos vídeos y fotos, proyectos técnicos, lanzamientos de apps y novedades del sitio.">
<meta property="og:image" content="https://gastinel.me/assets/img/dji-fly-20250919-194610-0004-1758304172909-photo.webp">
<meta property="og:image:alt" content="Ciel orangé au crépuscule sur le plateau du Vercors, vu du drone">
<meta name="twitter:card" content="summary_large_image">
<link rel="icon" type="image/svg+xml" href="/favicon.svg">
<link rel="icon" href="/favicon.ico" sizes="any">
<script type="application/ld+json">
{"@context":"https://schema.org","@graph":[
{"@type":"CollectionPage","@id":"https://gastinel.me/news/es/#page","url":"https://gastinel.me/news/es/","name":"News","inLanguage":"fr-FR","isPartOf":{"@id":"https://gastinel.me/#website"}},
{"@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https://gastinel.me/"},{"@type":"ListItem","position":2,"name":"News","item":"https://gastinel.me/news/es/"}]}
]}
</script>
<style>
@font-face{font-family:Inter;font-weight:400 700;font-display:swap;src:url(/assets/fonts/inter-latin.woff2) format("woff2")}
:root{--bg:#fff;--tx:#1a1d21;--mu:#4b5563;--ac:#1e4d8b;--ln:#e5e7eb;--font-sans:Inter,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif}
*{box-sizing:border-box}html,body{height:100%}body{display:flex;flex-direction:column;min-height:100vh;margin:0;background:var(--bg);color:var(--tx);font:18px/1.7 var(--font-sans)}
nav{display:flex;gap:6px;flex-wrap:wrap;padding:12px 18px;border-bottom:1px solid var(--ln)}
nav a{color:var(--tx);text-decoration:none;padding:8px 12px;border-radius:6px;font-weight:500}
nav a[aria-current]{background:var(--ln)}nav a:hover{text-decoration:underline}
nav a:focus-visible{outline:3px solid var(--ac);outline-offset:2px}
main{flex:1 0 auto;width:100%;max-width:1120px;margin:0 auto;padding:28px 18px 56px}
h1{font-size:1.9rem;line-height:1.25;margin:.2em 0 .4em}
a{color:var(--ac)}.lead{font-size:1.1rem;color:var(--mu);max-width:42rem;margin:0 0 1.2em}
.note{background:#fff4d6;border-left:4px solid #e0b100;padding:12px 16px;border-radius:4px;margin:0 0 1.5em;max-width:42rem;font-size:.95rem}
/* Article ouvert en grand */
.actus-article{max-width:46rem;margin:0 auto}
.actus-back{display:inline-block;margin:0 0 24px;font-weight:600;text-decoration:none}
.actus-back:hover{text-decoration:underline}
.actus-article-title{font-size:2.4rem;line-height:1.2;margin:.3em 0 .6em;outline:none}
.actus-article-img{width:100%;height:auto;margin:0 0 1.2em}
.actus-article-text{font-size:1.3rem;line-height:1.75;margin:0}
@media(max-width:600px){.actus-article-title{font-size:1.8rem}.actus-article-text{font-size:1.15rem}}
/* Pied de page identique au site principal (26/10) */
.global-footer { background:#242424; color:#d1d1d1; padding:60px 20px 30px; border-top:4px solid #111; font-size:.9rem; line-height:1.8; font-family:var(--font-sans); }
.global-footer .footer-content { max-width:1000px; margin:0 auto; display:grid; grid-template-columns:1fr 1fr; gap:40px; }
.global-footer h4 { font-family:var(--font-sans); text-transform:uppercase; letter-spacing:1px; margin-top:0; color:#fff; border-bottom:1px solid #444; padding-bottom:10px; }
.global-footer ul { list-style:none; padding:0; margin:0; }
.global-footer li { margin-bottom:8px; }
.global-footer a { color:#a8b2bd; text-decoration:none; transition:color .3s; font-weight:600; }
.global-footer a:hover { color:#fff; text-decoration:underline; }
.global-footer .footer-bottom { text-align:center; border-top:1px solid #333; margin-top:40px; padding-top:20px; font-size:.8rem; color:#888; }
@media (max-width:768px){ .global-footer .footer-content{ grid-template-columns:1fr; gap:30px; } }
.svg-icon { width:1em; height:1em; fill:currentColor; display:inline-block; vertical-align:-.125em; }
</style>
</head>
<body>
<nav aria-label="Menu"><a href="/es/" data-main>Inicio</a></nav>
<main>
<h1>News</h1>
<p class="lead">Aquí encontrarás las últimas novedades: vídeos y fotos, proyectos técnicos, lanzamientos de apps y novedades del sitio.</p>
<div data-actus-list></div>
<noscript><p>Esta página necesita JavaScript para mostrar las news.</p></noscript>
</main>
<footer class="global-footer">
<div class="footer-content">
<div class="footer-col"><h4>Contacto</h4><ul>
<li><svg class="svg-icon" viewBox="0 0 512 512" style="margin-right:8px;color:#a8b2bd;" aria-hidden="true"><path d="M48 64C21.5 64 0 85.5 0 112c0 15.1 7.1 29.3 19.2 38.4L236.8 313.6c11.4 8.5 27 8.5 38.4 0L492.8 150.4c12.1-9.1 19.2-23.3 19.2-38.4c0-26.5-21.5-48-48-48H48zM0 176V384c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V176L294.4 339.2c-22.8 17.1-54 17.1-76.8 0L0 176z"/></svg> <a href="mailto:studio@gastinel.me">studio@gastinel.me</a></li>
<li><svg class="svg-icon" viewBox="0 0 448 512" style="margin-right:8px;color:#a8b2bd;" aria-hidden="true"><path d="M380.9 97.1C339 55.1 283.2 32 223.9 32c-122.4 0-222 99.6-222 222 0 39.1 10.2 77.3 29.6 111L0 480l117.7-30.9c32.4 17.7 68.9 27 106.1 27h.1c122.3 0 224.1-99.6 224.1-222 0-59.3-25.2-115-67.1-157zm-157 341.6c-33.2 0-65.7-8.9-94-25.7l-6.7-4-69.8 18.3L72 359.2l-4.4-7c-18.5-29.4-28.2-63.3-28.2-98.2 0-101.7 82.8-184.5 184.6-184.5 49.3 0 95.6 19.2 130.4 54.1 34.8 34.9 56.2 81.2 56.1 130.5 0 101.8-84.9 184.6-186.6 184.6zm101.2-138.2c-5.5-2.8-32.8-16.2-37.9-18-5.1-1.9-8.8-2.8-12.5 2.8-3.7 5.6-14.3 18-17.6 21.8-3.2 3.7-6.5 4.2-12 1.4-32.6-16.3-54-29.1-75.5-66-5.7-9.8 5.7-9.1 16.3-30.3 1.8-3.7.9-6.9-.5-9.7-1.4-2.8-12.5-30.1-17.1-41.2-4.5-10.8-9.1-9.3-12.5-9.5-3.2-.2-6.9-.2-10.6-.2-3.7 0-9.7 1.4-14.8 6.9-5.1 5.6-19.4 19-19.4 46.3 0 27.3 19.9 53.7 22.6 57.4 2.8 3.7 39.1 59.7 94.8 83.8 35.2 15.2 49 16.5 66.6 13.9 10.7-1.6 32.8-13.4 37.4-26.4 4.6-13 4.6-24.1 3.2-26.4-1.3-2.5-5-3.9-10.5-6.6z"/></svg> <strong>WhatsApp:</strong> <a href="https://wa.me/message/XAHBYTJZNQ6TK1">06 36 27 64 19</a></li>
<li><svg class="svg-icon" viewBox="0 0 512 512" style="margin-right:8px;color:#a8b2bd;" aria-hidden="true"><path d="M164.9 24.6c-7.7-18.6-28-28.5-47.4-23.2l-88 24C12.1 30.2 0 46 0 64C0 311.4 200.6 512 448 512c18 0 33.8-12.1 38.6-29.5l24-88c5.3-19.4-4.6-39.7-23.2-47.4l-96-40c-16.3-6.8-35.2-2.1-46.3 11.6L304.7 368C234.3 334.7 177.3 277.7 144 207.3L193.3 167c13.7-11.2 18.4-30 11.6-46.3l-40-96z"/></svg> <strong>Teléfono:</strong> <a href="tel:0636276419">06 36 27 64 19</a></li>
</ul></div>
<div class="footer-col"><h4>Horarios &amp; información</h4><ul>
<li><strong>Entre semana (lun-vie):</strong> Según disponibilidad</li>
<li><strong>Fines de semana y festivos:</strong> 10 h - 20 h</li>
<li><strong>Disponibilidad:</strong> Localizable en 48 h (WhatsApp y correo para cualquier consulta)</li>
<li style="margin-top:15px;"><strong>Número SIRET:</strong> <a href="https://entreprises.lefigaro.fr/nd-38/entreprise-104816749"> 10481674900014</a></li>
</ul></div>
</div>
<div class="footer-bottom">© 2026 THÉO - SOLUCIONES VISUALES &amp; ADQUISICIÓN ÓPTICA | <a href="/es/#legal-cgv" data-main style="color:white;">Términos y condiciones del sitio</a> | <a href="/es/#legal-rgpd" data-main style="color:white;">Privacidad (RGPD)</a> | <a href="/es/#legal-mentions" data-main style="color:white;">Aviso legal</a></div>
</footer>
<script src="/news/actus.js" defer></script>
<script src="/news/reglages.js" defer></script>
<script src="/news/newsletter.js" defer></script>
</body>
</html>
+89
Voir le fichier
@@ -0,0 +1,89 @@
<!DOCTYPE html>
<html lang="fr" data-news>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>News — Théo Gastinel : vidéos, projets et applications</title>
<meta name="description" content="Toutes les news de Théo Gastinel : nouvelles vidéos et photos, projets techniques, sorties d'applications et mises à jour du site.">
<link rel="canonical" href="https://gastinel.me/news/">
<meta name="robots" content="index, follow">
<meta name="author" content="Théo Gastinel">
<meta property="og:type" content="website">
<meta property="og:locale" content="fr_FR">
<meta property="og:url" content="https://gastinel.me/news/">
<meta property="og:site_name" content="Théo Gastinel">
<meta property="og:title" content="News — Théo Gastinel : vidéos, projets et applications">
<meta property="og:description" content="Toutes les news de Théo Gastinel : nouvelles vidéos et photos, projets techniques, sorties d'applications et mises à jour du site.">
<meta property="og:image" content="https://gastinel.me/assets/img/dji-fly-20250919-194610-0004-1758304172909-photo.webp">
<meta property="og:image:alt" content="Ciel orangé au crépuscule sur le plateau du Vercors, vu du drone">
<meta name="twitter:card" content="summary_large_image">
<link rel="icon" type="image/svg+xml" href="/favicon.svg">
<link rel="icon" href="/favicon.ico" sizes="any">
<script type="application/ld+json">
{"@context":"https://schema.org","@graph":[
{"@type":"CollectionPage","@id":"https://gastinel.me/news/#page","url":"https://gastinel.me/news/","name":"News","inLanguage":"fr-FR","isPartOf":{"@id":"https://gastinel.me/#website"}},
{"@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https://gastinel.me/"},{"@type":"ListItem","position":2,"name":"News","item":"https://gastinel.me/news/"}]}
]}
</script>
<style>
@font-face{font-family:Inter;font-weight:400 700;font-display:swap;src:url(/assets/fonts/inter-latin.woff2) format("woff2")}
:root{--bg:#fff;--tx:#1a1d21;--mu:#4b5563;--ac:#1e4d8b;--ln:#e5e7eb;--font-sans:Inter,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif}
*{box-sizing:border-box}html,body{height:100%}body{display:flex;flex-direction:column;min-height:100vh;margin:0;background:var(--bg);color:var(--tx);font:18px/1.7 var(--font-sans)}
nav{display:flex;gap:6px;flex-wrap:wrap;padding:12px 18px;border-bottom:1px solid var(--ln)}
nav a{color:var(--tx);text-decoration:none;padding:8px 12px;border-radius:6px;font-weight:500}
nav a[aria-current]{background:var(--ln)}nav a:hover{text-decoration:underline}
nav a:focus-visible{outline:3px solid var(--ac);outline-offset:2px}
main{flex:1 0 auto;width:100%;max-width:1120px;margin:0 auto;padding:28px 18px 56px}
h1{font-size:1.9rem;line-height:1.25;margin:.2em 0 .4em}
a{color:var(--ac)}.lead{font-size:1.1rem;color:var(--mu);max-width:42rem;margin:0 0 1.2em}
.note{background:#fff4d6;border-left:4px solid #e0b100;padding:12px 16px;border-radius:4px;margin:0 0 1.5em;max-width:42rem;font-size:.95rem}
/* Article ouvert en grand */
.actus-article{max-width:46rem;margin:0 auto}
.actus-back{display:inline-block;margin:0 0 24px;font-weight:600;text-decoration:none}
.actus-back:hover{text-decoration:underline}
.actus-article-title{font-size:2.4rem;line-height:1.2;margin:.3em 0 .6em;outline:none}
.actus-article-img{width:100%;height:auto;margin:0 0 1.2em}
.actus-article-text{font-size:1.3rem;line-height:1.75;margin:0}
@media(max-width:600px){.actus-article-title{font-size:1.8rem}.actus-article-text{font-size:1.15rem}}
/* Pied de page identique au site principal (26/10) */
.global-footer { background:#242424; color:#d1d1d1; padding:60px 20px 30px; border-top:4px solid #111; font-size:.9rem; line-height:1.8; font-family:var(--font-sans); }
.global-footer .footer-content { max-width:1000px; margin:0 auto; display:grid; grid-template-columns:1fr 1fr; gap:40px; }
.global-footer h4 { font-family:var(--font-sans); text-transform:uppercase; letter-spacing:1px; margin-top:0; color:#fff; border-bottom:1px solid #444; padding-bottom:10px; }
.global-footer ul { list-style:none; padding:0; margin:0; }
.global-footer li { margin-bottom:8px; }
.global-footer a { color:#a8b2bd; text-decoration:none; transition:color .3s; font-weight:600; }
.global-footer a:hover { color:#fff; text-decoration:underline; }
.global-footer .footer-bottom { text-align:center; border-top:1px solid #333; margin-top:40px; padding-top:20px; font-size:.8rem; color:#888; }
@media (max-width:768px){ .global-footer .footer-content{ grid-template-columns:1fr; gap:30px; } }
.svg-icon { width:1em; height:1em; fill:currentColor; display:inline-block; vertical-align:-.125em; }
</style>
</head>
<body>
<nav aria-label="Menu principal"><a href="/">Accueil</a></nav>
<main>
<h1>News</h1>
<p class="lead">Ici, tu trouves les dernières nouveautés : vidéos et photos, projets techniques, sorties d'applications et mises à jour du site.</p>
<div data-actus-list></div>
<noscript><p>Cette page a besoin de JavaScript pour afficher les news.</p></noscript>
</main>
<footer class="global-footer">
<div class="footer-content">
<div class="footer-col"><h4>Contact</h4><ul>
<li><svg class="svg-icon" viewBox="0 0 512 512" style="margin-right:8px;color:#a8b2bd;" aria-hidden="true"><path d="M48 64C21.5 64 0 85.5 0 112c0 15.1 7.1 29.3 19.2 38.4L236.8 313.6c11.4 8.5 27 8.5 38.4 0L492.8 150.4c12.1-9.1 19.2-23.3 19.2-38.4c0-26.5-21.5-48-48-48H48zM0 176V384c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V176L294.4 339.2c-22.8 17.1-54 17.1-76.8 0L0 176z"/></svg> <a href="mailto:studio@gastinel.me">studio@gastinel.me</a></li>
<li><svg class="svg-icon" viewBox="0 0 448 512" style="margin-right:8px;color:#a8b2bd;" aria-hidden="true"><path d="M380.9 97.1C339 55.1 283.2 32 223.9 32c-122.4 0-222 99.6-222 222 0 39.1 10.2 77.3 29.6 111L0 480l117.7-30.9c32.4 17.7 68.9 27 106.1 27h.1c122.3 0 224.1-99.6 224.1-222 0-59.3-25.2-115-67.1-157zm-157 341.6c-33.2 0-65.7-8.9-94-25.7l-6.7-4-69.8 18.3L72 359.2l-4.4-7c-18.5-29.4-28.2-63.3-28.2-98.2 0-101.7 82.8-184.5 184.6-184.5 49.3 0 95.6 19.2 130.4 54.1 34.8 34.9 56.2 81.2 56.1 130.5 0 101.8-84.9 184.6-186.6 184.6zm101.2-138.2c-5.5-2.8-32.8-16.2-37.9-18-5.1-1.9-8.8-2.8-12.5 2.8-3.7 5.6-14.3 18-17.6 21.8-3.2 3.7-6.5 4.2-12 1.4-32.6-16.3-54-29.1-75.5-66-5.7-9.8 5.7-9.1 16.3-30.3 1.8-3.7.9-6.9-.5-9.7-1.4-2.8-12.5-30.1-17.1-41.2-4.5-10.8-9.1-9.3-12.5-9.5-3.2-.2-6.9-.2-10.6-.2-3.7 0-9.7 1.4-14.8 6.9-5.1 5.6-19.4 19-19.4 46.3 0 27.3 19.9 53.7 22.6 57.4 2.8 3.7 39.1 59.7 94.8 83.8 35.2 15.2 49 16.5 66.6 13.9 10.7-1.6 32.8-13.4 37.4-26.4 4.6-13 4.6-24.1 3.2-26.4-1.3-2.5-5-3.9-10.5-6.6z"/></svg> <strong>WhatsApp :</strong> <a href="https://wa.me/message/XAHBYTJZNQ6TK1">06 36 27 64 19</a></li>
<li><svg class="svg-icon" viewBox="0 0 512 512" style="margin-right:8px;color:#a8b2bd;" aria-hidden="true"><path d="M164.9 24.6c-7.7-18.6-28-28.5-47.4-23.2l-88 24C12.1 30.2 0 46 0 64C0 311.4 200.6 512 448 512c18 0 33.8-12.1 38.6-29.5l24-88c5.3-19.4-4.6-39.7-23.2-47.4l-96-40c-16.3-6.8-35.2-2.1-46.3 11.6L304.7 368C234.3 334.7 177.3 277.7 144 207.3L193.3 167c13.7-11.2 18.4-30 11.6-46.3l-40-96z"/></svg> <strong>Téléphone :</strong> <a href="tel:0636276419">06 36 27 64 19</a></li>
</ul></div>
<div class="footer-col"><h4>Horaires & Infos</h4><ul>
<li><strong>Semaine (Lun-Ven) :</strong> Selon emploi du temps</li>
<li><strong>Week-end & Fériés :</strong> 10h - 20h</li>
<li><strong>Disponibilité :</strong> Joignable sous 48h (WhatsApp & Mail pour toute question)</li>
<li style="margin-top:15px;"><strong>Numéro SIRET :</strong> <a href="https://entreprises.lefigaro.fr/nd-38/entreprise-104816749"> 10481674900014</a></li>
</ul></div>
</div>
<div class="footer-bottom">© 2026 THÉO - SOLUTIONS VISUELLES & ACQUISITION OPTIQUE | <a href="/#legal-cgv" style="color:white;">Termes et conditions du site</a> | <a href="/#legal-rgpd" style="color:white;">Confidentialité (RGPD)</a> | <a href="/#legal-mentions" style="color:white;">Mentions légales</a></div>
</footer>
<script src="/news/actus.js" defer></script>
<script src="/news/reglages.js" defer></script>
<script src="/news/newsletter.js" defer></script>
</body>
</html>
+89
Voir le fichier
@@ -0,0 +1,89 @@
<!DOCTYPE html>
<html lang="it" data-news>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>News — Théo Gastinel: video, progetti e app</title>
<meta name="description" content="Tutte le news di Théo Gastinel: nuovi video e foto, progetti tecnici, uscite di app e aggiornamenti del sito.">
<link rel="canonical" href="https://gastinel.me/news/it/">
<meta name="robots" content="index, follow">
<meta name="author" content="Théo Gastinel">
<meta property="og:type" content="website">
<meta property="og:locale" content="it_IT">
<meta property="og:url" content="https://gastinel.me/news/it/">
<meta property="og:site_name" content="Théo Gastinel">
<meta property="og:title" content="News — Théo Gastinel: video, progetti e app">
<meta property="og:description" content="Tutte le news di Théo Gastinel: nuovi video e foto, progetti tecnici, uscite di app e aggiornamenti del sito.">
<meta property="og:image" content="https://gastinel.me/assets/img/dji-fly-20250919-194610-0004-1758304172909-photo.webp">
<meta property="og:image:alt" content="Ciel orangé au crépuscule sur le plateau du Vercors, vu du drone">
<meta name="twitter:card" content="summary_large_image">
<link rel="icon" type="image/svg+xml" href="/favicon.svg">
<link rel="icon" href="/favicon.ico" sizes="any">
<script type="application/ld+json">
{"@context":"https://schema.org","@graph":[
{"@type":"CollectionPage","@id":"https://gastinel.me/news/it/#page","url":"https://gastinel.me/news/it/","name":"News","inLanguage":"fr-FR","isPartOf":{"@id":"https://gastinel.me/#website"}},
{"@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https://gastinel.me/"},{"@type":"ListItem","position":2,"name":"News","item":"https://gastinel.me/news/it/"}]}
]}
</script>
<style>
@font-face{font-family:Inter;font-weight:400 700;font-display:swap;src:url(/assets/fonts/inter-latin.woff2) format("woff2")}
:root{--bg:#fff;--tx:#1a1d21;--mu:#4b5563;--ac:#1e4d8b;--ln:#e5e7eb;--font-sans:Inter,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif}
*{box-sizing:border-box}html,body{height:100%}body{display:flex;flex-direction:column;min-height:100vh;margin:0;background:var(--bg);color:var(--tx);font:18px/1.7 var(--font-sans)}
nav{display:flex;gap:6px;flex-wrap:wrap;padding:12px 18px;border-bottom:1px solid var(--ln)}
nav a{color:var(--tx);text-decoration:none;padding:8px 12px;border-radius:6px;font-weight:500}
nav a[aria-current]{background:var(--ln)}nav a:hover{text-decoration:underline}
nav a:focus-visible{outline:3px solid var(--ac);outline-offset:2px}
main{flex:1 0 auto;width:100%;max-width:1120px;margin:0 auto;padding:28px 18px 56px}
h1{font-size:1.9rem;line-height:1.25;margin:.2em 0 .4em}
a{color:var(--ac)}.lead{font-size:1.1rem;color:var(--mu);max-width:42rem;margin:0 0 1.2em}
.note{background:#fff4d6;border-left:4px solid #e0b100;padding:12px 16px;border-radius:4px;margin:0 0 1.5em;max-width:42rem;font-size:.95rem}
/* Article ouvert en grand */
.actus-article{max-width:46rem;margin:0 auto}
.actus-back{display:inline-block;margin:0 0 24px;font-weight:600;text-decoration:none}
.actus-back:hover{text-decoration:underline}
.actus-article-title{font-size:2.4rem;line-height:1.2;margin:.3em 0 .6em;outline:none}
.actus-article-img{width:100%;height:auto;margin:0 0 1.2em}
.actus-article-text{font-size:1.3rem;line-height:1.75;margin:0}
@media(max-width:600px){.actus-article-title{font-size:1.8rem}.actus-article-text{font-size:1.15rem}}
/* Pied de page identique au site principal (26/10) */
.global-footer { background:#242424; color:#d1d1d1; padding:60px 20px 30px; border-top:4px solid #111; font-size:.9rem; line-height:1.8; font-family:var(--font-sans); }
.global-footer .footer-content { max-width:1000px; margin:0 auto; display:grid; grid-template-columns:1fr 1fr; gap:40px; }
.global-footer h4 { font-family:var(--font-sans); text-transform:uppercase; letter-spacing:1px; margin-top:0; color:#fff; border-bottom:1px solid #444; padding-bottom:10px; }
.global-footer ul { list-style:none; padding:0; margin:0; }
.global-footer li { margin-bottom:8px; }
.global-footer a { color:#a8b2bd; text-decoration:none; transition:color .3s; font-weight:600; }
.global-footer a:hover { color:#fff; text-decoration:underline; }
.global-footer .footer-bottom { text-align:center; border-top:1px solid #333; margin-top:40px; padding-top:20px; font-size:.8rem; color:#888; }
@media (max-width:768px){ .global-footer .footer-content{ grid-template-columns:1fr; gap:30px; } }
.svg-icon { width:1em; height:1em; fill:currentColor; display:inline-block; vertical-align:-.125em; }
</style>
</head>
<body>
<nav aria-label="Menu"><a href="/it/" data-main>Home</a></nav>
<main>
<h1>News</h1>
<p class="lead">Qui trovi le ultime novità: video e foto, progetti tecnici, uscite di app e aggiornamenti del sito.</p>
<div data-actus-list></div>
<noscript><p>Questa pagina ha bisogno di JavaScript per mostrare le news.</p></noscript>
</main>
<footer class="global-footer">
<div class="footer-content">
<div class="footer-col"><h4>Contatto</h4><ul>
<li><svg class="svg-icon" viewBox="0 0 512 512" style="margin-right:8px;color:#a8b2bd;" aria-hidden="true"><path d="M48 64C21.5 64 0 85.5 0 112c0 15.1 7.1 29.3 19.2 38.4L236.8 313.6c11.4 8.5 27 8.5 38.4 0L492.8 150.4c12.1-9.1 19.2-23.3 19.2-38.4c0-26.5-21.5-48-48-48H48zM0 176V384c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V176L294.4 339.2c-22.8 17.1-54 17.1-76.8 0L0 176z"/></svg> <a href="mailto:studio@gastinel.me">studio@gastinel.me</a></li>
<li><svg class="svg-icon" viewBox="0 0 448 512" style="margin-right:8px;color:#a8b2bd;" aria-hidden="true"><path d="M380.9 97.1C339 55.1 283.2 32 223.9 32c-122.4 0-222 99.6-222 222 0 39.1 10.2 77.3 29.6 111L0 480l117.7-30.9c32.4 17.7 68.9 27 106.1 27h.1c122.3 0 224.1-99.6 224.1-222 0-59.3-25.2-115-67.1-157zm-157 341.6c-33.2 0-65.7-8.9-94-25.7l-6.7-4-69.8 18.3L72 359.2l-4.4-7c-18.5-29.4-28.2-63.3-28.2-98.2 0-101.7 82.8-184.5 184.6-184.5 49.3 0 95.6 19.2 130.4 54.1 34.8 34.9 56.2 81.2 56.1 130.5 0 101.8-84.9 184.6-186.6 184.6zm101.2-138.2c-5.5-2.8-32.8-16.2-37.9-18-5.1-1.9-8.8-2.8-12.5 2.8-3.7 5.6-14.3 18-17.6 21.8-3.2 3.7-6.5 4.2-12 1.4-32.6-16.3-54-29.1-75.5-66-5.7-9.8 5.7-9.1 16.3-30.3 1.8-3.7.9-6.9-.5-9.7-1.4-2.8-12.5-30.1-17.1-41.2-4.5-10.8-9.1-9.3-12.5-9.5-3.2-.2-6.9-.2-10.6-.2-3.7 0-9.7 1.4-14.8 6.9-5.1 5.6-19.4 19-19.4 46.3 0 27.3 19.9 53.7 22.6 57.4 2.8 3.7 39.1 59.7 94.8 83.8 35.2 15.2 49 16.5 66.6 13.9 10.7-1.6 32.8-13.4 37.4-26.4 4.6-13 4.6-24.1 3.2-26.4-1.3-2.5-5-3.9-10.5-6.6z"/></svg> <strong>WhatsApp:</strong> <a href="https://wa.me/message/XAHBYTJZNQ6TK1">06 36 27 64 19</a></li>
<li><svg class="svg-icon" viewBox="0 0 512 512" style="margin-right:8px;color:#a8b2bd;" aria-hidden="true"><path d="M164.9 24.6c-7.7-18.6-28-28.5-47.4-23.2l-88 24C12.1 30.2 0 46 0 64C0 311.4 200.6 512 448 512c18 0 33.8-12.1 38.6-29.5l24-88c5.3-19.4-4.6-39.7-23.2-47.4l-96-40c-16.3-6.8-35.2-2.1-46.3 11.6L304.7 368C234.3 334.7 177.3 277.7 144 207.3L193.3 167c13.7-11.2 18.4-30 11.6-46.3l-40-96z"/></svg> <strong>Telefono:</strong> <a href="tel:0636276419">06 36 27 64 19</a></li>
</ul></div>
<div class="footer-col"><h4>Orari & Info</h4><ul>
<li><strong>Settimana (lun-ven):</strong> In base agli impegni</li>
<li><strong>Weekend & festivi:</strong> 10:00 - 20:00</li>
<li><strong>Disponibilità:</strong> Raggiungibile entro 48 h (WhatsApp & e-mail per qualsiasi domanda)</li>
<li style="margin-top:15px;"><strong>Numero SIRET:</strong> <a href="https://entreprises.lefigaro.fr/nd-38/entreprise-104816749"> 10481674900014</a></li>
</ul></div>
</div>
<div class="footer-bottom">© 2026 THÉO - SOLUZIONI VISIVE & ACQUISIZIONE OTTICA | <a href="/it/#legal-cgv" data-main style="color:white;">Termini e condizioni del sito</a> | <a href="/it/#legal-rgpd" data-main style="color:white;">Privacy (GDPR)</a> | <a href="/it/#legal-mentions" data-main style="color:white;">Note legali</a></div>
</footer>
<script src="/news/actus.js" defer></script>
<script src="/news/reglages.js" defer></script>
<script src="/news/newsletter.js" defer></script>
</body>
</html>
+182
Voir le fichier
@@ -0,0 +1,182 @@
/* news/newsletter.js : bouton « Newsletter » (en haut à droite de la page News) + fenêtre d'inscription.
* Envoie prénom, nom, adresse, langue, niveau et thèmes (réglages News du navigateur) au service
* /api/newsletter/inscription. Sans bibliothèque. Thème clair. « Se connecter avec Gastinel » : à venir (Hub).
*/
(function () {
'use strict';
var T = {
fr: { btn: 'Newsletter', title: 'Recevoir les News par mail', intro: 'Un mail à chaque nouvel article, selon ton niveau et tes thèmes.',
hub: 'Se connecter avec Gastinel', soon: 'bientôt', or: 'ou', prenom: 'Prénom', nom: 'Nom (facultatif)', email: 'Adresse mail',
send: 'M’inscrire', close: 'Fermer', minor: 'Moins de 15 ans : demande l’accord d’un parent avant de t’inscrire.',
privacy: 'Données utilisées seulement pour t’envoyer les News. Désabonnement en un clic dans chaque mail.', more: 'En savoir plus',
ok: 'C’est presque fini : ouvre le mail de confirmation que tu viens de recevoir.', wait: 'Envoi…',
err: { email: 'Cette adresse mail n’est pas valide.', prenom: 'Le prénom ne doit contenir que des lettres.', nom: 'Le nom ne doit contenir que des lettres.',
trop: 'Trop de demandes. Réessaie dans une heure.', autre: 'L’inscription n’a pas marché. Réessaie un peu plus tard.' } },
en: { btn: 'Newsletter', title: 'Get the News by email', intro: 'One email for each new article, matching your level and topics.',
hub: 'Sign in with Gastinel', soon: 'coming soon', or: 'or', prenom: 'First name', nom: 'Last name (optional)', email: 'Email address',
send: 'Subscribe', close: 'Close', minor: 'Under 15: ask a parent before subscribing.',
privacy: 'Your data is only used to send you the News. One-click unsubscribe in every email.', more: 'Learn more',
ok: 'Almost done: open the confirmation email you just received.', wait: 'Sending…',
err: { email: 'This email address is not valid.', prenom: 'The first name may only contain letters.', nom: 'The last name may only contain letters.',
trop: 'Too many requests. Try again in an hour.', autre: 'Subscription failed. Please try again later.' } },
de: { btn: 'Newsletter', title: 'News per E-Mail erhalten', intro: 'Eine E-Mail pro neuem Artikel, passend zu deiner Stufe und deinen Themen.',
hub: 'Mit Gastinel anmelden', soon: 'bald', or: 'oder', prenom: 'Vorname', nom: 'Nachname (optional)', email: 'E-Mail-Adresse',
send: 'Abonnieren', close: 'Schließen', minor: 'Unter 15: Frag vor dem Abonnieren ein Elternteil.',
privacy: 'Deine Daten dienen nur dem Versand der News. Abmelden mit einem Klick in jeder E-Mail.', more: 'Mehr erfahren',
ok: 'Fast fertig: Öffne die Bestätigungs-E-Mail, die du gerade erhalten hast.', wait: 'Wird gesendet…',
err: { email: 'Diese E-Mail-Adresse ist ungültig.', prenom: 'Der Vorname darf nur Buchstaben enthalten.', nom: 'Der Nachname darf nur Buchstaben enthalten.',
trop: 'Zu viele Anfragen. Versuch es in einer Stunde erneut.', autre: 'Das Abonnement hat nicht geklappt. Versuch es später erneut.' } },
it: { btn: 'Newsletter', title: 'Ricevi le News via email', intro: 'Una email per ogni nuovo articolo, secondo il tuo livello e i tuoi temi.',
hub: 'Accedi con Gastinel', soon: 'presto', or: 'oppure', prenom: 'Nome', nom: 'Cognome (facoltativo)', email: 'Indirizzo email',
send: 'Iscrivimi', close: 'Chiudi', minor: 'Meno di 15 anni: chiedi il permesso a un genitore prima di iscriverti.',
privacy: 'I tuoi dati servono solo a inviarti le News. Disiscrizione con un clic in ogni email.', more: 'Per saperne di più',
ok: 'Quasi fatto: apri l’email di conferma che hai appena ricevuto.', wait: 'Invio…',
err: { email: 'Questo indirizzo email non è valido.', prenom: 'Il nome può contenere solo lettere.', nom: 'Il cognome può contenere solo lettere.',
trop: 'Troppe richieste. Riprova tra un’ora.', autre: 'L’iscrizione non è riuscita. Riprova più tardi.' } },
es: { btn: 'Newsletter', title: 'Recibir las News por correo', intro: 'Un correo por cada nuevo artículo, según tu nivel y tus temas.',
hub: 'Iniciar sesión con Gastinel', soon: 'pronto', or: 'o', prenom: 'Nombre', nom: 'Apellido (opcional)', email: 'Correo electrónico',
send: 'Suscribirme', close: 'Cerrar', minor: 'Menos de 15 años: pide permiso a un padre o madre antes de suscribirte.',
privacy: 'Tus datos solo sirven para enviarte las News. Baja con un clic en cada correo.', more: 'Más información',
ok: 'Casi listo: abre el correo de confirmación que acabas de recibir.', wait: 'Enviando…',
err: { email: 'Esta dirección de correo no es válida.', prenom: 'El nombre solo puede contener letras.', nom: 'El apellido solo puede contener letras.',
trop: 'Demasiadas solicitudes. Inténtalo dentro de una hora.', autre: 'La suscripción no ha funcionado. Inténtalo más tarde.' } }
};
var lang = String(document.documentElement.getAttribute('lang') || 'fr').slice(0, 2).toLowerCase();
if (!Object.prototype.hasOwnProperty.call(T, lang)) lang = 'fr';
var L = T[lang];
/* Aperçu LAN : l'API est celle du site en ligne (autorisée par CORS). */
var API = location.hostname === 'news.gastinel.me' ? '/api/newsletter/inscription' : 'https://news.gastinel.me/api/newsletter/inscription';
var POLITIQUE = 'https://gastinel.me/#legal-rgpd';
function el(tag, cls, text) {
var e = document.createElement(tag);
if (cls) e.className = cls;
if (text != null) e.textContent = text;
return e;
}
function prefs() {
try {
var p = JSON.parse(window.localStorage.getItem('gastinel-actus') || '{}');
return { niveau: p.level || 'normal', themes: Array.isArray(p.themes) ? p.themes : [] };
} catch (e) { return { niveau: 'normal', themes: [] }; }
}
var CSS = '' +
'.nl-btn{margin-left:auto;font:inherit;font-weight:600;font-size:.95rem;padding:8px 16px;border:2px solid #111;background:#111;color:#fff;cursor:pointer}' +
'.nl-btn:hover{background:#fff;color:#111}.nl-btn:focus-visible{outline:3px solid #1e4d8b;outline-offset:3px}' +
'.nl-veil{position:fixed;inset:0;z-index:9700;background:rgba(0,0,0,.45);display:flex;align-items:center;justify-content:center;padding:16px}' +
'.nl-veil[hidden]{display:none}' +
'.nl-box{background:#fff;color:#111;width:440px;max-width:100%;max-height:calc(100vh - 32px);overflow-y:auto;border:2px solid #111;padding:22px 22px 20px;box-sizing:border-box;font:16px/1.5 var(--font-sans,Inter,system-ui,sans-serif)}' +
'.nl-box *{box-sizing:border-box}.nl-top{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}' +
'.nl-h{font-size:1.3rem;margin:0 0 6px;line-height:1.3}.nl-x{font:inherit;font-size:1.4rem;width:44px;height:44px;border:2px solid #111;background:#fff;cursor:pointer;flex:none}' +
'.nl-p{margin:0 0 14px;color:#4b5563;font-size:.95rem}' +
'.nl-hub{width:100%;font:inherit;font-weight:600;min-height:46px;border:2px solid #d1d5db;background:#f3f4f6;color:#6b7280;cursor:not-allowed}' +
'.nl-or{text-align:center;color:#6b7280;font-size:.85rem;margin:12px 0}' +
'.nl-f label{display:block;font-weight:600;font-size:.9rem;margin:10px 0 4px}' +
'.nl-f input{width:100%;font:inherit;padding:10px 12px;border:2px solid #111;background:#fff;color:#111}' +
'.nl-f input:focus-visible{outline:3px solid #1e4d8b;outline-offset:1px}' +
'.nl-piege{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}' +
'.nl-send{width:100%;margin-top:16px;font:inherit;font-weight:700;min-height:48px;border:2px solid #111;background:#111;color:#fff;cursor:pointer}' +
'.nl-send[disabled]{opacity:.6;cursor:wait}' +
'.nl-small{font-size:.82rem;color:#4b5563;margin:12px 0 0}.nl-small a{color:#111}' +
'.nl-msg{margin:12px 0 0;padding:10px 12px;font-size:.95rem}.nl-msg.ok{background:#ecfdf3;border-left:4px solid #15803d}.nl-msg.ko{background:#fef2f2;border-left:4px solid #b91c1c}' +
'@media(max-width:600px){.nl-veil{align-items:flex-end;padding:0}.nl-box{width:100%;border-width:2px 0 0}}';
var veil, box, form, msg, send, opener;
function close() {
veil.hidden = true;
document.removeEventListener('keydown', onKey, true);
if (opener) try { opener.focus(); } catch (e) { /* rien */ }
}
function onKey(e) {
if (e.key === 'Escape') { e.preventDefault(); close(); return; }
if (e.key !== 'Tab') return;
var f = box.querySelectorAll('a[href],button:not([disabled]),input:not([tabindex="-1"])');
if (!f.length) return;
var a = document.activeElement, first = f[0], last = f[f.length - 1];
if (e.shiftKey && a === first) { e.preventDefault(); last.focus(); } else if (!e.shiftKey && a === last) { e.preventDefault(); first.focus(); }
}
function field(name, label, type, auto, required) {
var id = 'nl-' + name;
var lab = el('label', null, label); lab.htmlFor = id;
var inp = el('input'); inp.id = id; inp.name = name; inp.type = type; inp.autocomplete = auto; inp.maxLength = name === 'email' ? 254 : 60;
if (required) inp.required = true;
form.appendChild(lab); form.appendChild(inp);
}
function show(text, ok) {
msg.textContent = text; msg.className = 'nl-msg ' + (ok ? 'ok' : 'ko'); msg.hidden = false;
}
function build() {
var st = el('style'); st.textContent = CSS; document.head.appendChild(st);
veil = el('div', 'nl-veil'); veil.hidden = true;
veil.addEventListener('mousedown', function (e) { if (e.target === veil) close(); });
box = el('div', 'nl-box'); box.setAttribute('role', 'dialog'); box.setAttribute('aria-modal', 'true'); box.setAttribute('aria-labelledby', 'nl-title');
var top = el('div', 'nl-top');
var h = el('h2', 'nl-h', L.title); h.id = 'nl-title'; top.appendChild(h);
var x = el('button', 'nl-x', '×'); x.type = 'button'; x.setAttribute('aria-label', L.close); x.addEventListener('click', close); top.appendChild(x);
box.appendChild(top);
box.appendChild(el('p', 'nl-p', L.intro));
var hub = el('button', 'nl-hub', L.hub + ' (' + L.soon + ')'); hub.type = 'button'; hub.disabled = true;
box.appendChild(hub);
box.appendChild(el('p', 'nl-or', L.or));
form = el('form', 'nl-f'); form.noValidate = true;
field('prenom', L.prenom, 'text', 'given-name', true);
field('nom', L.nom, 'text', 'family-name', false);
field('email', L.email, 'email', 'email', true);
var piege = el('div', 'nl-piege'); piege.setAttribute('aria-hidden', 'true');
var pi = el('input'); pi.name = 'site'; pi.tabIndex = -1; pi.autocomplete = 'off'; piege.appendChild(pi); form.appendChild(piege);
send = el('button', 'nl-send', L.send); send.type = 'submit'; form.appendChild(send);
msg = el('p', 'nl-msg'); msg.hidden = true; msg.setAttribute('role', 'status'); form.appendChild(msg);
form.addEventListener('submit', submit);
box.appendChild(form);
box.appendChild(el('p', 'nl-small', L.minor));
var pr = el('p', 'nl-small', L.privacy + ' ');
var a = el('a', null, L.more); a.href = POLITIQUE; a.setAttribute('data-main', ''); pr.appendChild(a);
box.appendChild(pr);
veil.appendChild(box);
document.body.appendChild(veil);
}
function submit(e) {
e.preventDefault();
var p = prefs();
var data = {
prenom: form.prenom.value.trim(), nom: form.nom.value.trim(), email: form.email.value.trim(),
site: form.site.value, langue: lang, niveau: p.niveau, themes: p.themes
};
if (!data.prenom) { show(L.err.prenom, false); form.prenom.focus(); return; }
send.disabled = true; send.textContent = L.wait; msg.hidden = true;
fetch(API, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(data) })
.then(function (r) { return r.json().catch(function () { return {}; }).then(function (j) { return { code: r.status, j: j }; }); })
.then(function (r) {
if (r.code === 200) { show(L.ok, true); form.reset(); return; }
if (r.code === 429) { show(L.err.trop, false); return; }
var k = r.j && r.j.erreur;
show(L.err[k] || L.err.autre, false);
if (form[k]) form[k].focus();
})
.catch(function () { show(L.err.autre, false); })
.then(function () { send.disabled = false; send.textContent = L.send; });
}
function open(from) {
if (!veil) build();
opener = from; msg.hidden = true; veil.hidden = false;
document.addEventListener('keydown', onKey, true);
form.prenom.focus();
}
function start() {
var nav = document.querySelector('nav');
if (!nav) return;
nav.style.alignItems = 'center';
var b = el('button', 'nl-btn', L.btn); b.type = 'button'; b.setAttribute('aria-haspopup', 'dialog');
b.addEventListener('click', function () { open(b); });
nav.appendChild(b);
var st = el('style'); st.textContent = '.nl-btn{margin-left:auto;font:inherit;font-weight:600;font-size:.95rem;padding:8px 16px;border:2px solid #111;background:#111;color:#fff;cursor:pointer}.nl-btn:hover{background:#fff;color:#111}';
document.head.appendChild(st);
}
if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', start); else start();
})();
+451
Voir le fichier
@@ -0,0 +1,451 @@
/* news/reglages.js : bouton Paramètres (engrenage) + panneau de réglages. Sans bibliothèque.
* Placé dans le DOM à la fin de <body>, jamais dans Accueil / Portfolio / Réalisations / L'envers du décor.
* Contenu : (a) flux News (niveau + thèmes), (b) langue. Pas de thème sombre, pas de « fun fact ».
* Les choix sont mémorisés dans localStorage (clé « gastinel-actus »), avec try/catch : sans stockage, tout marche
* pour la page en cours. Le composant News (news/actus.js) est prévenu par l'évènement « gastinel:prefs ».
* Première visite de /news/ : une invite « Quel flux veux-tu ? » s'ouvre une fois, puis se range.
* À venir (non codé) : connexion Gastinel Hub et abonnement par mail, voir le rapport.
*/
(function () {
'use strict';
var STORE_KEY = 'gastinel-actus';
var THEME_IDS = ['audiovisuel', 'applications', 'technique', 'site', 'meteo', 'minecraft', 'mind', 'hub', 'vie-locale'];
var LEVEL_IDS = ['simple', 'normal', 'developpeur'];
var LANGS = [['fr', '/', 'Français'], ['en', '/en/', 'English'], ['de', '/de/', 'Deutsch'], ['it', '/it/', 'Italiano'], ['es', '/es/', 'Español']];
var T = {
fr: {
themeH: 'Thème', themes2: [['clair', 'Clair', 'Par défaut.'], ['sombre', 'Sombre', 'Fond foncé, moins de lumière le soir.']],
foot: 'Paramètres d’accessibilité', btn: 'Paramètres', close: 'Fermer', title: 'Paramètres',
newsH: 'Flux News', levelH: 'Niveau de détail', themesH: 'Thèmes', allThemes: 'Tous les thèmes',
levels: { simple: ['Simple', 'Des mots faciles, très court.'], normal: ['Normal', 'Pour tout le monde (par défaut).'], developpeur: ['Développeur', 'Plus de détails techniques.'] },
themes: ['Audiovisuel', 'Applications', 'Technique et projets', 'Mises à jour du site', 'Météo', 'Minecraft', 'Mind et IA', 'Hub et comptes', 'Vie locale à Lans'],
note: 'Tes choix restent dans ce navigateur. Sans choix : niveau normal, tous les thèmes.',
noStore: 'Ton navigateur ne peut pas mémoriser tes choix : ils valent seulement jusqu’à la fermeture de cette page.',
noneChecked: 'Aucun thème coché : tous les thèmes sont affichés.',
langH: 'Langue', newsLink: 'Voir les news', frOnly: '',
inviteTitle: 'Quel flux veux-tu ?', inviteIntro: 'Choisis le niveau et les thèmes des news. Tu pourras changer plus tard avec le bouton Paramètres.',
ok: 'Valider', later: 'Plus tard'
},
en: {
themeH: 'Theme', themes2: [['clair', 'Light', 'Default.'], ['sombre', 'Dark', 'Dark background, less light at night.']],
foot: 'Accessibility settings', btn: 'Settings', close: 'Close', title: 'Settings',
newsH: 'News feed', levelH: 'Level of detail', themesH: 'Topics', allThemes: 'All topics',
levels: { simple: ['Simple', 'Easy words, very short.'], normal: ['Normal', 'For everyone (default).'], developpeur: ['Developer', 'More technical details.'] },
themes: ['Audiovisual', 'Apps', 'Tech and projects', 'Site updates', 'Weather', 'Minecraft', 'Mind and AI', 'Hub and accounts', 'Local life in Lans'],
note: 'Your choices stay in this browser. By default: normal level, all topics.',
noStore: 'Your browser cannot remember your choices: they only last until you close this page.',
noneChecked: 'No topic ticked: all topics are shown.',
langH: 'Language', newsLink: 'See the news', frOnly: 'The News page is in French.',
inviteTitle: 'Which feed do you want?', inviteIntro: 'Choose the level and topics of the news. You can change them later with the Settings button.',
ok: 'Save', later: 'Later'
},
de: {
themeH: 'Design', themes2: [['clair', 'Hell', 'Standard.'], ['sombre', 'Dunkel', 'Dunkler Hintergrund, weniger Licht am Abend.']],
foot: 'Einstellungen zur Barrierefreiheit', btn: 'Einstellungen', close: 'Schließen', title: 'Einstellungen',
newsH: 'News-Feed', levelH: 'Detailstufe', themesH: 'Themen', allThemes: 'Alle Themen',
levels: { simple: ['Einfach', 'Leichte Wörter, ganz kurz.'], normal: ['Normal', 'Für alle (Standard).'], developpeur: ['Entwickler', 'Mehr technische Details.'] },
themes: ['Audiovisuell', 'Apps', 'Technik und Projekte', 'Website-Updates', 'Wetter', 'Minecraft', 'Mind und KI', 'Hub und Konten', 'Lokales aus Lans'],
note: 'Deine Auswahl bleibt in diesem Browser. Standard: Stufe Normal, alle Themen.',
noStore: 'Dein Browser kann deine Auswahl nicht speichern: sie gilt nur, bis du diese Seite schließt.',
noneChecked: 'Kein Thema gewählt: Es werden alle Themen angezeigt.',
langH: 'Sprache', newsLink: 'News ansehen', frOnly: 'Die News-Seite ist auf Französisch.',
inviteTitle: 'Welchen Feed möchtest du?', inviteIntro: 'Wähle Stufe und Themen der News. Du kannst sie später über die Schaltfläche Einstellungen ändern.',
ok: 'Speichern', later: 'Später'
},
it: {
themeH: 'Tema', themes2: [['clair', 'Chiaro', 'Predefinito.'], ['sombre', 'Scuro', 'Sfondo scuro, meno luce la sera.']],
foot: 'Impostazioni di accessibilità', btn: 'Impostazioni', close: 'Chiudi', title: 'Impostazioni',
newsH: 'Feed News', levelH: 'Livello di dettaglio', themesH: 'Temi', allThemes: 'Tutti i temi',
levels: { simple: ['Semplice', 'Parole facili, molto breve.'], normal: ['Normale', 'Per tutti (predefinito).'], developpeur: ['Sviluppatore', 'Più dettagli tecnici.'] },
themes: ['Audiovisivo', 'App', 'Tecnica e progetti', 'Aggiornamenti del sito', 'Meteo', 'Minecraft', 'Mind e IA', 'Hub e account', 'Vita locale a Lans'],
note: 'Le tue scelte restano in questo browser. Predefinito: livello normale, tutti i temi.',
noStore: 'Il tuo browser non può ricordare le scelte: valgono solo fino alla chiusura di questa pagina.',
noneChecked: 'Nessun tema selezionato: vengono mostrati tutti i temi.',
langH: 'Lingua', newsLink: 'Vedi le news', frOnly: 'La pagina News è in francese.',
inviteTitle: 'Quale feed vuoi?', inviteIntro: 'Scegli il livello e i temi delle news. Potrai cambiarli dopo con il pulsante Impostazioni.',
ok: 'Salva', later: 'Più tardi'
},
es: {
themeH: 'Tema', themes2: [['clair', 'Claro', 'Por defecto.'], ['sombre', 'Oscuro', 'Fondo oscuro, menos luz por la noche.']],
foot: 'Ajustes de accesibilidad', btn: 'Ajustes', close: 'Cerrar', title: 'Ajustes',
newsH: 'Feed de News', levelH: 'Nivel de detalle', themesH: 'Temas', allThemes: 'Todos los temas',
levels: { simple: ['Simple', 'Palabras fáciles, muy breve.'], normal: ['Normal', 'Para todos (por defecto).'], developpeur: ['Desarrollador', 'Más detalles técnicos.'] },
themes: ['Audiovisual', 'Apps', 'Técnica y proyectos', 'Novedades del sitio', 'Tiempo', 'Minecraft', 'Mind e IA', 'Hub y cuentas', 'Vida local en Lans'],
note: 'Tus elecciones se quedan en este navegador. Por defecto: nivel normal, todos los temas.',
noStore: 'Tu navegador no puede recordar tus elecciones: solo valen hasta cerrar esta página.',
noneChecked: 'Ningún tema marcado: se muestran todos los temas.',
langH: 'Idioma', newsLink: 'Ver las news', frOnly: 'La página News está en francés.',
inviteTitle: '¿Qué feed quieres?', inviteIntro: 'Elige el nivel y los temas de las news. Podrás cambiarlos luego con el botón Ajustes.',
ok: 'Guardar', later: 'Más tarde'
}
};
var lang = String(document.documentElement.getAttribute('lang') || 'fr').slice(0, 2).toLowerCase();
if (!Object.prototype.hasOwnProperty.call(T, lang)) lang = 'fr';
var L = T[lang];
var onNewsPage = document.documentElement.hasAttribute('data-news') || /^\/news(\/|$)/.test(location.pathname);
/* News a son propre sous-domaine (aperçu LAN : port 8772 ; site : port 8779). Les liens « /news/… » du site
* et « / » ou « /#… » de la page News sont réécrits au clic vers l'autre adresse. */
var lan = location.port === '8779' || location.port === '8772';
var NEWS_URL = lan ? location.protocol + '//' + location.hostname + ':8772/' : 'https://news.gastinel.me/';
var MAIN_URL = lan ? location.protocol + '//' + location.hostname + ':8779/' : 'https://gastinel.me/';
document.addEventListener('click', function (e) {
var a = e.target && e.target.closest ? e.target.closest('a[href]') : null;
if (!a) return;
var h = a.getAttribute('href');
if (onNewsPage && (a.hasAttribute('data-main') || h === '/' || h.indexOf('/#') === 0)) a.href = MAIN_URL + h.slice(1);
else if (!onNewsPage && h.indexOf('/news/') === 0) a.href = NEWS_URL + h.slice(6);
}, true);
/* ---------- Réglages ---------- */
var storageOk = true;
var state = { level: 'normal', themes: null, asked: false, theme: 'clair' };
/* Thème : clé à part, commune à tous les sites Gastinel (« gastinel-theme » = « clair » ou « sombre »). */
var THEME_KEY = 'gastinel-theme';
/* Cookie de préférence (même nom) partagé par les sous-domaines de gastinel.me : exempté de consentement
* selon la CNIL (réglage demandé par la personne), durée limitée à moins de 13 mois (390 jours). */
var ON_GASTINEL = /(^|\.)gastinel\.me$/.test(location.hostname);
function readThemeCookie() {
var m = document.cookie.match(/(?:^|;\s*)gastinel-theme=(clair|sombre)/);
return m ? m[1] : null;
}
function writeThemeCookie(v) {
if (!ON_GASTINEL) return;
document.cookie = THEME_KEY + '=' + v + '; domain=.gastinel.me; path=/; max-age=' + (390 * 86400) + '; SameSite=Lax; Secure';
}
function load() {
var c = readThemeCookie();
if (c) state.theme = c;
else try { if (window.localStorage.getItem(THEME_KEY) === 'sombre') state.theme = 'sombre'; } catch (e) { storageOk = false; }
try {
var raw = window.localStorage.getItem(STORE_KEY);
if (!raw) return;
var p = JSON.parse(raw);
if (p && typeof p === 'object') {
if (LEVEL_IDS.indexOf(p.level) >= 0) state.level = p.level;
if (Array.isArray(p.themes)) {
var list = p.themes.filter(function (t) { return THEME_IDS.indexOf(t) >= 0; });
state.themes = list.length ? list : null;
}
state.asked = p.asked === true;
}
} catch (e) { storageOk = false; }
}
function probeStorage() {
try {
window.localStorage.setItem('gastinel-probe', '1');
window.localStorage.removeItem('gastinel-probe');
} catch (e) { storageOk = false; }
}
function save() {
try {
window.localStorage.setItem(STORE_KEY, JSON.stringify({ level: state.level, themes: state.themes, asked: state.asked }));
window.localStorage.setItem(THEME_KEY, state.theme);
} catch (e) { storageOk = false; }
writeThemeCookie(state.theme);
try {
document.dispatchEvent(new CustomEvent('gastinel:prefs', { detail: { level: state.level, themes: state.themes } }));
} catch (e) { /* vieux navigateur : le composant relira le stockage au prochain chargement */ }
}
/* ---------- Petits outils DOM ---------- */
function el(tag, cls, text) {
var e = document.createElement(tag);
if (cls) e.className = cls;
if (text != null) e.textContent = text;
return e;
}
var SVGNS = 'http://www.w3.org/2000/svg';
function gear() {
var s = document.createElementNS(SVGNS, 'svg');
s.setAttribute('viewBox', '0 0 24 24');
s.setAttribute('aria-hidden', 'true');
s.setAttribute('focusable', 'false');
var p = document.createElementNS(SVGNS, 'path');
p.setAttribute('d', 'M19.14 12.94c.04-.3.06-.61.06-.94s-.02-.64-.07-.94l2.03-1.58a.49.49 0 0 0 .12-.61l-1.92-3.32a.49.49 0 0 0-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54a.484.484 0 0 0-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58a.49.49 0 0 0-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z');
s.appendChild(p);
return s;
}
var CSS = '' +
'.rg-btn{position:fixed;right:max(14px,env(safe-area-inset-right));bottom:max(14px,env(safe-area-inset-bottom));z-index:9500;width:46px;height:46px;padding:0;border-radius:50%;border:2px solid #242424;background:#fff;color:#242424;display:flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:0 4px 14px rgba(0,0,0,.22);opacity:.88;transition:opacity .2s,background .2s,color .2s}' +
'.rg-foot{color:#fff;font:inherit;text-decoration:none;cursor:pointer}.rg-foot:hover{text-decoration:underline}.rg-foot:focus-visible{outline:2px solid #fff;outline-offset:2px}' +
'.rg-btn:hover,.rg-btn:focus-visible{opacity:1;background:#242424;color:#fff}' +
'.rg-btn:focus-visible{outline:3px solid #1e4d8b;outline-offset:3px}' +
'.rg-btn svg{width:24px;height:24px;fill:currentColor}' +
'.rg-veil{position:fixed;inset:0;z-index:9600;background:rgba(0,0,0,.4);display:flex;align-items:flex-end;justify-content:flex-end;padding:14px}' +
'.rg-veil[hidden]{display:none}' +
'.rg-dialog{background:#fff;color:#1a1d21;font:16px/1.5 var(--font-sans,Inter,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif);width:380px;max-width:100%;max-height:calc(100vh - 28px);max-height:calc(100dvh - 28px);overflow-y:auto;border-radius:12px;border:2px solid #242424;box-shadow:0 12px 40px rgba(0,0,0,.35);padding:18px 20px 20px;box-sizing:border-box;text-align:left}' +
'.rg-dialog *{box-sizing:border-box}' +
'.rg-dialog:focus{outline:none}' +
'.rg-top{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:6px}' +
'.rg-h{font-size:1.25rem;font-weight:700;margin:0;line-height:1.3;color:#1a1d21;letter-spacing:0;text-transform:none}' +
'.rg-x{font:inherit;font-size:1.4rem;line-height:1;width:44px;height:44px;border-radius:50%;border:2px solid #242424;background:#fff;color:#242424;cursor:pointer;flex:none;padding:0}' +
'.rg-x:hover{background:#eceef1}' +
'.rg-sec{margin:14px 0 0;padding:14px 0 0;border:0;border-top:1px solid #e5e7eb;min-width:0}' +
'.rg-sec:first-of-type{border-top:0;padding-top:0}' +
'.rg-sh{font-size:1rem;font-weight:700;margin:0 0 8px;padding:0;color:#1a1d21;text-transform:none;letter-spacing:0}' +
'.rg-fs{border:0;margin:0 0 10px;padding:0;min-width:0}' +
'.rg-lg{font-size:.9rem;font-weight:700;color:#4b5563;padding:0;margin:0 0 4px}' +
'.rg-opt{display:flex;align-items:flex-start;gap:10px;padding:8px 6px;min-height:44px;border-radius:8px;cursor:pointer}' +
'.rg-opt:hover{background:#f3f4f6}' +
'.rg-opt input{width:20px;height:20px;margin:2px 0 0;flex:none;accent-color:#242424;cursor:pointer}' +
'.rg-opt input:focus-visible{outline:3px solid #1e4d8b;outline-offset:2px}' +
'.rg-opt span{display:block}.rg-opt small{display:block;color:#4b5563;font-size:.85rem;line-height:1.35}' +
'.rg-note{font-size:.85rem;color:#4b5563;margin:8px 0 0}' +
'.rg-warn{font-size:.85rem;color:#7a4b00;background:#fff4d6;border-left:4px solid #e0b100;padding:8px 10px;border-radius:4px;margin:8px 0 0}' +
'.rg-langs{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:8px}' +
'.rg-langs a{display:inline-flex;align-items:center;min-height:44px;padding:8px 14px;border-radius:999px;border:2px solid #242424;color:#242424;background:#fff;text-decoration:none;font-weight:600;font-size:.95rem}' +
'.rg-langs a:hover{background:#eceef1}' +
'.rg-langs a[aria-current="true"]{background:#242424;color:#fff}' +
'.rg-langs a:focus-visible,.rg-link:focus-visible,.rg-act:focus-visible,.rg-x:focus-visible{outline:3px solid #1e4d8b;outline-offset:3px}' +
'.rg-link{display:inline-block;margin-top:8px;padding:8px 0;color:#1e4d8b;font-weight:600}' +
'.rg-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:16px}' +
'.rg-act{font:inherit;font-weight:700;min-height:44px;padding:9px 20px;border-radius:999px;border:2px solid #242424;background:#fff;color:#242424;cursor:pointer}' +
'.rg-act.rg-primary{background:#242424;color:#fff}' +
'@media(max-width:600px){.rg-veil{padding:0}.rg-dialog{width:100%;border-radius:14px 14px 0 0;max-height:88vh;max-height:88dvh;border-width:2px 0 0}}' +
'@media(prefers-reduced-motion:reduce){.rg-btn{transition:none}}' +
'@media print{.rg-btn,.rg-veil{display:none!important}}' +
'html.theme-sombre{filter:invert(.92) hue-rotate(180deg);background:#fff}' +
'html.theme-sombre img,html.theme-sombre video,html.theme-sombre iframe,html.theme-sombre picture,html.theme-sombre .rg-photo,html.theme-sombre [style*="background-image"],html.theme-sombre .leaflet-container{filter:invert(1) hue-rotate(180deg)}' +
'html.theme-sombre .global-footer,html.theme-sombre .actus-bouton-zone{filter:invert(1) hue-rotate(180deg)}';
/* ---------- Panneau ---------- */
var btn, veil, dialog, opener = null, mode = 'settings', built = false;
var levelInputs = {}, themeInputs = {}, allBtn = null, warnEl = null, noneEl = null;
function syncForm() {
LEVEL_IDS.forEach(function (id) { levelInputs[id].checked = state.level === id; });
THEME_IDS.forEach(function (id) { themeInputs[id].checked = !state.themes || state.themes.indexOf(id) >= 0; });
if (noneEl) noneEl.hidden = true;
}
function readThemes() {
var sel = THEME_IDS.filter(function (id) { return themeInputs[id].checked; });
if (sel.length === 0) { noneEl.hidden = false; state.themes = null; }
else { noneEl.hidden = true; state.themes = sel.length === THEME_IDS.length ? null : sel; }
}
function newsSection() {
var sec = el('section', 'rg-sec');
sec.setAttribute('aria-labelledby', 'rg-news-h');
var h = el('h3', 'rg-sh', L.newsH); h.id = 'rg-news-h';
sec.appendChild(h);
var fs1 = el('fieldset', 'rg-fs');
fs1.appendChild(el('legend', 'rg-lg', L.levelH));
LEVEL_IDS.forEach(function (id) {
var lab = el('label', 'rg-opt');
var inp = el('input'); inp.type = 'radio'; inp.name = 'rg-level'; inp.value = id;
inp.addEventListener('change', function () { if (inp.checked) { state.level = id; save(); } });
levelInputs[id] = inp;
var tx = el('span'); tx.appendChild(document.createTextNode(L.levels[id][0]));
tx.appendChild(el('small', null, L.levels[id][1]));
lab.appendChild(inp); lab.appendChild(tx);
fs1.appendChild(lab);
});
sec.appendChild(fs1);
var fs2 = el('fieldset', 'rg-fs');
fs2.appendChild(el('legend', 'rg-lg', L.themesH));
THEME_IDS.forEach(function (id, i) {
var lab = el('label', 'rg-opt');
var inp = el('input'); inp.type = 'checkbox'; inp.value = id;
inp.addEventListener('change', function () { readThemes(); save(); });
themeInputs[id] = inp;
lab.appendChild(inp); lab.appendChild(el('span', null, L.themes[i]));
fs2.appendChild(lab);
});
allBtn = el('button', 'rg-act', L.allThemes);
allBtn.type = 'button';
allBtn.addEventListener('click', function () {
state.themes = null; syncForm(); save();
});
fs2.appendChild(allBtn);
noneEl = el('p', 'rg-note', L.noneChecked); noneEl.hidden = true; noneEl.setAttribute('role', 'status');
fs2.appendChild(noneEl);
sec.appendChild(fs2);
sec.appendChild(el('p', 'rg-note', L.note));
warnEl = el('p', 'rg-warn', L.noStore); warnEl.hidden = storageOk; warnEl.setAttribute('role', 'status');
sec.appendChild(warnEl);
return sec;
}
/* Thème : clair par défaut, sombre seulement si la personne le choisit (proposition du 26/10). */
function applyTheme() {
document.documentElement.classList.toggle('theme-sombre', state.theme === 'sombre');
if (state.theme !== 'sombre') return;
/* Les photos posées en fond CSS (carrousel, bandeaux) sont remises à l'endroit. */
Array.prototype.forEach.call(document.querySelectorAll('body *'), function (e) {
if (e.classList.contains('rg-photo') || e.closest('.rg-photo')) return;
var bg = getComputedStyle(e).backgroundImage;
if (bg && bg.indexOf('url(') >= 0) e.classList.add('rg-photo');
});
}
function themeSection() {
var sec = el('section', 'rg-sec');
sec.setAttribute('aria-labelledby', 'rg-theme-h');
var h = el('h3', 'rg-sh', L.themeH); h.id = 'rg-theme-h';
sec.appendChild(h);
L.themes2.forEach(function (t) {
var lab = el('label', 'rg-opt');
var inp = el('input'); inp.type = 'radio'; inp.name = 'rg-theme'; inp.value = t[0];
inp.checked = state.theme === t[0];
inp.addEventListener('change', function () { if (inp.checked) { state.theme = t[0]; applyTheme(); save(); } });
var tx = el('span'); tx.appendChild(document.createTextNode(t[1])); tx.appendChild(el('small', null, t[2]));
lab.appendChild(inp); lab.appendChild(tx); sec.appendChild(lab);
});
return sec;
}
function langSection() {
var sec = el('section', 'rg-sec');
sec.setAttribute('aria-labelledby', 'rg-lang-h');
var h = el('h3', 'rg-sh', L.langH); h.id = 'rg-lang-h';
sec.appendChild(h);
var ul = el('ul', 'rg-langs');
LANGS.forEach(function (l) {
var li = el('li');
var a = el('a', null, l[2]);
a.href = l[1]; a.setAttribute('hreflang', l[0]); a.setAttribute('lang', l[0]);
if (l[0] === lang) a.setAttribute('aria-current', 'true');
li.appendChild(a); ul.appendChild(li);
});
sec.appendChild(ul);
if (L.frOnly) sec.appendChild(el('p', 'rg-note', L.frOnly));
if (!onNewsPage) {
var a2 = el('a', 'rg-link', L.newsLink); a2.href = '/news/';
if (lang !== 'fr') a2.setAttribute('lang', 'fr');
sec.appendChild(a2);
}
return sec;
}
function build() {
if (built) return;
built = true;
var st = el('style'); st.id = 'rg-css'; st.textContent = CSS; document.head.appendChild(st);
/* Page News : petit bouton rond en bas à droite. Ailleurs : lien texte dans le pied de page (demande de Théo, 26/10). */
var foot = onNewsPage ? null : document.querySelector('.footer-bottom');
if (foot) {
btn = el('a', 'rg-foot', L.foot);
btn.href = '#';
btn.setAttribute('role', 'button');
foot.appendChild(document.createTextNode(' | '));
foot.appendChild(btn);
btn.addEventListener('click', function (e) { e.preventDefault(); openPanel('settings', btn); });
} else {
btn = el('button', 'rg-btn');
btn.type = 'button';
btn.setAttribute('aria-label', L.btn);
btn.setAttribute('title', L.btn);
btn.appendChild(gear());
btn.addEventListener('click', function () { openPanel('settings', btn); });
document.body.appendChild(btn);
}
btn.setAttribute('aria-haspopup', 'dialog');
btn.setAttribute('aria-expanded', 'false');
veil = el('div', 'rg-veil'); veil.hidden = true;
veil.addEventListener('mousedown', function (e) { if (e.target === veil) closePanel(); });
dialog = el('div', 'rg-dialog');
dialog.setAttribute('role', 'dialog');
dialog.setAttribute('aria-modal', 'true');
dialog.setAttribute('aria-labelledby', 'rg-title');
dialog.tabIndex = -1;
veil.appendChild(dialog);
document.body.appendChild(veil);
}
/* (Re)construit le contenu du panneau selon le mode : « settings » ou « invite ». */
function fill() {
dialog.textContent = '';
levelInputs = {}; themeInputs = {};
var top = el('div', 'rg-top');
var h = el('h2', 'rg-h', mode === 'invite' ? L.inviteTitle : (onNewsPage ? L.title : L.foot)); h.id = 'rg-title';
top.appendChild(h);
var x = el('button', 'rg-x'); x.type = 'button'; x.setAttribute('aria-label', L.close); x.textContent = '×';
x.addEventListener('click', closePanel);
top.appendChild(x);
dialog.appendChild(top);
if (mode === 'invite') dialog.appendChild(el('p', 'rg-note', L.inviteIntro));
if (onNewsPage || mode === 'invite') dialog.appendChild(newsSection());
if (mode === 'invite') {
var act = el('div', 'rg-actions');
var ok = el('button', 'rg-act rg-primary', L.ok); ok.type = 'button';
ok.addEventListener('click', closePanel);
var later = el('button', 'rg-act', L.later); later.type = 'button';
later.addEventListener('click', closePanel);
act.appendChild(ok); act.appendChild(later);
dialog.appendChild(act);
} else {
dialog.appendChild(themeSection());
/* Sites sans traductions (ex. statistiques) : <html data-reglages="theme"> = thème seulement. */
if (document.documentElement.getAttribute('data-reglages') !== 'theme') dialog.appendChild(langSection());
}
if (onNewsPage || mode === 'invite') syncForm();
}
function focusables() {
var nodes = dialog.querySelectorAll('a[href],button:not([disabled]),input:not([disabled])');
return Array.prototype.filter.call(nodes, function (n) { return n.offsetParent !== null || n === document.activeElement; });
}
function onKey(e) {
if (veil.hidden) return;
if (e.key === 'Escape' || e.key === 'Esc') { e.preventDefault(); closePanel(); return; }
if (e.key !== 'Tab') return;
var f = focusables();
if (!f.length) { e.preventDefault(); dialog.focus(); return; }
var first = f[0], last = f[f.length - 1], a = document.activeElement;
if (!dialog.contains(a)) { e.preventDefault(); first.focus(); }
else if (e.shiftKey && (a === first || a === dialog)) { e.preventDefault(); last.focus(); }
else if (!e.shiftKey && a === last) { e.preventDefault(); first.focus(); }
}
function openPanel(m, from) {
build();
if (!veil.hidden) return;
mode = m;
opener = from || document.activeElement;
fill();
veil.hidden = false;
btn.setAttribute('aria-expanded', 'true');
var target = levelInputs[state.level] || dialog.querySelector('input:checked') || dialog;
target.focus();
document.addEventListener('keydown', onKey, true);
}
function closePanel() {
if (veil.hidden) return;
var wasInvite = mode === 'invite';
veil.hidden = true;
btn.setAttribute('aria-expanded', 'false');
document.removeEventListener('keydown', onKey, true);
if (wasInvite || !state.asked) { state.asked = true; save(); }
var back = opener && opener !== document.body && document.contains(opener) ? opener : btn;
try { back.focus(); } catch (e) { /* rien */ }
opener = null;
}
/* Le composant News peut demander l'ouverture (bouton « Changer mon flux »). */
document.addEventListener('gastinel:open-reglages', function () { build(); openPanel('settings', document.activeElement); });
function start() {
probeStorage();
load();
applyTheme();
window.addEventListener('load', applyTheme);
build();
if (onNewsPage && storageOk && !state.asked) {
/* première visite de /news/ : l'invite s'ouvre une fois, puis se range */
openPanel('invite', null);
}
}
if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', start); else start();
})();