Premier commit
Cette révision appartient à :
révision
0ec3f0e133
109 fichiers modifiés
+17644
Aucun fichier ne correspond à votre recherche
@@ -0,0 +1,611 @@
|
||||
#!/usr/bin/env node
|
||||
/**
|
||||
* tools/admin-news.js
|
||||
*
|
||||
* Gestionnaire local autonome pour l'administration et la synchronisation
|
||||
* des dépêches et articles de gastinel.me.
|
||||
*
|
||||
* Zéro dépendance externe (Node.js natif : http, fs, path, child_process).
|
||||
* Écoute strictement sur 127.0.0.1:3000.
|
||||
*
|
||||
* Usage :
|
||||
* node tools/admin-news.js -> Lance le serveur d'administration web sur http://127.0.0.1:3000
|
||||
* node tools/admin-news.js sync -> Déclenche la synchronisation SSH/SCP immédiate sans interface
|
||||
*/
|
||||
|
||||
const http = require('http');
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const { exec, spawn } = require('child_process');
|
||||
|
||||
// Configuration
|
||||
const PORT = process.env.PORT ? parseInt(process.env.PORT, 10) : 3000;
|
||||
const HOST = '127.0.0.1';
|
||||
const NEWS_FILE = path.resolve(__dirname, '../data/news.json');
|
||||
|
||||
// Paramètres de synchronisation VPS Suisse (surchargeables via variables d'environnement)
|
||||
const VPS_CONFIG = {
|
||||
host: process.env.VPS_HOST || 'vps.gastinel.me',
|
||||
user: process.env.VPS_USER || 'root',
|
||||
port: process.env.VPS_PORT || '22',
|
||||
remotePath: process.env.VPS_PATH || '/usr/share/nginx/html/data/',
|
||||
sshKey: process.env.SSH_KEY || '' // ex: C:/Users/theog/.ssh/id_ed25519 ou ~/.ssh/id_ed25519
|
||||
};
|
||||
|
||||
function ensureDataFile() {
|
||||
const dir = path.dirname(NEWS_FILE);
|
||||
if (!fs.existsSync(dir)) fs.mkdirSync(dir, { recursive: true });
|
||||
if (!fs.existsSync(NEWS_FILE)) fs.writeFileSync(NEWS_FILE, '[]', 'utf8');
|
||||
}
|
||||
|
||||
function readNews() {
|
||||
ensureDataFile();
|
||||
try {
|
||||
const raw = fs.readFileSync(NEWS_FILE, 'utf8');
|
||||
return JSON.parse(raw);
|
||||
} catch (err) {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
function writeNews(items) {
|
||||
ensureDataFile();
|
||||
fs.writeFileSync(NEWS_FILE, JSON.stringify(items, null, 2), 'utf8');
|
||||
}
|
||||
|
||||
function runSync(callback) {
|
||||
ensureDataFile();
|
||||
// Vérifier si rsync est disponible (Linux/WSL/Git Bash), sinon utiliser scp (Windows natif)
|
||||
exec('rsync --version', (err) => {
|
||||
let cmd = '';
|
||||
const keyOpt = VPS_CONFIG.sshKey ? `-i "${VPS_CONFIG.sshKey}"` : '';
|
||||
|
||||
if (!err) {
|
||||
const sshCmd = VPS_CONFIG.port !== '22' || keyOpt ? `-e "ssh -p ${VPS_CONFIG.port} ${keyOpt}"` : '';
|
||||
cmd = `rsync -avz ${sshCmd} "${NEWS_FILE}" ${VPS_CONFIG.user}@${VPS_CONFIG.host}:${VPS_CONFIG.remotePath}`;
|
||||
} else {
|
||||
// Repli robuste sur SCP natif
|
||||
const portOpt = VPS_CONFIG.port !== '22' ? `-P ${VPS_CONFIG.port}` : '';
|
||||
cmd = `scp ${keyOpt} ${portOpt} "${NEWS_FILE}" ${VPS_CONFIG.user}@${VPS_CONFIG.host}:${VPS_CONFIG.remotePath}`;
|
||||
}
|
||||
|
||||
const startTime = Date.now();
|
||||
exec(cmd, (execErr, stdout, stderr) => {
|
||||
const duration = Date.now() - startTime;
|
||||
if (execErr) {
|
||||
callback({
|
||||
success: false,
|
||||
command: cmd,
|
||||
durationMs: duration,
|
||||
error: execErr.message,
|
||||
stderr: stderr || execErr.message
|
||||
});
|
||||
} else {
|
||||
callback({
|
||||
success: true,
|
||||
command: cmd,
|
||||
durationMs: duration,
|
||||
stdout: stdout || 'news.json transféré avec succès.'
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// Mode CLI direct : node tools/admin-news.js sync
|
||||
if (process.argv[2] === 'sync') {
|
||||
console.log(`[SYNC] Démarrage de la synchronisation vers ${VPS_CONFIG.user}@${VPS_CONFIG.host}...`);
|
||||
runSync((res) => {
|
||||
if (res.success) {
|
||||
console.log(`[OK] Synchronisé en ${res.durationMs}ms`);
|
||||
console.log(res.stdout);
|
||||
process.exit(0);
|
||||
} else {
|
||||
console.error(`[ERREUR] Échec de la synchronisation :`);
|
||||
console.error(res.error);
|
||||
if (res.stderr) console.error(res.stderr);
|
||||
console.error(`Commande exécutée : ${res.command}`);
|
||||
process.exit(1);
|
||||
}
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
// HTML & CSS de l'interface locale
|
||||
const HTML_UI = `<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Admin News — gastinel.me</title>
|
||||
<style>
|
||||
:root {
|
||||
--bg: #0d0e12;
|
||||
--panel: #16181f;
|
||||
--border: #262933;
|
||||
--text: #e1e3ea;
|
||||
--muted: #8b90a0;
|
||||
--accent: #2563eb;
|
||||
--accent-hover: #1d4ed8;
|
||||
--danger: #dc2626;
|
||||
--success: #10b981;
|
||||
--radius: 8px;
|
||||
--font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
|
||||
}
|
||||
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||||
body {
|
||||
background: var(--bg);
|
||||
color: var(--text);
|
||||
font-family: var(--font);
|
||||
padding: 30px 20px;
|
||||
line-height: 1.5;
|
||||
}
|
||||
.container {
|
||||
max-width: 960px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
border-bottom: 1px solid var(--border);
|
||||
padding-bottom: 18px;
|
||||
margin-bottom: 28px;
|
||||
}
|
||||
h1 { font-size: 1.4rem; font-weight: 700; letter-spacing: -0.02em; }
|
||||
.badge-local {
|
||||
background: rgba(37, 99, 235, 0.15);
|
||||
color: #60a5fa;
|
||||
padding: 4px 10px;
|
||||
border-radius: 999px;
|
||||
font-size: 0.75rem;
|
||||
font-weight: 600;
|
||||
}
|
||||
.layout {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 28px;
|
||||
}
|
||||
@media (max-width: 820px) {
|
||||
.layout { grid-template-columns: 1fr; }
|
||||
}
|
||||
.card {
|
||||
background: var(--panel);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius);
|
||||
padding: 24px;
|
||||
}
|
||||
.card h2 {
|
||||
font-size: 1.1rem;
|
||||
margin-bottom: 16px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
.form-group {
|
||||
margin-bottom: 14px;
|
||||
}
|
||||
label {
|
||||
display: block;
|
||||
font-size: 0.82rem;
|
||||
font-weight: 600;
|
||||
color: var(--muted);
|
||||
margin-bottom: 6px;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.04em;
|
||||
}
|
||||
input, select, textarea {
|
||||
width: 100%;
|
||||
background: #090a0d;
|
||||
border: 1px solid var(--border);
|
||||
color: var(--text);
|
||||
padding: 10px 12px;
|
||||
border-radius: 6px;
|
||||
font-family: inherit;
|
||||
font-size: 0.92rem;
|
||||
transition: border-color 0.2s;
|
||||
}
|
||||
input:focus, select:focus, textarea:focus {
|
||||
outline: none;
|
||||
border-color: var(--accent);
|
||||
}
|
||||
textarea { min-height: 80px; resize: vertical; }
|
||||
.row { display: flex; gap: 12px; }
|
||||
.row .form-group { flex: 1; }
|
||||
.btn {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 8px;
|
||||
padding: 10px 18px;
|
||||
font-size: 0.9rem;
|
||||
font-weight: 600;
|
||||
border-radius: 6px;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
transition: background 0.2s, opacity 0.2s;
|
||||
}
|
||||
.btn-primary { background: var(--accent); color: #fff; width: 100%; }
|
||||
.btn-primary:hover { background: var(--accent-hover); }
|
||||
.btn-sync {
|
||||
background: #1f2937;
|
||||
color: #e5e7eb;
|
||||
border: 1px solid #374151;
|
||||
}
|
||||
.btn-sync:hover { background: #374151; }
|
||||
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
|
||||
|
||||
.news-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
max-height: 480px;
|
||||
overflow-y: auto;
|
||||
padding-right: 4px;
|
||||
}
|
||||
.news-item {
|
||||
background: #090a0d;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 6px;
|
||||
padding: 14px;
|
||||
position: relative;
|
||||
}
|
||||
.item-meta {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-size: 0.75rem;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
.item-tag {
|
||||
background: rgba(255,255,255,0.08);
|
||||
padding: 2px 8px;
|
||||
border-radius: 4px;
|
||||
font-weight: 600;
|
||||
color: #d1d5db;
|
||||
}
|
||||
.item-date { color: var(--muted); }
|
||||
.item-title {
|
||||
font-size: 0.95rem;
|
||||
font-weight: 700;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
.item-desc {
|
||||
font-size: 0.85rem;
|
||||
color: var(--muted);
|
||||
margin-bottom: 8px;
|
||||
line-height: 1.4;
|
||||
}
|
||||
.item-actions {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
.item-link {
|
||||
font-size: 0.78rem;
|
||||
color: #60a5fa;
|
||||
text-decoration: none;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
max-width: 75%;
|
||||
}
|
||||
.item-link:hover { text-decoration: underline; }
|
||||
.btn-delete {
|
||||
background: none;
|
||||
border: none;
|
||||
color: #f87171;
|
||||
cursor: pointer;
|
||||
font-size: 0.75rem;
|
||||
padding: 2px 6px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.btn-delete:hover { background: rgba(239, 68, 68, 0.15); }
|
||||
|
||||
.sync-panel {
|
||||
margin-top: 24px;
|
||||
background: var(--panel);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius);
|
||||
padding: 20px 24px;
|
||||
}
|
||||
.sync-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
.console {
|
||||
background: #090a0d;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 6px;
|
||||
padding: 12px;
|
||||
font-family: monospace;
|
||||
font-size: 0.82rem;
|
||||
color: #94a3b8;
|
||||
white-space: pre-wrap;
|
||||
max-height: 150px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<header>
|
||||
<div>
|
||||
<h1>Dépêches & Articles — Gastinel.me</h1>
|
||||
<span style="font-size:0.8rem; color:var(--muted)">Gestionnaire local statique pour news.json</span>
|
||||
</div>
|
||||
<span class="badge-local">127.0.0.1:3000 (LOCAL ONLY)</span>
|
||||
</header>
|
||||
|
||||
<div class="layout">
|
||||
<!-- Formulaire d'ajout -->
|
||||
<div class="card">
|
||||
<h2>Rédiger une dépêche</h2>
|
||||
<form id="newsForm">
|
||||
<div class="row">
|
||||
<div class="form-group">
|
||||
<label>Date (YYYY-MM)</label>
|
||||
<input type="text" id="date" required value="${new Date().toISOString().slice(0, 7)}">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Tag / Thème</label>
|
||||
<input type="text" id="tag" required placeholder="Audiovisuel, Infrastructure..." list="tagList">
|
||||
<datalist id="tagList">
|
||||
<option value="Audiovisuel">
|
||||
<option value="Infrastructure">
|
||||
<option value="Logiciel">
|
||||
<option value="Expédition">
|
||||
<option value="Radio / Réseau">
|
||||
</datalist>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Titre de l'article</label>
|
||||
<input type="text" id="title" required placeholder="Ex: Tournage 4K au crépuscule...">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Résumé court (2 à 3 lignes max)</label>
|
||||
<textarea id="desc" required placeholder="Description percutante affichée sur la carte d'accueil..."></textarea>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Lien complet de l'article</label>
|
||||
<input type="url" id="link" required placeholder="https://news.gastinel.me/mon-article">
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary" id="submitBtn">
|
||||
+ Ajouter en tête de news.json
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- Liste des articles -->
|
||||
<div class="card">
|
||||
<h2>
|
||||
Articles enregistrés
|
||||
<span id="countBadge" style="font-size:0.8rem; color:var(--muted); font-weight:normal">0 article</span>
|
||||
</h2>
|
||||
<div class="news-list" id="newsList"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Panneau de synchronisation VPS -->
|
||||
<div class="sync-panel">
|
||||
<div class="sync-header">
|
||||
<div>
|
||||
<h3 style="font-size:1rem; font-weight:600">Déploiement VPS Suisse (SSH / SCP / Rsync)</h3>
|
||||
<p style="font-size:0.8rem; color:var(--muted)">Cible : ${VPS_CONFIG.user}@${VPS_CONFIG.host}:${VPS_CONFIG.remotePath}</p>
|
||||
</div>
|
||||
<button class="btn btn-sync" id="syncBtn">⚡ Synchroniser maintenant</button>
|
||||
</div>
|
||||
<div class="console" id="syncConsole">En attente d'une action...</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const form = document.getElementById('newsForm');
|
||||
const newsList = document.getElementById('newsList');
|
||||
const countBadge = document.getElementById('countBadge');
|
||||
const syncBtn = document.getElementById('syncBtn');
|
||||
const syncConsole = document.getElementById('syncConsole');
|
||||
|
||||
function log(msg) {
|
||||
syncConsole.textContent = msg;
|
||||
}
|
||||
|
||||
async function loadNews() {
|
||||
try {
|
||||
const res = await fetch('/api/news');
|
||||
const items = await res.json();
|
||||
countBadge.textContent = items.length + ' article' + (items.length > 1 ? 's' : '');
|
||||
if (!items.length) {
|
||||
newsList.innerHTML = '<div style="color:var(--muted); font-size:0.85rem; padding:20px; text-align:center">Aucun article dans news.json</div>';
|
||||
return;
|
||||
}
|
||||
newsList.innerHTML = items.map(a => \`
|
||||
<div class="news-item">
|
||||
<div class="item-meta">
|
||||
<span class="item-tag">\${escapeHtml(a.tag)}</span>
|
||||
<span class="item-date">\${escapeHtml(a.date)} (ID: \${a.id})</span>
|
||||
</div>
|
||||
<div class="item-title">\${escapeHtml(a.title)}</div>
|
||||
<div class="item-desc">\${escapeHtml(a.desc)}</div>
|
||||
<div class="item-actions">
|
||||
<a href="\${escapeHtml(a.link)}" target="_blank" class="item-link">\${escapeHtml(a.link)}</a>
|
||||
<button class="btn-delete" onclick="deleteItem(\${a.id})">Supprimer</button>
|
||||
</div>
|
||||
</div>
|
||||
\`).join('');
|
||||
} catch (err) {
|
||||
newsList.innerHTML = '<div style="color:var(--danger)">Erreur de chargement des articles</div>';
|
||||
}
|
||||
}
|
||||
|
||||
function escapeHtml(str) {
|
||||
if (!str) return '';
|
||||
return String(str)
|
||||
.replace(/&/g, '&')
|
||||
.replace(/</g, '<')
|
||||
.replace(/>/g, '>')
|
||||
.replace(/"/g, '"');
|
||||
}
|
||||
|
||||
form.addEventListener('submit', async (e) => {
|
||||
e.preventDefault();
|
||||
const item = {
|
||||
date: document.getElementById('date').value.trim(),
|
||||
tag: document.getElementById('tag').value.trim(),
|
||||
title: document.getElementById('title').value.trim(),
|
||||
desc: document.getElementById('desc').value.trim(),
|
||||
link: document.getElementById('link').value.trim()
|
||||
};
|
||||
try {
|
||||
const res = await fetch('/api/news', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify(item)
|
||||
});
|
||||
if (res.ok) {
|
||||
form.reset();
|
||||
document.getElementById('date').value = new Date().toISOString().slice(0, 7);
|
||||
log('[SUCCÈS] Article ajouté en tête de news.json ! Pense à synchroniser.');
|
||||
loadNews();
|
||||
} else {
|
||||
const err = await res.json();
|
||||
alert('Erreur: ' + (err.error || 'Échec de l\\ajout'));
|
||||
}
|
||||
} catch (err) {
|
||||
alert('Erreur réseau: ' + err.message);
|
||||
}
|
||||
});
|
||||
|
||||
async function deleteItem(id) {
|
||||
if (!confirm('Supprimer cet article ?')) return;
|
||||
try {
|
||||
const res = await fetch('/api/news/' + id, { method: 'DELETE' });
|
||||
if (res.ok) {
|
||||
log('[INFO] Article ID ' + id + ' supprimé.');
|
||||
loadNews();
|
||||
}
|
||||
} catch (err) {
|
||||
alert('Erreur: ' + err.message);
|
||||
}
|
||||
}
|
||||
|
||||
syncBtn.addEventListener('click', async () => {
|
||||
syncBtn.disabled = true;
|
||||
syncBtn.textContent = 'Transfert en cours...';
|
||||
log('[SYNC] Démarrage du déploiement vers le VPS suisse...');
|
||||
try {
|
||||
const res = await fetch('/api/sync', { method: 'POST' });
|
||||
const data = await res.json();
|
||||
if (data.success) {
|
||||
log('[SUCCÈS] ' + data.stdout + '\\nDurée : ' + data.durationMs + ' ms\\nCommande : ' + data.command);
|
||||
} else {
|
||||
log('[ERREUR] Échec de synchronisation :\\n' + (data.stderr || data.error) + '\\nCommande : ' + data.command);
|
||||
}
|
||||
} catch (err) {
|
||||
log('[ERREUR RÉSEAU] ' + err.message);
|
||||
} finally {
|
||||
syncBtn.disabled = false;
|
||||
syncBtn.textContent = '⚡ Synchroniser maintenant';
|
||||
}
|
||||
});
|
||||
|
||||
loadNews();
|
||||
</script>
|
||||
</body>
|
||||
</html>`;
|
||||
|
||||
// Serveur HTTP local
|
||||
const server = http.createServer((req, res) => {
|
||||
const parsedUrl = new URL(req.url, `http://${req.headers.host || HOST}`);
|
||||
const pathname = parsedUrl.pathname;
|
||||
|
||||
// GET / -> Page d'administration
|
||||
if (req.method === 'GET' && pathname === '/') {
|
||||
res.writeHead(200, { 'Content-Type': 'text/html; charset=utf-8' });
|
||||
res.end(HTML_UI);
|
||||
return;
|
||||
}
|
||||
|
||||
// GET /api/news -> Flux d'articles
|
||||
if (req.method === 'GET' && pathname === '/api/news') {
|
||||
const news = readNews();
|
||||
res.writeHead(200, {
|
||||
'Content-Type': 'application/json; charset=utf-8',
|
||||
'Cache-Control': 'no-store'
|
||||
});
|
||||
res.end(JSON.stringify(news));
|
||||
return;
|
||||
}
|
||||
|
||||
// POST /api/news -> Ajouter un article en tête
|
||||
if (req.method === 'POST' && pathname === '/api/news') {
|
||||
let body = '';
|
||||
req.on('data', chunk => { body += chunk; });
|
||||
req.on('end', () => {
|
||||
try {
|
||||
const payload = JSON.parse(body);
|
||||
if (!payload.title || !payload.desc || !payload.link) {
|
||||
res.writeHead(400, { 'Content-Type': 'application/json' });
|
||||
res.end(JSON.stringify({ error: 'Champs obligatoires manquants.' }));
|
||||
return;
|
||||
}
|
||||
|
||||
const news = readNews();
|
||||
const nextId = news.reduce((max, item) => Math.max(max, item.id || 0), 0) + 1;
|
||||
|
||||
const newEntry = {
|
||||
id: nextId,
|
||||
date: payload.date || new Date().toISOString().slice(0, 7),
|
||||
tag: payload.tag || 'Actualité',
|
||||
title: payload.title,
|
||||
desc: payload.desc,
|
||||
link: payload.link
|
||||
};
|
||||
|
||||
// Ajout automatique en tête de tableau
|
||||
news.unshift(newEntry);
|
||||
writeNews(news);
|
||||
|
||||
res.writeHead(201, { 'Content-Type': 'application/json' });
|
||||
res.end(JSON.stringify({ success: true, item: newEntry }));
|
||||
} catch (err) {
|
||||
res.writeHead(500, { 'Content-Type': 'application/json' });
|
||||
res.end(JSON.stringify({ error: err.message }));
|
||||
}
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
// DELETE /api/news/:id
|
||||
if (req.method === 'DELETE' && pathname.startsWith('/api/news/')) {
|
||||
const idToDelete = parseInt(pathname.replace('/api/news/', ''), 10);
|
||||
const news = readNews();
|
||||
const filtered = news.filter(n => n.id !== idToDelete);
|
||||
writeNews(filtered);
|
||||
res.writeHead(200, { 'Content-Type': 'application/json' });
|
||||
res.end(JSON.stringify({ success: true, deletedId: idToDelete }));
|
||||
return;
|
||||
}
|
||||
|
||||
// POST /api/sync -> Synchronisation VPS
|
||||
if (req.method === 'POST' && pathname === '/api/sync') {
|
||||
runSync((result) => {
|
||||
res.writeHead(result.success ? 200 : 500, { 'Content-Type': 'application/json' });
|
||||
res.end(JSON.stringify(result));
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
res.writeHead(404, { 'Content-Type': 'text/plain' });
|
||||
res.end('Not Found');
|
||||
});
|
||||
|
||||
server.listen(PORT, HOST, () => {
|
||||
console.log('====================================================');
|
||||
console.log(` Admin News gastinel.me en écoute sur :`);
|
||||
console.log(` http://${HOST}:${PORT}`);
|
||||
console.log(` Cible VPS : ${VPS_CONFIG.user}@${VPS_CONFIG.host}:${VPS_CONFIG.remotePath}`);
|
||||
console.log('====================================================');
|
||||
});
|
||||
@@ -0,0 +1,965 @@
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const { execSync } = require('child_process');
|
||||
|
||||
const SITE_DIR = path.resolve(__dirname, '..');
|
||||
const ACTUAL_DIR = path.resolve(SITE_DIR, '../Actual_Website');
|
||||
const GWS_HTML_PATH = path.join(SITE_DIR, 'gws/index.html');
|
||||
const INDEX_HTML_PATH = path.join(SITE_DIR, 'index.html');
|
||||
|
||||
console.log('[AUTHENTIC-DA] Harmonisation de la DA avec la charte officielle GWS...');
|
||||
|
||||
// =========================================================================
|
||||
// 1. MISE À JOUR DU STYLE DE gws/index.html (Design System Officiel GWS)
|
||||
// =========================================================================
|
||||
let gwsHtml = fs.readFileSync(GWS_HTML_PATH, 'utf8');
|
||||
|
||||
const newGwsCss = `
|
||||
@font-face {
|
||||
font-family: 'Inter';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-display: swap;
|
||||
src: url('../assets/fonts/inter-latin.woff2') format('woff2');
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Inter';
|
||||
font-style: normal;
|
||||
font-weight: 500;
|
||||
font-display: swap;
|
||||
src: url('../assets/fonts/inter-latin.woff2') format('woff2');
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Inter';
|
||||
font-style: normal;
|
||||
font-weight: 600;
|
||||
font-display: swap;
|
||||
src: url('../assets/fonts/inter-latin.woff2') format('woff2');
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Inter';
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
font-display: swap;
|
||||
src: url('../assets/fonts/inter-latin.woff2') format('woff2');
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||
}
|
||||
|
||||
:root {
|
||||
/* Charte officielle Gastinel Weather Studio (src/styles.css) */
|
||||
--blue-900: #123a6b;
|
||||
--blue-700: #1e4d8b;
|
||||
--blue-500: #3a72bd;
|
||||
--blue-050: #eef3fa;
|
||||
|
||||
--grey-900: #1a1d21;
|
||||
--grey-700: #3f464f;
|
||||
--grey-500: #6b7480;
|
||||
--grey-300: #b9c0c9;
|
||||
--grey-200: #e8eaed;
|
||||
--grey-100: #f1f3f5;
|
||||
--bg: #fafbfc;
|
||||
--card-bg: #ffffff;
|
||||
|
||||
--danger: #b3261e;
|
||||
--danger-bg: #fdeceb;
|
||||
--warn: #8a5a00;
|
||||
--warn-bg: #fff6e5;
|
||||
--ok: #1c6b45;
|
||||
--ok-bg: #e9f5ef;
|
||||
|
||||
--radius-sm: 6px;
|
||||
--radius-md: 8px;
|
||||
--radius-lg: 12px;
|
||||
|
||||
--shadow-sm: 0 1px 2px rgba(18, 58, 107, 0.05);
|
||||
--shadow-md: 0 1px 3px rgba(18, 58, 107, 0.08), 0 4px 12px rgba(18, 58, 107, 0.04);
|
||||
--shadow-lg: 0 8px 24px rgba(18, 58, 107, 0.08);
|
||||
|
||||
--font-sans: 'Inter', system-ui, -apple-system, sans-serif;
|
||||
--font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
|
||||
}
|
||||
|
||||
* { box-sizing: border-box; }
|
||||
html { scroll-behavior: smooth; }
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background-color: var(--bg);
|
||||
color: var(--grey-900);
|
||||
font-family: var(--font-sans);
|
||||
line-height: 1.6;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
overflow-x: hidden;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.page-wrapper {
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
/* Header & Navigation */
|
||||
.gws-nav {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 50;
|
||||
background: rgba(255, 255, 255, 0.96);
|
||||
backdrop-filter: blur(12px);
|
||||
-webkit-backdrop-filter: blur(12px);
|
||||
border-bottom: 1px solid var(--grey-200);
|
||||
box-shadow: var(--shadow-sm);
|
||||
padding: 12px 24px;
|
||||
}
|
||||
.gws-nav-inner {
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
gap: 16px;
|
||||
}
|
||||
.gws-brand {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
text-decoration: none;
|
||||
color: var(--grey-900);
|
||||
}
|
||||
.gws-nav-icon {
|
||||
width: 34px;
|
||||
height: 34px;
|
||||
border-radius: var(--radius-sm);
|
||||
border: 1px solid var(--grey-200);
|
||||
background: #ffffff;
|
||||
padding: 2px;
|
||||
}
|
||||
.gws-brand-title {
|
||||
font-weight: 700;
|
||||
font-size: 1.15rem;
|
||||
letter-spacing: -0.3px;
|
||||
color: var(--blue-900);
|
||||
}
|
||||
.gws-brand-badge {
|
||||
font-size: 0.68rem;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.8px;
|
||||
background: var(--blue-050);
|
||||
color: var(--blue-700);
|
||||
border: 1px solid #d4e2f4;
|
||||
padding: 2px 8px;
|
||||
border-radius: 4px;
|
||||
font-weight: 700;
|
||||
}
|
||||
.gws-nav-links {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 20px;
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.gws-nav-links a {
|
||||
color: var(--grey-700);
|
||||
text-decoration: none;
|
||||
font-size: 0.88rem;
|
||||
font-weight: 500;
|
||||
transition: color 0.15s ease;
|
||||
}
|
||||
.gws-nav-links a:hover {
|
||||
color: var(--blue-700);
|
||||
}
|
||||
.gws-back-site {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
font-size: 0.84rem;
|
||||
font-weight: 600;
|
||||
color: var(--grey-700);
|
||||
background: var(--grey-100);
|
||||
border: 1px solid var(--grey-200);
|
||||
padding: 6px 14px;
|
||||
border-radius: var(--radius-sm);
|
||||
text-decoration: none;
|
||||
transition: all 0.15s ease;
|
||||
}
|
||||
.gws-back-site:hover {
|
||||
background: var(--grey-200);
|
||||
color: var(--grey-900);
|
||||
}
|
||||
|
||||
/* Container */
|
||||
.container {
|
||||
max-width: 1140px;
|
||||
margin: 0 auto;
|
||||
padding: 0 20px;
|
||||
}
|
||||
|
||||
/* Hero Section */
|
||||
.gws-hero {
|
||||
padding: 64px 0 50px;
|
||||
text-align: center;
|
||||
}
|
||||
.gws-badge-row {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
background: var(--blue-050);
|
||||
border: 1px solid #d4e2f4;
|
||||
padding: 6px 16px;
|
||||
border-radius: 30px;
|
||||
margin-bottom: 22px;
|
||||
}
|
||||
.status-dot {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
background-color: var(--ok);
|
||||
border-radius: 50%;
|
||||
box-shadow: 0 0 6px var(--ok);
|
||||
animation: pulse-dot 2s infinite ease-in-out;
|
||||
}
|
||||
@keyframes pulse-dot {
|
||||
0%, 100% { opacity: 1; transform: scale(1); }
|
||||
50% { opacity: 0.6; transform: scale(1.15); }
|
||||
}
|
||||
.status-text {
|
||||
font-size: 0.8rem;
|
||||
font-weight: 600;
|
||||
color: var(--blue-700);
|
||||
letter-spacing: 0.3px;
|
||||
}
|
||||
.gws-hero h1 {
|
||||
font-size: clamp(2.2rem, 5vw, 3.4rem);
|
||||
font-weight: 800;
|
||||
color: var(--blue-900);
|
||||
letter-spacing: -0.03em;
|
||||
margin: 0 0 14px 0;
|
||||
line-height: 1.18;
|
||||
}
|
||||
.gws-hero-subtitle {
|
||||
font-size: clamp(1.05rem, 2vw, 1.25rem);
|
||||
color: var(--blue-700);
|
||||
max-width: 760px;
|
||||
margin: 0 auto 16px auto;
|
||||
font-weight: 600;
|
||||
line-height: 1.45;
|
||||
}
|
||||
.gws-hero-desc {
|
||||
font-size: 0.96rem;
|
||||
color: var(--grey-700);
|
||||
max-width: 720px;
|
||||
margin: 0 auto 36px auto;
|
||||
line-height: 1.65;
|
||||
}
|
||||
|
||||
/* Téléchargement Hero Box */
|
||||
.download-action-box {
|
||||
background: var(--card-bg);
|
||||
border: 1px solid var(--grey-200);
|
||||
border-radius: var(--radius-lg);
|
||||
padding: 32px 28px;
|
||||
max-width: 820px;
|
||||
margin: 0 auto;
|
||||
box-shadow: var(--shadow-lg);
|
||||
position: relative;
|
||||
}
|
||||
.download-action-box::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0; left: 0; right: 0; height: 3px;
|
||||
background: linear-gradient(90deg, var(--blue-900), var(--blue-500), var(--blue-900));
|
||||
}
|
||||
.download-options-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1.25fr 1fr;
|
||||
gap: 22px;
|
||||
align-items: stretch;
|
||||
}
|
||||
@media (max-width: 768px) {
|
||||
.download-options-grid { grid-template-columns: 1fr; }
|
||||
}
|
||||
|
||||
/* Carte Principale (.exe) */
|
||||
.primary-download-card {
|
||||
background: #f7faff;
|
||||
border: 1px solid #c8daf0;
|
||||
border-radius: var(--radius-md);
|
||||
padding: 24px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
text-align: left;
|
||||
transition: transform 0.2s ease, box-shadow 0.2s ease;
|
||||
}
|
||||
.primary-download-card:hover {
|
||||
transform: translateY(-2px);
|
||||
box-shadow: var(--shadow-md);
|
||||
}
|
||||
.btn-main-download {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 12px;
|
||||
background: var(--blue-700);
|
||||
color: #ffffff;
|
||||
font-weight: 700;
|
||||
font-size: 1.02rem;
|
||||
padding: 14px 22px;
|
||||
border-radius: var(--radius-sm);
|
||||
text-decoration: none;
|
||||
box-shadow: 0 2px 6px rgba(30, 77, 139, 0.25);
|
||||
transition: all 0.15s ease;
|
||||
margin-top: 18px;
|
||||
}
|
||||
.btn-main-download:hover {
|
||||
background: var(--blue-900);
|
||||
box-shadow: 0 4px 12px rgba(18, 58, 107, 0.35);
|
||||
color: #ffffff;
|
||||
}
|
||||
.btn-main-download svg {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
fill: currentColor;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
/* Carte Alternative (.gws) */
|
||||
.alt-download-card {
|
||||
background: var(--card-bg);
|
||||
border: 1px solid var(--grey-200);
|
||||
border-radius: var(--radius-md);
|
||||
padding: 24px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
text-align: left;
|
||||
transition: border-color 0.2s ease, background 0.2s ease;
|
||||
}
|
||||
.alt-download-card:hover {
|
||||
border-color: var(--blue-500);
|
||||
background: #fbfcfe;
|
||||
}
|
||||
.btn-alt-download {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 10px;
|
||||
background: #ffffff;
|
||||
color: var(--blue-700);
|
||||
font-weight: 600;
|
||||
font-size: 0.94rem;
|
||||
padding: 13px 18px;
|
||||
border-radius: var(--radius-sm);
|
||||
border: 1px solid var(--blue-700);
|
||||
text-decoration: none;
|
||||
transition: all 0.15s ease;
|
||||
margin-top: 18px;
|
||||
}
|
||||
.btn-alt-download:hover {
|
||||
background: var(--blue-050);
|
||||
border-color: var(--blue-900);
|
||||
color: var(--blue-900);
|
||||
}
|
||||
|
||||
.card-title-row {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: baseline;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
.card-title {
|
||||
font-size: 1.08rem;
|
||||
font-weight: 700;
|
||||
color: var(--blue-900);
|
||||
margin: 0;
|
||||
}
|
||||
.card-tag {
|
||||
font-size: 0.7rem;
|
||||
font-weight: 700;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.8px;
|
||||
padding: 2px 8px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.tag-recommended {
|
||||
background: var(--blue-050);
|
||||
color: var(--blue-700);
|
||||
border: 1px solid #d4e2f4;
|
||||
}
|
||||
.tag-nosmartscreen {
|
||||
background: var(--ok-bg);
|
||||
color: var(--ok);
|
||||
border: 1px solid #b7dfcb;
|
||||
}
|
||||
.card-desc {
|
||||
font-size: 0.86rem;
|
||||
color: var(--grey-700);
|
||||
margin: 0;
|
||||
line-height: 1.5;
|
||||
}
|
||||
.card-meta-list {
|
||||
font-size: 0.78rem;
|
||||
color: var(--grey-500);
|
||||
margin-top: 12px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
/* API Status Live Bar */
|
||||
.api-live-bar {
|
||||
margin-top: 22px;
|
||||
padding-top: 16px;
|
||||
border-top: 1px solid var(--grey-200);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
gap: 12px;
|
||||
font-size: 0.8rem;
|
||||
color: var(--grey-500);
|
||||
}
|
||||
.api-status-badge {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
color: var(--ok);
|
||||
font-weight: 600;
|
||||
}
|
||||
.api-status-badge svg {
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
fill: currentColor;
|
||||
}
|
||||
.api-refresh-btn {
|
||||
background: none;
|
||||
border: none;
|
||||
color: var(--blue-700);
|
||||
cursor: pointer;
|
||||
font-size: 0.8rem;
|
||||
font-family: inherit;
|
||||
font-weight: 600;
|
||||
padding: 0;
|
||||
text-decoration: underline;
|
||||
}
|
||||
.api-refresh-btn:hover {
|
||||
color: var(--blue-900);
|
||||
}
|
||||
|
||||
/* Section Intégrité SHA-256 */
|
||||
.sha-section {
|
||||
padding: 44px 0;
|
||||
}
|
||||
.sha-card {
|
||||
background: var(--card-bg);
|
||||
border: 1px solid var(--grey-200);
|
||||
border-radius: var(--radius-md);
|
||||
padding: 24px 28px;
|
||||
box-shadow: var(--shadow-sm);
|
||||
}
|
||||
.sha-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
gap: 12px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
.sha-title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
font-size: 1.02rem;
|
||||
font-weight: 700;
|
||||
color: var(--blue-900);
|
||||
}
|
||||
.sha-title svg {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
fill: var(--blue-700);
|
||||
}
|
||||
.sha-code-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
background: var(--grey-100);
|
||||
border: 1px solid var(--grey-200);
|
||||
border-radius: var(--radius-sm);
|
||||
padding: 10px 14px;
|
||||
margin-bottom: 12px;
|
||||
overflow-x: auto;
|
||||
}
|
||||
.sha-hash {
|
||||
font-family: var(--font-mono);
|
||||
font-size: 0.84rem;
|
||||
color: var(--blue-900);
|
||||
letter-spacing: 0.5px;
|
||||
word-break: break-all;
|
||||
flex: 1;
|
||||
font-variant-numeric: tabular-nums;
|
||||
font-weight: 600;
|
||||
}
|
||||
.copy-btn {
|
||||
background: var(--blue-050);
|
||||
border: 1px solid #d4e2f4;
|
||||
color: var(--blue-700);
|
||||
padding: 6px 14px;
|
||||
border-radius: 4px;
|
||||
font-size: 0.78rem;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
white-space: nowrap;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
transition: all 0.15s ease;
|
||||
}
|
||||
.copy-btn:hover {
|
||||
background: var(--blue-700);
|
||||
color: #ffffff;
|
||||
border-color: var(--blue-700);
|
||||
}
|
||||
.copy-btn.copied {
|
||||
background: var(--ok-bg);
|
||||
border-color: var(--ok);
|
||||
color: var(--ok);
|
||||
}
|
||||
.sha-terminal-cmd {
|
||||
font-size: 0.8rem;
|
||||
color: var(--grey-700);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
gap: 8px;
|
||||
background: var(--grey-100);
|
||||
padding: 8px 12px;
|
||||
border-radius: 4px;
|
||||
border-left: 3px solid var(--blue-700);
|
||||
}
|
||||
.sha-terminal-cmd code {
|
||||
font-family: var(--font-mono);
|
||||
color: var(--blue-900);
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
|
||||
/* Guide Anti-SmartScreen */
|
||||
.smartscreen-section {
|
||||
padding: 56px 0;
|
||||
border-top: 1px solid var(--grey-200);
|
||||
}
|
||||
.section-intro-header {
|
||||
text-align: center;
|
||||
max-width: 750px;
|
||||
margin: 0 auto 36px auto;
|
||||
}
|
||||
.section-tag {
|
||||
font-size: 0.74rem;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 1.2px;
|
||||
color: var(--blue-700);
|
||||
font-weight: 700;
|
||||
margin-bottom: 6px;
|
||||
display: inline-block;
|
||||
}
|
||||
.section-intro-header h2 {
|
||||
font-size: clamp(1.6rem, 3.2vw, 2.2rem);
|
||||
font-weight: 700;
|
||||
color: var(--blue-900);
|
||||
margin: 0 0 10px 0;
|
||||
}
|
||||
.section-intro-header p {
|
||||
color: var(--grey-700);
|
||||
font-size: 0.96rem;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* Explication Transparente */
|
||||
.transparency-banner {
|
||||
background: var(--blue-050);
|
||||
border: 1px solid #d4e2f4;
|
||||
border-left: 4px solid var(--blue-700);
|
||||
border-radius: var(--radius-md);
|
||||
padding: 20px 24px;
|
||||
margin-bottom: 36px;
|
||||
display: flex;
|
||||
gap: 16px;
|
||||
align-items: flex-start;
|
||||
}
|
||||
.transparency-icon {
|
||||
width: 26px;
|
||||
height: 26px;
|
||||
fill: var(--blue-700);
|
||||
flex-shrink: 0;
|
||||
margin-top: 2px;
|
||||
}
|
||||
.transparency-content h3 {
|
||||
font-size: 1.02rem;
|
||||
font-weight: 700;
|
||||
color: var(--blue-900);
|
||||
margin: 0 0 6px 0;
|
||||
}
|
||||
.transparency-content p {
|
||||
font-size: 0.88rem;
|
||||
color: var(--grey-700);
|
||||
margin: 0;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
/* Grille des étapes SmartScreen */
|
||||
.steps-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
gap: 22px;
|
||||
margin-bottom: 36px;
|
||||
}
|
||||
@media (max-width: 900px) {
|
||||
.steps-grid { grid-template-columns: 1fr; }
|
||||
}
|
||||
|
||||
.step-card {
|
||||
background: var(--card-bg);
|
||||
border: 1px solid var(--grey-200);
|
||||
border-radius: var(--radius-md);
|
||||
padding: 22px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
position: relative;
|
||||
box-shadow: var(--shadow-sm);
|
||||
transition: transform 0.2s ease, border-color 0.2s ease;
|
||||
}
|
||||
.step-card:hover {
|
||||
transform: translateY(-2px);
|
||||
border-color: var(--blue-500);
|
||||
}
|
||||
.step-num-badge {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
border-radius: 50%;
|
||||
background: var(--blue-050);
|
||||
border: 1px solid #d4e2f4;
|
||||
color: var(--blue-700);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-weight: 700;
|
||||
font-size: 0.88rem;
|
||||
margin-bottom: 14px;
|
||||
}
|
||||
.step-title {
|
||||
font-size: 1.02rem;
|
||||
font-weight: 700;
|
||||
color: var(--blue-900);
|
||||
margin: 0 0 6px 0;
|
||||
}
|
||||
.step-text {
|
||||
font-size: 0.86rem;
|
||||
color: var(--grey-700);
|
||||
margin: 0 0 16px 0;
|
||||
line-height: 1.5;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
/* Simulation Visuelle Windows SmartScreen */
|
||||
.mockup-window {
|
||||
background: #004275; /* Bleu officiel Windows Defender */
|
||||
border-radius: 6px;
|
||||
padding: 14px;
|
||||
color: #fff;
|
||||
font-size: 0.78rem;
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
||||
border: 1px solid rgba(255, 255, 255, 0.2);
|
||||
user-select: none;
|
||||
}
|
||||
.mockup-header {
|
||||
font-size: 0.84rem;
|
||||
font-weight: 600;
|
||||
margin-bottom: 8px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
.mockup-header svg {
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
fill: #fff;
|
||||
}
|
||||
.mockup-body {
|
||||
color: #e0f2fe;
|
||||
line-height: 1.4;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.mockup-link-target {
|
||||
color: #fff;
|
||||
text-decoration: underline;
|
||||
font-weight: 700;
|
||||
padding: 1px 4px;
|
||||
border-radius: 3px;
|
||||
background: rgba(255, 255, 255, 0.2);
|
||||
display: inline-block;
|
||||
outline: 2px solid #38bdf8;
|
||||
}
|
||||
.mockup-btn-row {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
gap: 8px;
|
||||
margin-top: 12px;
|
||||
}
|
||||
.mockup-btn {
|
||||
padding: 5px 12px;
|
||||
font-size: 0.74rem;
|
||||
border-radius: 3px;
|
||||
font-weight: 600;
|
||||
border: none;
|
||||
cursor: default;
|
||||
}
|
||||
.mockup-btn-primary {
|
||||
background: #38bdf8;
|
||||
color: #00223d;
|
||||
font-weight: 700;
|
||||
}
|
||||
.mockup-btn-secondary {
|
||||
background: rgba(255, 255, 255, 0.15);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
/* Changelog */
|
||||
.changelog-section {
|
||||
padding: 56px 0;
|
||||
border-top: 1px solid var(--grey-200);
|
||||
}
|
||||
.timeline-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 24px;
|
||||
max-width: 860px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.timeline-card {
|
||||
background: var(--card-bg);
|
||||
border: 1px solid var(--grey-200);
|
||||
border-radius: var(--radius-md);
|
||||
padding: 24px 26px;
|
||||
position: relative;
|
||||
box-shadow: var(--shadow-sm);
|
||||
}
|
||||
.timeline-card.is-latest {
|
||||
border-color: #c8daf0;
|
||||
box-shadow: var(--shadow-md);
|
||||
}
|
||||
.timeline-card.is-latest::before {
|
||||
content: 'Dernière Version';
|
||||
position: absolute;
|
||||
top: -10px;
|
||||
right: 22px;
|
||||
background: var(--blue-700);
|
||||
color: #ffffff;
|
||||
font-size: 0.68rem;
|
||||
font-weight: 700;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.8px;
|
||||
padding: 2px 10px;
|
||||
border-radius: 20px;
|
||||
}
|
||||
.timeline-top {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: baseline;
|
||||
flex-wrap: wrap;
|
||||
gap: 10px;
|
||||
border-bottom: 1px solid var(--grey-200);
|
||||
padding-bottom: 10px;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
.timeline-version {
|
||||
font-size: 1.25rem;
|
||||
font-weight: 700;
|
||||
color: var(--blue-900);
|
||||
margin: 0;
|
||||
}
|
||||
.timeline-date {
|
||||
font-size: 0.82rem;
|
||||
color: var(--grey-500);
|
||||
}
|
||||
.changelog-items {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
}
|
||||
.changelog-items li {
|
||||
font-size: 0.9rem;
|
||||
color: var(--grey-700);
|
||||
position: relative;
|
||||
padding-left: 20px;
|
||||
line-height: 1.5;
|
||||
}
|
||||
.changelog-items li::before {
|
||||
content: '▸';
|
||||
position: absolute;
|
||||
left: 0;
|
||||
color: var(--blue-700);
|
||||
font-weight: 700;
|
||||
}
|
||||
.changelog-items li strong {
|
||||
color: var(--grey-900);
|
||||
}
|
||||
|
||||
/* Captures d'écran */
|
||||
.visuals-section {
|
||||
padding: 56px 0;
|
||||
border-top: 1px solid var(--grey-200);
|
||||
}
|
||||
.visuals-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 22px;
|
||||
}
|
||||
@media (max-width: 768px) {
|
||||
.visuals-grid { grid-template-columns: 1fr; }
|
||||
}
|
||||
.visual-card {
|
||||
background: var(--card-bg);
|
||||
border: 1px solid var(--grey-200);
|
||||
border-radius: var(--radius-md);
|
||||
overflow: hidden;
|
||||
box-shadow: var(--shadow-sm);
|
||||
transition: transform 0.2s ease, box-shadow 0.2s ease;
|
||||
}
|
||||
.visual-card:hover {
|
||||
transform: translateY(-2px);
|
||||
box-shadow: var(--shadow-md);
|
||||
}
|
||||
.visual-card img {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
display: block;
|
||||
}
|
||||
.visual-caption {
|
||||
padding: 12px 16px;
|
||||
font-size: 0.84rem;
|
||||
color: var(--grey-700);
|
||||
border-top: 1px solid var(--grey-200);
|
||||
background: var(--grey-100);
|
||||
}
|
||||
|
||||
/* Spécifications & Exigences */
|
||||
.specs-section {
|
||||
padding: 56px 0 70px;
|
||||
border-top: 1px solid var(--grey-200);
|
||||
}
|
||||
.specs-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
gap: 16px;
|
||||
}
|
||||
@media (max-width: 900px) {
|
||||
.specs-grid { grid-template-columns: repeat(2, 1fr); }
|
||||
}
|
||||
@media (max-width: 500px) {
|
||||
.specs-grid { grid-template-columns: 1fr; }
|
||||
}
|
||||
.spec-box {
|
||||
background: var(--card-bg);
|
||||
border: 1px solid var(--grey-200);
|
||||
border-radius: var(--radius-sm);
|
||||
padding: 16px;
|
||||
box-shadow: var(--shadow-sm);
|
||||
}
|
||||
.spec-label {
|
||||
font-size: 0.72rem;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.8px;
|
||||
color: var(--blue-700);
|
||||
font-weight: 700;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
.spec-val {
|
||||
font-size: 0.94rem;
|
||||
font-weight: 700;
|
||||
color: var(--blue-900);
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
.spec-note {
|
||||
font-size: 0.8rem;
|
||||
color: var(--grey-500);
|
||||
}
|
||||
|
||||
/* Footer Global */
|
||||
.gws-footer {
|
||||
margin-top: auto;
|
||||
background: var(--grey-100);
|
||||
border-top: 1px solid var(--grey-200);
|
||||
padding: 36px 20px;
|
||||
text-align: center;
|
||||
font-size: 0.86rem;
|
||||
color: var(--grey-500);
|
||||
}
|
||||
.gws-footer a {
|
||||
color: var(--blue-700);
|
||||
text-decoration: none;
|
||||
}
|
||||
.gws-footer a:hover {
|
||||
text-decoration: underline;
|
||||
color: var(--blue-900);
|
||||
}
|
||||
.gws-footer-links {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
gap: 20px;
|
||||
flex-wrap: wrap;
|
||||
margin-bottom: 14px;
|
||||
}
|
||||
`;
|
||||
|
||||
// Remplacer le contenu <style>...</style> dans gws/index.html
|
||||
const styleRegex = /<style>([\s\S]*?)<\/style>/i;
|
||||
if (styleRegex.test(gwsHtml)) {
|
||||
gwsHtml = gwsHtml.replace(styleRegex, `<style>${newGwsCss}\n</style>`);
|
||||
fs.writeFileSync(GWS_HTML_PATH, gwsHtml, 'utf8');
|
||||
console.log('✓ gws/index.html : CSS recale sur la DA officielle (fond #fafbfc, bleu #1e4d8b, Inter)');
|
||||
} else {
|
||||
console.error('Erreur: <style> introuvable dans gws/index.html');
|
||||
}
|
||||
|
||||
// =========================================================================
|
||||
// 2. SYNCHRONISATION AVEC Actual_Website
|
||||
// =========================================================================
|
||||
function copyDirSync(src, dest) {
|
||||
if (!fs.existsSync(dest)) fs.mkdirSync(dest, { recursive: true });
|
||||
const entries = fs.readdirSync(src, { withFileTypes: true });
|
||||
for (const entry of entries) {
|
||||
const srcPath = path.join(src, entry.name);
|
||||
const destPath = path.join(dest, entry.name);
|
||||
if (entry.isDirectory()) {
|
||||
if (entry.name === '.git' || entry.name === 'node_modules') continue;
|
||||
copyDirSync(srcPath, destPath);
|
||||
} else {
|
||||
fs.copyFileSync(srcPath, destPath);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
copyDirSync(path.join(SITE_DIR, 'gws'), path.join(ACTUAL_DIR, 'gws'));
|
||||
console.log('✓ Synchronisé avec Actual_Website/gws');
|
||||
|
||||
// =========================================================================
|
||||
// 3. PRÉCOMPRESSION BROTLI 11 & GZIP 9
|
||||
// =========================================================================
|
||||
console.log('[AUTHENTIC-DA] Exécution de la pré-compression statique...');
|
||||
execSync('node ' + path.join(SITE_DIR, 'tools/precompress.js'), { stdio: 'inherit', cwd: SITE_DIR });
|
||||
|
||||
// =========================================================================
|
||||
// 4. VALIDATION VIA LA SUITE DE TESTS
|
||||
// =========================================================================
|
||||
console.log('[AUTHENTIC-DA] Lancement de la suite de vérification...');
|
||||
execSync('node ' + path.join(SITE_DIR, 'tools/test-verify.js'), { stdio: 'inherit', cwd: SITE_DIR });
|
||||
|
||||
console.log('[AUTHENTIC-DA] Succès intégral !');
|
||||
@@ -0,0 +1,839 @@
|
||||
#!/usr/bin/env node
|
||||
/**
|
||||
* tools/apply-gws-refonte.js
|
||||
*
|
||||
* Refonte complète et harmonisation de Gastinel Weather Studio (GWS) sur gastinel.me :
|
||||
* 1. Intégration du sas/hub de téléchargement dédié (#gws)
|
||||
* 2. Harmonisation de la Direction Artistique (DA darkroom alpine, cyan givre #38bdf8 / #0284c7)
|
||||
* 3. Remplacement du tag obsolète "Disponible prochainement au téléchargement" par des boutons actifs (.exe / .gws / hub)
|
||||
* 4. Guide anti-SmartScreen Windows Defender pas-à-pas avec schémas
|
||||
* 5. Empreinte d'intégrité SHA-256 avec bouton de copie 1-clic et commande PowerShell
|
||||
* 6. Connexion live à l'API de mise à jour (https://gastinel.me/gws/api/v1/update/windows/x86_64/0.0.0)
|
||||
* 7. Mise à jour de la navigation SPA (.spa-nav), du footer et du routeur
|
||||
*/
|
||||
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
const ROOT_DIR = path.resolve(__dirname, '..');
|
||||
const INDEX_HTML = path.join(ROOT_DIR, 'index.html');
|
||||
|
||||
console.log('[GWS-REFONTE] Lecture de index.html...');
|
||||
let html = fs.readFileSync(INDEX_HTML, 'utf8');
|
||||
const eol = html.includes('\r\n') ? '\r\n' : '\n';
|
||||
|
||||
// 1. MISE À JOUR DE LA NAVIGATION SPA (.spa-nav CSS)
|
||||
const oldSpaNavCss = `.spa-nav { position:sticky; top:0; z-index:6000; display:flex; gap:6px; background:#fff; border-bottom:1px solid #e8e8e8; padding:12px 18px; overflow-x:auto; }
|
||||
.spa-nav a { color:#444; font-family:var(--font-sans); font-weight:500; font-size:.78rem; text-transform:uppercase; letter-spacing:1px; text-decoration:none; padding:6px 12px; border-radius:4px; white-space:nowrap; transition:.25s; }
|
||||
.spa-nav a:hover, .spa-nav a.active { color:#000; background:rgba(0,0,0,.06); }
|
||||
body.spa-nav-hidden .spa-nav { display:none; }`;
|
||||
|
||||
const newSpaNavCss = `.spa-nav { position:sticky; top:0; z-index:6000; display:flex; gap:6px; background:#fff; border-bottom:1px solid #e8e8e8; padding:12px 18px; overflow-x:auto; }
|
||||
.spa-nav a { color:#444; font-family:var(--font-sans); font-weight:500; font-size:.78rem; text-transform:uppercase; letter-spacing:1px; text-decoration:none; padding:6px 12px; border-radius:4px; white-space:nowrap; transition:.25s; }
|
||||
.spa-nav a:hover, .spa-nav a.active { color:#000; background:rgba(0,0,0,.06); }
|
||||
.spa-nav a.spa-nav-gws { color:#0284c7; border:1px solid rgba(2,132,199,.35); background:rgba(56,189,248,.08); font-weight:700; display:inline-flex; align-items:center; gap:6px; }
|
||||
.spa-nav a.spa-nav-gws:hover, .spa-nav a.spa-nav-gws.active { background:#0284c7; color:#fff; border-color:#0284c7; }
|
||||
.spa-nav .nav-gws-pulse { width:7px; height:7px; border-radius:50%; background:#38bdf8; display:inline-block; box-shadow:0 0 8px #38bdf8; }
|
||||
body.spa-nav-hidden .spa-nav { display:none; }`;
|
||||
|
||||
if (html.includes(oldSpaNavCss.replace(/\n/g, eol))) {
|
||||
html = html.replace(oldSpaNavCss.replace(/\n/g, eol), newSpaNavCss.replace(/\n/g, eol));
|
||||
console.log('✓ CSS .spa-nav mis à jour avec le style Weather Studio.');
|
||||
} else {
|
||||
console.log('ℹ Remplacement souple de .spa-nav CSS...');
|
||||
html = html.replace(/\.spa-nav a:hover, \.spa-nav a\.active \{ color:#000; background:rgba\(0,0,0,\.06\); \}/,
|
||||
`.spa-nav a:hover, .spa-nav a.active { color:#000; background:rgba(0,0,0,.06); }${eol}.spa-nav a.spa-nav-gws { color:#0284c7; border:1px solid rgba(2,132,199,.35); background:rgba(56,189,248,.08); font-weight:700; display:inline-flex; align-items:center; gap:6px; }${eol}.spa-nav a.spa-nav-gws:hover, .spa-nav a.spa-nav-gws.active { background:#0284c7; color:#fff; border-color:#0284c7; }${eol}.spa-nav .nav-gws-pulse { width:7px; height:7px; border-radius:50%; background:#38bdf8; display:inline-block; box-shadow:0 0 8px #38bdf8; }`);
|
||||
console.log('✓ CSS .spa-nav mis à jour.');
|
||||
}
|
||||
|
||||
// 2. CSS DARKROOM ALPINE POUR #apps ET #gws
|
||||
const oldAppsCssRegex = /#apps \{ font-family:'Inter'[\s\S]*?#apps \.app-card-top \{ flex-direction:column; align-items:flex-start; gap:12px; \}\s*\}/;
|
||||
|
||||
const newDarkroomCss = `/* ==========================================================================
|
||||
DA DARKROOM ALPINE : MES APPLICATIONS (#apps) & SAS WEATHER STUDIO (#gws)
|
||||
========================================================================== */
|
||||
|
||||
#apps {
|
||||
font-family: var(--font-sans);
|
||||
color: #f1f5f9;
|
||||
background: #06090f;
|
||||
background-image:
|
||||
radial-gradient(ellipse 80% 50% at 50% 0%, rgba(2, 132, 199, 0.18), transparent 70%),
|
||||
radial-gradient(circle 500px at 90% 20%, rgba(56, 189, 248, 0.06), transparent 50%);
|
||||
line-height: 1.6;
|
||||
}
|
||||
#apps .apps-pad { max-width: 1120px; margin: 0 auto; padding: 70px 24px 100px; }
|
||||
#apps .apps-header { border-bottom: 1px solid rgba(255, 255, 255, 0.08); padding-bottom: 32px; margin-bottom: 48px; }
|
||||
#apps .apps-header h1 { font-family: 'Comfortaa', cursive; font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 700; letter-spacing: -.5px; margin: 0 0 14px 0; color: #fff; text-shadow: 0 2px 14px rgba(56, 189, 248, 0.15); }
|
||||
#apps .apps-intro { font-size: 1.02rem; color: #94a3b8; max-width: 680px; margin: 0 0 18px 0; line-height: 1.65; }
|
||||
#apps .apps-note { display: inline-block; font-size: .72rem; text-transform: uppercase; letter-spacing: 1.5px; font-weight: 700; color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.3); border-radius: 4px; padding: 5px 12px; background: rgba(56, 189, 248, 0.08); }
|
||||
|
||||
#apps .apps-category { margin-bottom: 65px; }
|
||||
#apps .apps-category-header { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1px solid rgba(56, 189, 248, 0.25); padding-bottom: 12px; margin-bottom: 20px; }
|
||||
#apps .apps-category-title { font-size: 1.1rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1.2px; margin: 0; color: #fff; }
|
||||
#apps .apps-category-count { font-size: .78rem; font-weight: 600; color: #38bdf8; letter-spacing: .5px; text-transform: uppercase; }
|
||||
#apps .apps-category-desc { font-size: .92rem; color: #94a3b8; margin: 0 0 28px 0; line-height: 1.5; }
|
||||
|
||||
#apps .apps-detailed-list { display: flex; flex-direction: column; gap: 40px; }
|
||||
#apps .app-card-detailed { border: 1px solid rgba(56, 189, 248, 0.16); border-radius: 10px; background: rgba(14, 22, 37, 0.78); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); padding: 34px; box-shadow: 0 10px 30px rgba(0,0,0,0.3); transition: border-color .2s ease, transform .2s ease; }
|
||||
#apps .app-card-detailed:hover { border-color: rgba(56, 189, 248, 0.4); }
|
||||
|
||||
#apps .app-card-top { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; margin-bottom: 22px; }
|
||||
#apps .app-title-group { display: flex; align-items: center; gap: 16px; }
|
||||
#apps .app-icon-img { width: 48px; height: 48px; border-radius: 8px; border: 1px solid rgba(56, 189, 248, 0.3); background: #0a0f18; padding: 2px; object-fit: contain; flex-shrink: 0; box-shadow: 0 0 12px rgba(56, 189, 248, 0.15); }
|
||||
#apps .app-main-title { font-size: 1.4rem; font-weight: 700; color: #fff; margin: 0; letter-spacing: -.3px; }
|
||||
|
||||
#apps .app-status-tag { display: inline-block; font-size: .72rem; text-transform: uppercase; letter-spacing: 1px; font-weight: 600; color: #94a3b8; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 4px; padding: 6px 12px; white-space: nowrap; }
|
||||
|
||||
/* Status badge disponible & actions rapides GWS */
|
||||
#apps .app-status-badge.available { display: inline-flex; align-items: center; gap: 8px; font-size: .74rem; text-transform: uppercase; letter-spacing: 1px; font-weight: 700; color: #38bdf8; background: rgba(2, 132, 199, 0.15); border: 1px solid rgba(56, 189, 248, 0.4); border-radius: 4px; padding: 6px 14px; white-space: nowrap; box-shadow: 0 0 10px rgba(56, 189, 248, 0.15); }
|
||||
#apps .app-status-badge .badge-dot { width: 8px; height: 8px; border-radius: 50%; background: #10b981; box-shadow: 0 0 8px #10b981; }
|
||||
|
||||
#apps .app-status-actions-wrap { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
|
||||
#apps .app-btn-download-quick { display: inline-flex; align-items: center; gap: 8px; background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%); color: #fff; font-weight: 700; font-size: .84rem; text-decoration: none; padding: 8px 16px; border-radius: 6px; box-shadow: 0 2px 10px rgba(2, 132, 199, 0.35); transition: all .2s ease; }
|
||||
#apps .app-btn-download-quick:hover { background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%); transform: translateY(-1px); color: #fff; box-shadow: 0 4px 16px rgba(56, 189, 248, 0.4); }
|
||||
#apps .app-btn-hub-quick { display: inline-flex; align-items: center; gap: 6px; background: rgba(255, 255, 255, 0.06); color: #f1f5f9; font-weight: 600; font-size: .84rem; text-decoration: none; padding: 8px 14px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, 0.15); transition: all .2s ease; }
|
||||
#apps .app-btn-hub-quick:hover { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.3); color: #fff; }
|
||||
|
||||
#apps .app-pitch { font-size: 1.05rem; font-weight: 600; color: #38bdf8; font-style: italic; border-left: 3px solid #0284c7; padding-left: 14px; margin: 0 0 22px 0; }
|
||||
#apps .app-problem { background: rgba(10, 15, 26, 0.7); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 6px; padding: 18px 20px; margin-bottom: 24px; }
|
||||
#apps .app-problem h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: 1px; font-weight: 700; color: #38bdf8; margin: 0 0 8px 0; }
|
||||
#apps .app-problem p { font-size: .92rem; color: #cbd5e1; margin: 0; line-height: 1.65; }
|
||||
|
||||
#apps .app-hero-visual { border-radius: 6px; overflow: hidden; border: 1px solid rgba(56, 189, 248, 0.2); margin: 22px 0 26px; background: #080d16; }
|
||||
#apps .app-hero-visual img { width: 100%; height: auto; display: block; }
|
||||
#apps .app-visual-caption { font-size: .78rem; color: #94a3b8; padding: 8px 14px; border-top: 1px solid rgba(255, 255, 255, 0.06); background: rgba(10, 15, 26, 0.9); }
|
||||
|
||||
#apps .app-features-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 24px 0; }
|
||||
#apps .app-feature-card { background: rgba(15, 23, 42, 0.6); border: 1px solid rgba(255, 255, 255, 0.07); border-radius: 6px; padding: 20px; display: flex; flex-direction: column; justify-content: space-between; }
|
||||
#apps .app-feature-card h4 { font-size: .88rem; text-transform: uppercase; letter-spacing: .8px; font-weight: 700; color: #fff; margin: 0 0 8px 0; }
|
||||
#apps .app-feature-card p { font-size: .88rem; color: #94a3b8; line-height: 1.6; margin: 0; }
|
||||
#apps .app-feature-media { margin-top: 14px; border-radius: 4px; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.1); }
|
||||
#apps .app-feature-media img { width: 100%; height: auto; display: block; }
|
||||
|
||||
#apps .app-meta-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; margin-top: 26px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
|
||||
#apps .app-meta-grid.two-cols { grid-template-columns: 1fr 1fr; }
|
||||
#apps .app-meta-item { background: rgba(10, 15, 26, 0.6); border: 1px solid rgba(255, 255, 255, 0.06); border-radius: 6px; padding: 16px 18px; }
|
||||
#apps .app-meta-item h5 { font-size: .76rem; text-transform: uppercase; letter-spacing: 1px; font-weight: 700; color: #38bdf8; margin: 0 0 6px 0; }
|
||||
#apps .app-meta-item p { font-size: .86rem; color: #cbd5e1; margin: 0; line-height: 1.55; }
|
||||
|
||||
/* Bloc intégrité rapide dans la fiche */
|
||||
#apps .app-inline-integrity { margin-top: 20px; background: rgba(5, 8, 15, 0.8); border: 1px solid rgba(56, 189, 248, 0.2); border-radius: 6px; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: .82rem; }
|
||||
#apps .app-inline-integrity code { font-family: var(--font-mono, monospace); color: #7dd3fc; font-size: .78rem; word-break: break-all; }
|
||||
#apps .app-inline-copy-btn { background: rgba(56, 189, 248, 0.15); border: 1px solid rgba(56, 189, 248, 0.3); color: #38bdf8; padding: 4px 10px; border-radius: 4px; font-size: .74rem; font-weight: 600; cursor: pointer; transition: all .2s; }
|
||||
#apps .app-inline-copy-btn:hover { background: rgba(56, 189, 248, 0.3); color: #fff; }
|
||||
|
||||
/* Grille compacte des projets annoncés */
|
||||
#apps .apps-compact-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
|
||||
#apps .app-card-compact { border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 6px; background: rgba(14, 22, 37, 0.6); overflow: hidden; transition: border-color .2s ease, background .2s ease; }
|
||||
#apps .app-card-compact:hover { border-color: rgba(56, 189, 248, 0.3); background: rgba(14, 22, 37, 0.85); }
|
||||
#apps .app-card-compact[open] { background: rgba(14, 22, 37, 0.95); border-color: rgba(56, 189, 248, 0.45); }
|
||||
|
||||
#apps .app-compact-summary { list-style: none; padding: 18px 20px; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; user-select: none; }
|
||||
#apps .app-compact-summary::-webkit-details-marker { display: none; }
|
||||
#apps .app-compact-info { display: flex; flex-direction: column; gap: 4px; }
|
||||
#apps .app-compact-name { font-size: 1.05rem; font-weight: 700; margin: 0; color: #fff; letter-spacing: -.2px; }
|
||||
#apps .app-compact-status { font-size: .72rem; font-weight: 600; color: #64748b; text-transform: uppercase; letter-spacing: .8px; }
|
||||
#apps .app-compact-arrow { width: 14px; height: 14px; fill: #64748b; transition: transform .25s ease, fill .25s ease; flex-shrink: 0; }
|
||||
#apps .app-card-compact[open] .app-compact-arrow { transform: rotate(180deg); fill: #38bdf8; }
|
||||
|
||||
#apps .app-compact-body { padding: 0 20px 18px 20px; border-top: 1px solid rgba(255, 255, 255, 0.06); margin-top: 2px; padding-top: 14px; }
|
||||
#apps .app-keywords { font-size: .88rem; font-weight: 600; color: #38bdf8; margin-bottom: 8px; letter-spacing: .2px; line-height: 1.4; }
|
||||
#apps .app-timeline { font-size: .8rem; color: #94a3b8; line-height: 1.4; }
|
||||
|
||||
@media (max-width: 850px) {
|
||||
#apps .app-meta-grid { grid-template-columns: 1fr; }
|
||||
}
|
||||
@media (max-width: 768px) {
|
||||
#apps .apps-pad { padding: 45px 18px 60px; }
|
||||
#apps .app-card-detailed { padding: 22px 18px; }
|
||||
#apps .app-features-grid, #apps .app-meta-grid.two-cols { grid-template-columns: 1fr; }
|
||||
#apps .apps-compact-grid { grid-template-columns: 1fr; }
|
||||
#apps .app-card-top { flex-direction: column; align-items: flex-start; gap: 12px; }
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
CSS DU HUB DÉDIÉ WEATHER STUDIO (#gws)
|
||||
========================================================================== */
|
||||
|
||||
#gws {
|
||||
font-family: var(--font-sans);
|
||||
color: #f1f5f9;
|
||||
background: #05080f;
|
||||
background-image:
|
||||
radial-gradient(ellipse 80% 50% at 50% 0%, rgba(2, 132, 199, 0.22), transparent 70%),
|
||||
radial-gradient(circle 600px at 90% 20%, rgba(56, 189, 248, 0.08), transparent 60%),
|
||||
radial-gradient(circle 500px at 10% 70%, rgba(14, 165, 233, 0.06), transparent 50%);
|
||||
min-height: 100vh;
|
||||
padding: 60px 0 100px;
|
||||
}
|
||||
#gws .container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
|
||||
|
||||
#gws .gws-hero { text-align: center; padding-bottom: 60px; }
|
||||
#gws .gws-badge-row { display: inline-flex; align-items: center; gap: 10px; background: rgba(15, 23, 42, 0.85); border: 1px solid rgba(56, 189, 248, 0.25); padding: 6px 16px; border-radius: 30px; margin-bottom: 24px; box-shadow: 0 4px 16px rgba(0,0,0,0.3); }
|
||||
#gws .status-dot { width: 8px; height: 8px; background-color: #10b981; border-radius: 50%; box-shadow: 0 0 8px #10b981; animation: pulse-dot 2s infinite ease-in-out; }
|
||||
#gws .status-text { font-size: 0.78rem; font-weight: 600; color: #38bdf8; letter-spacing: 0.5px; text-transform: uppercase; }
|
||||
|
||||
#gws .gws-hero h1 { font-family: 'Comfortaa', cursive; font-size: clamp(2.4rem, 5.5vw, 4rem); font-weight: 700; color: #fff; letter-spacing: -0.02em; margin: 0 0 16px 0; line-height: 1.15; text-shadow: 0 2px 20px rgba(56, 189, 248, 0.15); }
|
||||
#gws .gws-hero-subtitle { font-size: clamp(1.05rem, 2.2vw, 1.35rem); color: #7dd3fc; max-width: 780px; margin: 0 auto 20px auto; font-weight: 500; line-height: 1.5; }
|
||||
#gws .gws-hero-desc { font-size: 0.98rem; color: #94a3b8; max-width: 700px; margin: 0 auto 40px auto; line-height: 1.65; }
|
||||
|
||||
#gws .download-action-box { background: rgba(14, 22, 37, 0.82); border: 1px solid rgba(56, 189, 248, 0.25); border-radius: 16px; padding: 36px 30px; max-width: 840px; margin: 0 auto; box-shadow: 0 20px 45px rgba(0,0,0,0.4), 0 0 30px rgba(56, 189, 248, 0.08); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); position: relative; overflow: hidden; }
|
||||
#gws .download-action-box::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, transparent, #38bdf8, transparent); }
|
||||
|
||||
#gws .download-options-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 24px; align-items: stretch; }
|
||||
@media (max-width: 768px) { #gws .download-options-grid { grid-template-columns: 1fr; } }
|
||||
|
||||
#gws .primary-download-card { background: linear-gradient(145deg, rgba(2, 132, 199, 0.15), rgba(15, 23, 42, 0.7)); border: 1px solid rgba(56, 189, 248, 0.4); border-radius: 10px; padding: 24px; display: flex; flex-direction: column; justify-content: space-between; text-align: left; transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease; }
|
||||
#gws .primary-download-card:hover { transform: translateY(-2px); border-color: #38bdf8; box-shadow: 0 10px 30px rgba(2, 132, 199, 0.25); }
|
||||
|
||||
#gws .btn-main-download { display: inline-flex; align-items: center; justify-content: center; gap: 12px; background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%); color: #fff; font-weight: 700; font-size: 1.05rem; padding: 16px 22px; border-radius: 6px; text-decoration: none; box-shadow: 0 4px 16px rgba(2, 132, 199, 0.4); transition: all 0.2s ease; margin-top: 18px; }
|
||||
#gws .btn-main-download:hover { background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%); transform: translateY(-1px); box-shadow: 0 6px 22px rgba(56, 189, 248, 0.5); color: #fff; }
|
||||
#gws .btn-main-download svg { width: 22px; height: 22px; fill: currentColor; flex-shrink: 0; }
|
||||
|
||||
#gws .alt-download-card { background: rgba(15, 23, 42, 0.5); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 10px; padding: 24px; display: flex; flex-direction: column; justify-content: space-between; text-align: left; transition: border-color .2s ease, background .2s ease; }
|
||||
#gws .alt-download-card:hover { border-color: rgba(255, 255, 255, 0.2); background: rgba(15, 23, 42, 0.8); }
|
||||
|
||||
#gws .btn-alt-download { display: inline-flex; align-items: center; justify-content: center; gap: 10px; background: rgba(255, 255, 255, 0.06); color: #f1f5f9; font-weight: 600; font-size: 0.95rem; padding: 14px 18px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, 0.15); text-decoration: none; transition: all 0.2s ease; margin-top: 18px; }
|
||||
#gws .btn-alt-download:hover { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.3); color: #fff; }
|
||||
|
||||
#gws .card-title-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
|
||||
#gws .card-title { font-size: 1.12rem; font-weight: 700; color: #fff; margin: 0; }
|
||||
#gws .card-tag { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; padding: 3px 8px; border-radius: 4px; }
|
||||
#gws .tag-recommended { background: rgba(56, 189, 248, 0.2); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.4); }
|
||||
#gws .tag-nosmartscreen { background: rgba(16, 185, 129, 0.15); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.3); }
|
||||
#gws .card-desc { font-size: 0.86rem; color: #94a3b8; margin: 0; line-height: 1.5; }
|
||||
#gws .card-meta-list { font-size: 0.78rem; color: #64748b; margin-top: 12px; display: flex; flex-direction: column; gap: 4px; }
|
||||
|
||||
#gws .api-live-bar { margin-top: 24px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, 0.07); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 0.8rem; color: #94a3b8; }
|
||||
#gws .api-status-badge { display: inline-flex; align-items: center; gap: 6px; color: #10b981; font-weight: 500; }
|
||||
#gws .api-status-badge svg { width: 14px; height: 14px; fill: currentColor; }
|
||||
#gws .api-refresh-btn { background: none; border: none; color: #38bdf8; cursor: pointer; font-size: 0.8rem; font-family: inherit; padding: 0; text-decoration: underline; transition: opacity .2s; }
|
||||
|
||||
#gws .sha-section { padding: 45px 0; }
|
||||
#gws .sha-card { background: rgba(14, 22, 37, 0.78); border: 1px solid rgba(56, 189, 248, 0.2); border-radius: 10px; padding: 26px 30px; position: relative; }
|
||||
#gws .sha-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
|
||||
#gws .sha-title { display: flex; align-items: center; gap: 10px; font-size: 1.05rem; font-weight: 700; color: #fff; }
|
||||
#gws .sha-title svg { width: 20px; height: 20px; fill: #38bdf8; }
|
||||
#gws .sha-code-container { display: flex; align-items: center; gap: 12px; background: #04060a; border: 1px solid rgba(56, 189, 248, 0.2); border-radius: 6px; padding: 10px 14px; margin-bottom: 14px; overflow-x: auto; }
|
||||
#gws .sha-hash { font-family: var(--font-mono, monospace); font-size: 0.84rem; color: #7dd3fc; letter-spacing: 0.5px; word-break: break-all; flex: 1; }
|
||||
#gws .copy-btn { background: rgba(56, 189, 248, 0.12); border: 1px solid rgba(56, 189, 248, 0.3); color: #38bdf8; padding: 6px 14px; border-radius: 4px; font-size: 0.78rem; font-weight: 600; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; transition: all 0.2s ease; }
|
||||
#gws .copy-btn:hover { background: rgba(56, 189, 248, 0.25); color: #fff; border-color: #38bdf8; }
|
||||
#gws .copy-btn.copied { background: rgba(16, 185, 129, 0.15); border-color: #10b981; color: #10b981; }
|
||||
#gws .sha-terminal-cmd { font-size: 0.8rem; color: #94a3b8; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; background: rgba(0, 0, 0, 0.35); padding: 8px 12px; border-radius: 4px; border-left: 3px solid #0284c7; }
|
||||
#gws .sha-terminal-cmd code { font-family: var(--font-mono, monospace); color: #cbd5e1; }
|
||||
|
||||
#gws .smartscreen-section { padding: 60px 0; border-top: 1px solid rgba(255, 255, 255, 0.06); }
|
||||
#gws .section-intro-header { text-align: center; max-width: 750px; margin: 0 auto 40px auto; }
|
||||
#gws .section-tag { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 1.5px; color: #38bdf8; font-weight: 700; margin-bottom: 8px; display: inline-block; }
|
||||
#gws .section-intro-header h2 { font-family: 'Comfortaa', cursive; font-size: clamp(1.8rem, 3.5vw, 2.5rem); font-weight: 700; color: #fff; margin: 0 0 14px 0; }
|
||||
#gws .section-intro-header p { color: #94a3b8; font-size: 0.98rem; margin: 0; }
|
||||
|
||||
#gws .transparency-banner { background: rgba(2, 132, 199, 0.08); border: 1px solid rgba(56, 189, 248, 0.25); border-left: 4px solid #38bdf8; border-radius: 10px; padding: 22px 26px; margin-bottom: 40px; display: flex; gap: 18px; align-items: flex-start; }
|
||||
#gws .transparency-icon { width: 28px; height: 28px; fill: #38bdf8; flex-shrink: 0; margin-top: 2px; }
|
||||
#gws .transparency-content h3 { font-size: 1.05rem; font-weight: 700; color: #fff; margin: 0 0 8px 0; }
|
||||
#gws .transparency-content p { font-size: 0.9rem; color: #cbd5e1; margin: 0; line-height: 1.6; }
|
||||
|
||||
#gws .steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 40px; }
|
||||
@media (max-width: 900px) { #gws .steps-grid { grid-template-columns: 1fr; } }
|
||||
|
||||
#gws .step-card { background: rgba(14, 22, 37, 0.78); border: 1px solid rgba(56, 189, 248, 0.16); border-radius: 10px; padding: 24px; display: flex; flex-direction: column; position: relative; transition: transform .25s ease, border-color .25s ease; }
|
||||
#gws .step-card:hover { transform: translateY(-3px); border-color: #38bdf8; }
|
||||
#gws .step-num-badge { width: 32px; height: 32px; border-radius: 50%; background: rgba(56, 189, 248, 0.15); border: 1px solid #38bdf8; color: #38bdf8; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.9rem; margin-bottom: 16px; }
|
||||
#gws .step-title { font-size: 1.05rem; font-weight: 700; color: #fff; margin: 0 0 8px 0; }
|
||||
#gws .step-text { font-size: 0.88rem; color: #94a3b8; margin: 0 0 18px 0; line-height: 1.55; flex: 1; }
|
||||
|
||||
#gws .mockup-window { background: #004275; border-radius: 6px; padding: 16px; color: #fff; font-size: 0.78rem; box-shadow: 0 8px 20px rgba(0,0,0,0.4); border: 1px solid rgba(255, 255, 255, 0.2); user-select: none; }
|
||||
#gws .mockup-header { font-size: 0.85rem; font-weight: 600; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
|
||||
#gws .mockup-header svg { width: 16px; height: 16px; fill: #fff; }
|
||||
#gws .mockup-body { color: #e0f2fe; line-height: 1.4; margin-bottom: 12px; }
|
||||
#gws .mockup-link-target { color: #fff; text-decoration: underline; font-weight: 700; padding: 2px 4px; border-radius: 3px; background: rgba(255, 255, 255, 0.2); display: inline-block; }
|
||||
#gws .mockup-btn-row { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
|
||||
#gws .mockup-btn { padding: 6px 14px; font-size: 0.76rem; border-radius: 3px; font-weight: 600; border: none; cursor: default; }
|
||||
#gws .mockup-btn-primary { background: #38bdf8; color: #00223d; font-weight: 700; box-shadow: 0 0 10px rgba(56, 189, 248, 0.6); }
|
||||
#gws .mockup-btn-secondary { background: rgba(255, 255, 255, 0.15); color: #fff; }
|
||||
|
||||
#gws .changelog-section { padding: 60px 0; border-top: 1px solid rgba(255, 255, 255, 0.06); }
|
||||
#gws .timeline-list { display: flex; flex-direction: column; gap: 28px; max-width: 860px; margin: 0 auto; }
|
||||
#gws .timeline-card { background: rgba(14, 22, 37, 0.78); border: 1px solid rgba(56, 189, 248, 0.16); border-radius: 10px; padding: 28px; position: relative; }
|
||||
#gws .timeline-card.is-latest { border-color: rgba(56, 189, 248, 0.5); box-shadow: 0 0 25px rgba(56, 189, 248, 0.08); }
|
||||
#gws .timeline-card.is-latest::before { content: 'Dernière Version'; position: absolute; top: -10px; right: 24px; background: #38bdf8; color: #05080f; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; padding: 2px 10px; border-radius: 20px; }
|
||||
#gws .timeline-top { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 10px; border-bottom: 1px solid rgba(255, 255, 255, 0.06); padding-bottom: 12px; margin-bottom: 18px; }
|
||||
#gws .timeline-version { font-family: 'Comfortaa', cursive; font-size: 1.35rem; font-weight: 700; color: #fff; margin: 0; }
|
||||
#gws .timeline-date { font-size: 0.82rem; color: #94a3b8; }
|
||||
#gws .changelog-items { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
|
||||
#gws .changelog-items li { font-size: 0.92rem; color: #cbd5e1; position: relative; padding-left: 20px; line-height: 1.5; }
|
||||
#gws .changelog-items li::before { content: '▸'; position: absolute; left: 0; color: #38bdf8; }
|
||||
|
||||
#gws .visuals-section { padding: 60px 0; border-top: 1px solid rgba(255, 255, 255, 0.06); }
|
||||
#gws .visuals-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
|
||||
@media (max-width: 768px) { #gws .visuals-grid { grid-template-columns: 1fr; } }
|
||||
#gws .visual-card { background: rgba(14, 22, 37, 0.78); border: 1px solid rgba(56, 189, 248, 0.16); border-radius: 10px; overflow: hidden; transition: transform .25s ease, border-color .25s ease; }
|
||||
#gws .visual-card:hover { transform: translateY(-3px); border-color: #38bdf8; }
|
||||
#gws .visual-card img { width: 100%; height: auto; display: block; }
|
||||
#gws .visual-caption { padding: 14px 18px; font-size: 0.86rem; color: #94a3b8; border-top: 1px solid rgba(255, 255, 255, 0.06); background: rgba(10, 15, 24, 0.9); }
|
||||
|
||||
#gws .specs-section { padding: 60px 0 80px; border-top: 1px solid rgba(255, 255, 255, 0.06); }
|
||||
#gws .specs-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
|
||||
@media (max-width: 900px) { #gws .specs-grid { grid-template-columns: repeat(2, 1fr); } }
|
||||
@media (max-width: 500px) { #gws .specs-grid { grid-template-columns: 1fr; } }
|
||||
#gws .spec-box { background: rgba(14, 22, 37, 0.78); border: 1px solid rgba(56, 189, 248, 0.16); border-radius: 6px; padding: 18px; }
|
||||
#gws .spec-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 1px; color: #38bdf8; font-weight: 700; margin-bottom: 6px; }
|
||||
#gws .spec-val { font-size: 0.95rem; font-weight: 600; color: #fff; margin-bottom: 4px; }
|
||||
#gws .spec-note { font-size: 0.8rem; color: #64748b; }
|
||||
`;
|
||||
|
||||
if (!oldAppsCssRegex.test(html)) {
|
||||
console.error('[ERREUR] Impossible de trouver le bloc CSS #apps existant');
|
||||
process.exit(1);
|
||||
}
|
||||
html = html.replace(oldAppsCssRegex, newDarkroomCss);
|
||||
console.log('✓ CSS #apps modernisé en darkroom alpine et styles #gws intégrés.');
|
||||
|
||||
// 3. NAVIGATION HTML (spa-nav)
|
||||
const oldNavRegex = /<nav class="spa-nav">[\s\S]*?<\/nav>/;
|
||||
const newNavHtml = `<nav class="spa-nav">
|
||||
<a href="#accueil" data-spa="accueil">Accueil</a>
|
||||
<a href="#portfolio" data-spa="portfolio">Portfolio</a>
|
||||
<a href="#realisations" data-spa="realisations">Réalisations</a>
|
||||
<a href="#apropos" data-spa="apropos">L'envers du Décor</a>
|
||||
<a href="#apps" data-spa="apps">Écosystème & Apps</a>
|
||||
<a href="#gws" data-spa="gws" class="spa-nav-gws"><span class="nav-gws-pulse"></span>Weather Studio</a>
|
||||
<a href="#news" data-spa="news">Carnet de bord</a>
|
||||
</nav>`;
|
||||
|
||||
if (!oldNavRegex.test(html)) {
|
||||
console.error('[ERREUR] Impossible de trouver le bloc <nav class="spa-nav">');
|
||||
process.exit(1);
|
||||
}
|
||||
html = html.replace(oldNavRegex, newNavHtml);
|
||||
console.log('✓ Navigation HTML .spa-nav enrichie avec Écosystème et Weather Studio.');
|
||||
|
||||
// 4. FICHE GWS DANS #apps : REMPLACEMENT DU TAG OBSOLÈTE PAR DES ACTIONS ACTIVES ET SHA-256
|
||||
const oldGwsTopCardRegex = /<article class="app-card-detailed" id="app-weather-studio">[\s\S]*?<div class="app-card-top">[\s\S]*?<span class="app-status-tag">Disponible prochainement au téléchargement<\/span>[\s\S]*?<\/div>/;
|
||||
|
||||
const newGwsTopCardHtml = `<article class="app-card-detailed" id="app-weather-studio">
|
||||
<div class="app-card-top">
|
||||
<div class="app-title-group">
|
||||
<img src="assets/apps/gastinel-weather-studio/icone.webp" alt="Icône Gastinel Weather Studio" class="app-icon-img" width="48" height="48" loading="lazy">
|
||||
<div>
|
||||
<h3 class="app-main-title">Gastinel Weather Studio</h3>
|
||||
<div style="font-size:0.78rem;color:#38bdf8;font-weight:600;margin-top:2px;">Station logicielle d'analyse microclimatique du Vercors</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="app-status-actions-wrap">
|
||||
<span class="app-status-badge available"><span class="badge-dot"></span>Disponible · v0.3.5 (Windows 64-bit)</span>
|
||||
<a href="https://gastinel.me/gws/downloads/Gastinel_Weather_Studio_0.3.5_x64-setup.exe" class="app-btn-download-quick" download>
|
||||
<svg class="svg-icon" viewBox="0 0 448 512" aria-hidden="true" style="width:14px;height:14px;"><path d="M0 93.7l183.6-25.3v177.4H0V93.7zm0 324.6l183.6 25.3V268.4H0v149.9zm203.8 28L448 480V268.4H203.8v177.9zm0-380.6v180.1H448V32L203.8 65.7z"/></svg>
|
||||
<span>Télécharger (.exe)</span>
|
||||
</a>
|
||||
<a href="#gws" data-spa="gws" class="app-btn-hub-quick">
|
||||
<span>Hub & Guide Defender ➔</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>`;
|
||||
|
||||
if (!oldGwsTopCardRegex.test(html)) {
|
||||
console.error('[ERREUR] Impossible de trouver le bloc en-tête de Gastinel Weather Studio');
|
||||
process.exit(1);
|
||||
}
|
||||
html = html.replace(oldGwsTopCardRegex, newGwsTopCardHtml);
|
||||
console.log('✓ En-tête de la fiche GWS mis à jour avec badges de disponibilité et boutons de téléchargement direct.');
|
||||
|
||||
// Ajout du bloc d'intégrité rapide à la fin de la fiche GWS dans #apps
|
||||
const oldGwsCardEndRegex = /<\/div>\s*<\/article>\s*<article class="app-card-detailed" id="app-vercors-map">/;
|
||||
const newGwsCardEndHtml = ` <div class="app-inline-integrity">
|
||||
<div>
|
||||
<span style="color:#38bdf8;font-weight:700;margin-right:6px;">Empreinte officielle SHA-256 :</span>
|
||||
<code>6B2935E732A35175D01F586D7D8578DF63FB445444460464039FEBC7EA841CCA</code>
|
||||
</div>
|
||||
<button type="button" class="app-inline-copy-btn" data-copy="6B2935E732A35175D01F586D7D8578DF63FB445444460464039FEBC7EA841CCA">Copier le hash</button>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<article class="app-card-detailed" id="app-vercors-map">`;
|
||||
|
||||
if (!oldGwsCardEndRegex.test(html)) {
|
||||
console.error('[ERREUR] Impossible de trouver la fin de la fiche GWS');
|
||||
process.exit(1);
|
||||
}
|
||||
html = html.replace(oldGwsCardEndRegex, newGwsCardEndHtml);
|
||||
console.log('✓ Bloc intégrité SHA-256 1-clic injecté dans la fiche GWS.');
|
||||
|
||||
// 5. INJECTION DE LA SECTION #gws DANS INDEX.HTML
|
||||
const appsSectionEndRegex = /<\/section>\s*<section id="deroulement" class="spa-section">/;
|
||||
|
||||
const gwsSectionHtml = `</section>
|
||||
|
||||
<!-- ==========================================================================
|
||||
SECTION SPA DÉDIÉE : SAS & HUB OFFICIEL GASTINEL WEATHER STUDIO (#gws)
|
||||
========================================================================== -->
|
||||
<section id="gws" class="spa-section">
|
||||
<div class="container">
|
||||
|
||||
<!-- En-tête héroïque -->
|
||||
<div class="gws-hero" id="spa-gws-telecharger">
|
||||
<div class="gws-badge-row">
|
||||
<div class="status-dot"></div>
|
||||
<span class="status-text">Station microclimatique · Canal de distribution officiel</span>
|
||||
</div>
|
||||
|
||||
<h1>Gastinel Weather Studio</h1>
|
||||
<p class="gws-hero-subtitle">« Traquer, comparer, comprendre le froid. »</p>
|
||||
<p class="gws-hero-desc">
|
||||
Suite d'investigation thermique et cartographique conçue pour l'instrumentation des dépressions fermées et trous à froid (TAF) du massif du Vercors. Binaire autonome, sans dépendance logicielle lourde, compilé en code machine natif en Rust.
|
||||
</p>
|
||||
|
||||
<!-- Boîte de téléchargement direct -->
|
||||
<div class="download-action-box">
|
||||
<div class="download-options-grid">
|
||||
|
||||
<!-- Option 1 : Installateur Standard (.exe) -->
|
||||
<div class="primary-download-card">
|
||||
<div>
|
||||
<div class="card-title-row">
|
||||
<h3 class="card-title">Installateur Windows</h3>
|
||||
<span class="card-tag tag-recommended">Recommandé</span>
|
||||
</div>
|
||||
<p class="card-desc">Assistant d'installation complet pour Windows 10 & 11 (64-bit).</p>
|
||||
<div class="card-meta-list">
|
||||
<span>Architecture : <strong>x86_64 native (Rust + Tauri)</strong></span>
|
||||
<span>Poids : <strong>~3.6 Mo</strong> · Version : <strong id="spaHeroVersionLabel">v0.3.5</strong></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a href="https://gastinel.me/gws/downloads/Gastinel_Weather_Studio_0.3.5_x64-setup.exe" class="btn-main-download" id="spaHeroDownloadBtnExe" download>
|
||||
<svg viewBox="0 0 448 512" aria-hidden="true"><path d="M0 93.7l183.6-25.3v177.4H0V93.7zm0 324.6l183.6 25.3V268.4H0v149.9zm203.8 28L448 480V268.4H203.8v177.9zm0-380.6v180.1H448V32L203.8 65.7z"/></svg>
|
||||
<span>Télécharger l'installateur (.exe)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<!-- Option 2 : Paquet de mise à jour (.gws) -->
|
||||
<div class="alt-download-card">
|
||||
<div>
|
||||
<div class="card-title-row">
|
||||
<h3 class="card-title">Paquet Autonome</h3>
|
||||
<span class="card-tag tag-nosmartscreen">Sans SmartScreen</span>
|
||||
</div>
|
||||
<p class="card-desc">Archive cryptographiquement signée, ouvrable directement au sein de GWS sans alerte antivirus.</p>
|
||||
<div class="card-meta-list">
|
||||
<span>Format : <strong>Archive .gws (manifeste + binaire)</strong></span>
|
||||
<span>Idéal si GWS est déjà installé ou pour mise à jour rapide.</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a href="https://gastinel.me/gws/downloads/update-0.3.5.gws" class="btn-alt-download" id="spaHeroDownloadBtnGws" download>
|
||||
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"></path><polyline points="3.27 6.96 12 12.01 20.73 6.96"></polyline><line x1="12" y1="22.08" x2="12" y2="12"></line></svg>
|
||||
<span>Télécharger le paquet (.gws)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- API Live Bar -->
|
||||
<div class="api-live-bar">
|
||||
<div class="api-status-badge">
|
||||
<svg viewBox="0 0 24 24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>
|
||||
<span id="spaApiStatusMessage">Connecté au canal de version en direct (gastinel.me/gws/api/v1)</span>
|
||||
</div>
|
||||
<button type="button" class="api-refresh-btn" id="spaApiRefreshBtn">Vérifier les mises à jour</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Section Intégrité SHA-256 -->
|
||||
<div class="sha-section">
|
||||
<div class="sha-card">
|
||||
<div class="sha-header">
|
||||
<div class="sha-title">
|
||||
<svg viewBox="0 0 24 24"><path d="M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm0 10.99h7c-.53 4.12-3.28 7.79-7 8.94V12H5V6.3l7-3.11v8.8z"/></svg>
|
||||
<span>Empreinte cryptographique officielle (SHA-256)</span>
|
||||
</div>
|
||||
<span style="font-size:0.78rem;color:#94a3b8;">Contrôle d'intégrité strict avant exécution</span>
|
||||
</div>
|
||||
|
||||
<div class="sha-code-container">
|
||||
<span class="sha-hash" id="spaSha256Value">6B2935E732A35175D01F586D7D8578DF63FB445444460464039FEBC7EA841CCA</span>
|
||||
<button type="button" class="copy-btn" id="spaCopyShaBtn" aria-label="Copier le hash SHA-256">
|
||||
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path></svg>
|
||||
<span id="spaCopyShaText">Copier le hash</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="sha-terminal-cmd">
|
||||
<div>
|
||||
<span style="color:#38bdf8;font-weight:600;margin-right:6px;">Commande PowerShell :</span>
|
||||
<code>Get-FileHash "Gastinel_Weather_Studio_*.exe" -Algorithm SHA256</code>
|
||||
</div>
|
||||
<button type="button" class="copy-btn" id="spaCopyCmdBtn" style="padding:4px 10px;font-size:0.74rem;">
|
||||
Copier la commande
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Guide Pas-à-Pas Anti-SmartScreen / Windows Defender -->
|
||||
<div class="smartscreen-section">
|
||||
<div class="section-intro-header">
|
||||
<span class="section-tag">Transparence & Sécurité</span>
|
||||
<h2>Installation sereine sous Windows</h2>
|
||||
<p>
|
||||
Lors du premier lancement d'un exécutable indépendant, Microsoft Defender SmartScreen peut afficher un écran bleu de prévention. Voici la marche à suivre pas-à-pas en toute sérénité.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!-- Explication transparente -->
|
||||
<div class="transparency-banner">
|
||||
<svg class="transparency-icon" viewBox="0 0 24 24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"/></svg>
|
||||
<div class="transparency-content">
|
||||
<h3>Pourquoi Windows affiche-t-il cet avertissement ?</h3>
|
||||
<p>
|
||||
Gastinel Weather Studio est un logiciel artisanal développé dans le Vercors, compilé localement en Rust natif, sans publicité ni télémétrie commerciale. Microsoft impose un certificat d'entreprise payant (EV, plusieurs centaines d'euros par an) pour dispenser les applications de cet écran. En l'absence de ce certificat commercial, Windows alerte par défaut sur les binaires récents. Le code est sain et certifié par l'empreinte SHA-256 ci-dessus.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Grille 3 étapes interactives -->
|
||||
<div class="steps-grid">
|
||||
|
||||
<!-- Étape 1 -->
|
||||
<div class="step-card">
|
||||
<div class="step-num-badge">1</div>
|
||||
<h3 class="step-title">L'écran d'alerte apparaît</h3>
|
||||
<p class="step-text">
|
||||
Windows affiche la fenêtre bleue « Windows a protégé votre ordinateur ». Ne cliquez pas sur « Ne pas exécuter ». Cliquez sur le lien textuel discret <strong>« Informations complémentaires »</strong>.
|
||||
</p>
|
||||
<div class="mockup-window">
|
||||
<div class="mockup-header">
|
||||
<svg viewBox="0 0 24 24"><path d="M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm0 10.99h7c-.53 4.12-3.28 7.79-7 8.94V12H5V6.3l7-3.11v8.8z"/></svg>
|
||||
<span>Windows a protégé votre ordinateur</span>
|
||||
</div>
|
||||
<div class="mockup-body">
|
||||
Microsoft Defender SmartScreen a empêché le démarrage d'une application non reconnue...<br><br>
|
||||
<span class="mockup-link-target">Informations complémentaires ➔</span>
|
||||
</div>
|
||||
<div class="mockup-btn-row">
|
||||
<div class="mockup-btn mockup-btn-secondary">Ne pas exécuter</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Étape 2 -->
|
||||
<div class="step-card">
|
||||
<div class="step-num-badge">2</div>
|
||||
<h3 class="step-title">Débloquer l'exécution</h3>
|
||||
<p class="step-text">
|
||||
Les détails du fichier s'affichent (« Application : Gastinel Weather Studio »). Le bouton <strong>« Exécuter quand même »</strong> apparaît alors en bas à droite. Cliquez dessus.
|
||||
</p>
|
||||
<div class="mockup-window">
|
||||
<div class="mockup-header">
|
||||
<svg viewBox="0 0 24 24"><path d="M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm0 10.99h7c-.53 4.12-3.28 7.79-7 8.94V12H5V6.3l7-3.11v8.8z"/></svg>
|
||||
<span>Windows a protégé votre ordinateur</span>
|
||||
</div>
|
||||
<div class="mockup-body" style="font-size:0.72rem;">
|
||||
Application : <strong>Gastinel_Weather_Studio_setup.exe</strong><br>
|
||||
Éditeur : <strong>Théo Gastinel</strong>
|
||||
</div>
|
||||
<div class="mockup-btn-row">
|
||||
<div class="mockup-btn mockup-btn-primary">Exécuter quand même ➔</div>
|
||||
<div class="mockup-btn mockup-btn-secondary">Ne pas exécuter</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Étape 3 -->
|
||||
<div class="step-card">
|
||||
<div class="step-num-badge">3</div>
|
||||
<h3 class="step-title">Lancement instantané</h3>
|
||||
<p class="step-text">
|
||||
L'assistant d'installation ou l'application se lance normalement. Windows mémorise votre choix et ne vous redemandera plus cette confirmation pour les lancements ultérieurs.
|
||||
</p>
|
||||
<div class="mockup-window" style="background:#0a1726;border-color:rgba(16,185,129,0.3);">
|
||||
<div class="mockup-header" style="color:#10b981;">
|
||||
<svg viewBox="0 0 24 24" style="fill:#10b981;"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>
|
||||
<span>Installation autorisée</span>
|
||||
</div>
|
||||
<div class="mockup-body" style="color:#94a3b8;">
|
||||
Le binaire est vérifié et s'exécute dans un environnement local sécurisé. Vos projets de terrain sont prêts.
|
||||
</div>
|
||||
<div class="mockup-btn-row">
|
||||
<div class="mockup-btn" style="background:#10b981;color:#040d1a;font-weight:700;">Prêt à l'emploi ✓</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Changelog & Nouveautés Grand Format -->
|
||||
<div class="changelog-section">
|
||||
<div class="section-intro-header">
|
||||
<span class="section-tag">Historique des versions</span>
|
||||
<h2>Nouveautés & Évolutions</h2>
|
||||
<p>Retrouvez le journal exhaustif des évolutions architecturales et fonctionnelles de Gastinel Weather Studio.</p>
|
||||
</div>
|
||||
|
||||
<div class="timeline-list">
|
||||
|
||||
<!-- v0.3.5 / v0.3.4 -->
|
||||
<article class="timeline-card is-latest">
|
||||
<div class="timeline-top">
|
||||
<h3 class="timeline-version">Version 0.3.5 · Affinage Cartographique & Ergonomie</h3>
|
||||
<span class="timeline-date">23 septembre 2026</span>
|
||||
</div>
|
||||
<ul class="changelog-items">
|
||||
<li><strong>Carte de terrain allégée :</strong> Remplacement de l'infobulle volumineuse par un badge compact sombre et contrasté (nom, altitude, typologie de cuvette) au survol des stations.</li>
|
||||
<li><strong>Création intuitive de stations :</strong> Suppression des bandeaux textuels encombrants et du bouton flottant ; création directe de points d'acquisition par clic droit géoréférencé ou appui long tactile.</li>
|
||||
<li><strong>Guide de démarrage pas-à-pas :</strong> Nouveau guide visuel au premier lancement présentant les grands principes de l'inversion thermique et des TAF, réactivable à tout moment depuis les Paramètres.</li>
|
||||
<li><strong>Format de paquet souverain <code>.gws</code> :</strong> Intégration de la distribution autonome évitant les déclenchements SmartScreen lors des mises à jour incrémentales.</li>
|
||||
<li><strong>Moteur d'analyse synchrone :</strong> Alignement temporel automatique des séries brutes issues de loggers hétérogènes.</li>
|
||||
</ul>
|
||||
</article>
|
||||
|
||||
<!-- v0.3.3 & v0.3.2 -->
|
||||
<article class="timeline-card">
|
||||
<div class="timeline-top">
|
||||
<h3 class="timeline-version">Version 0.3.3 & 0.3.2 · Décodage USB RC-5 Natif</h3>
|
||||
<span class="timeline-date">23 septembre 2026</span>
|
||||
</div>
|
||||
<ul class="changelog-items">
|
||||
<li><strong>Pilote Elitech RC-5 / RC-5+ direct :</strong> Décodage direct des trames USB propriétaires sans dépendre de logiciels constructeurs fermés.</li>
|
||||
<li><strong>Filtrage thermique physique :</strong> Détection automatisée des capteurs enfouis sous le manteau neigeux modifiant artificiellement la cinétique thermique.</li>
|
||||
<li><strong>Supervision mémoire :</strong> Réduction de 40% de l'empreinte RAM lors de la manipulation de séries dépassant 50 000 points.</li>
|
||||
</ul>
|
||||
</article>
|
||||
|
||||
<!-- v0.3.1 & v0.3.0 -->
|
||||
<article class="timeline-card">
|
||||
<div class="timeline-top">
|
||||
<h3 class="timeline-version">Version 0.3.0 · Architecture Tauri 2 & Dossiers HTML</h3>
|
||||
<span class="timeline-date">19 septembre 2026</span>
|
||||
</div>
|
||||
<ul class="changelog-items">
|
||||
<li><strong>Moteur d'exportation universel :</strong> Génération de classeurs d'analyse HTML autonomes et interactifs, lisibles hors-ligne sans installation.</li>
|
||||
<li><strong>Interconnexion API Infoclimat :</strong> Synchronisation automatique des données de la station Grande Moucherolle et des balises Davis Vantage Pro 2 environnantes.</li>
|
||||
<li><strong>Classification à 4 degrés morphologiques :</strong> Grille de lecture spécifique à la volumétrie des dépressions alpines (fond de doline vs crête d'écoulement).</li>
|
||||
</ul>
|
||||
</article>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Captures d'écran Grand Format -->
|
||||
<div class="visuals-section">
|
||||
<div class="section-intro-header">
|
||||
<span class="section-tag">Aperçu en situation</span>
|
||||
<h2>Conçu pour le terrain et le laboratoire</h2>
|
||||
<p>Une ergonomie unifiée pensée pour les conditions extrêmes, calquée sur les standards de précision technique.</p>
|
||||
</div>
|
||||
|
||||
<div class="visuals-grid">
|
||||
<div class="visual-card">
|
||||
<img src="assets/apps/gastinel-weather-studio/studio.webp" alt="Comparateur multi-séries thermiques" loading="lazy" width="1200" height="648">
|
||||
<div class="visual-caption">Interface Studio : confrontation synchronisée des minima radiatifs et identification des anomalies de refroidissement.</div>
|
||||
</div>
|
||||
<div class="visual-card">
|
||||
<img src="assets/apps/gastinel-weather-studio/accueil.webp" alt="Carte topographique du Vercors" loading="lazy" width="1200" height="653">
|
||||
<div class="visual-caption">Cartographie IGN haute précision : indexation des reliefs et création géoréférencée des stations d'observation.</div>
|
||||
</div>
|
||||
<div class="visual-card">
|
||||
<img src="assets/apps/gastinel-weather-studio/logger.webp" alt="Importation de logger USB" loading="lazy" width="500" height="694" style="max-height:450px;object-fit:cover;object-position:top;">
|
||||
<div class="visual-caption">Module d'acquisition directe : lecture immédiate des loggers Elitech RC-5 sans pilote externe.</div>
|
||||
</div>
|
||||
<div class="visual-card" style="display:flex;flex-direction:column;justify-content:center;padding:30px;background:linear-gradient(145deg,rgba(2,132,199,0.1),rgba(15,23,42,0.8));">
|
||||
<h3 style="font-family:'Comfortaa',cursive;color:#fff;font-size:1.4rem;margin:0 0 12px 0;">Souveraineté des données de mesure</h3>
|
||||
<p style="color:#94a3b8;font-size:0.92rem;line-height:1.6;margin:0 0 20px 0;">
|
||||
Chaque température enregistrée reste stockée dans une base SQLite locale sur votre propre machine. Aucune télémétrie, aucune transmission vers un serveur distant, aucune dépendance au cloud.
|
||||
</p>
|
||||
<a href="#spa-gws-telecharger" class="btn-main-download" style="margin-top:0;align-self:flex-start;">
|
||||
<span>Télécharger Gastinel Weather Studio</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Spécifications & Exigences système -->
|
||||
<div class="specs-section">
|
||||
<div class="section-intro-header">
|
||||
<span class="section-tag">Spécifications techniques</span>
|
||||
<h2>Exigences minimales du système</h2>
|
||||
</div>
|
||||
|
||||
<div class="specs-grid">
|
||||
<div class="spec-box">
|
||||
<div class="spec-label">Système d'exploitation</div>
|
||||
<div class="spec-val">Windows 10 / 11</div>
|
||||
<div class="spec-note">Architecture 64-bit (x86_64)</div>
|
||||
</div>
|
||||
<div class="spec-box">
|
||||
<div class="spec-label">Mémoire vive (RAM)</div>
|
||||
<div class="spec-val">< 200 Mo</div>
|
||||
<div class="spec-note">Empreinte ultra-légère en exécution</div>
|
||||
</div>
|
||||
<div class="spec-box">
|
||||
<div class="spec-label">Espace disque</div>
|
||||
<div class="spec-val">~35 Mo</div>
|
||||
<div class="spec-note">Binaire compact + runtime WebView2</div>
|
||||
</div>
|
||||
<div class="spec-box">
|
||||
<div class="spec-label">Matériel supporté</div>
|
||||
<div class="spec-val">Elitech RC-5 / RC-5+</div>
|
||||
<div class="spec-note">USB natif, CSV/XLS, Davis VP2</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section id="deroulement" class="spa-section">`;
|
||||
|
||||
if (!appsSectionEndRegex.test(html)) {
|
||||
console.error('[ERREUR] Impossible de trouver la fin de la section #apps');
|
||||
process.exit(1);
|
||||
}
|
||||
html = html.replace(appsSectionEndRegex, gwsSectionHtml);
|
||||
console.log('✓ Section SPA dédiée #gws insérée avec succès dans index.html.');
|
||||
|
||||
// 6. ROUTEUR SPA (ROUTES, go(route) et Modules.gws)
|
||||
const oldRoutesRegex = /var ROUTES=\['accueil','portfolio','realisations','apropos','apps','application','deroulement','termes','news','carnet'\];/;
|
||||
const newRoutesStr = `var ROUTES=['accueil','portfolio','realisations','apropos','apps','application','gws','telechargement','deroulement','termes','news','carnet'];`;
|
||||
|
||||
if (!oldRoutesRegex.test(html)) {
|
||||
console.error('[ERREUR] Impossible de trouver la déclaration de var ROUTES');
|
||||
process.exit(1);
|
||||
}
|
||||
html = html.replace(oldRoutesRegex, newRoutesStr);
|
||||
console.log('✓ Déclaration var ROUTES étendue avec gws et telechargement.');
|
||||
|
||||
// Redirection de telechargement vers gws dans go(route)
|
||||
const oldGoRouteCheck = `if(route==='application') route='apps';`;
|
||||
const newGoRouteCheck = `if(route==='application') route='apps';${eol} if(route==='telechargement') route='gws';`;
|
||||
|
||||
if (!html.includes(oldGoRouteCheck)) {
|
||||
console.error('[ERREUR] Impossible de trouver oldGoRouteCheck');
|
||||
process.exit(1);
|
||||
}
|
||||
html = html.replace(oldGoRouteCheck, newGoRouteCheck);
|
||||
console.log('✓ Router go(route) mis à jour pour rediriger telechargement vers gws.');
|
||||
|
||||
// Ajout du module Modules.gws et enrichissement de Modules.apps
|
||||
const oldModulesAppsRegex = /apps:function\(root\)\{\s*initSmoothDetails\(root\);\s*\},/;
|
||||
const newModulesAppsStr = `apps:function(root){
|
||||
initSmoothDetails(root);
|
||||
var copyBtn = root.querySelector('.app-inline-copy-btn');
|
||||
if(copyBtn){
|
||||
copyBtn.addEventListener('click', function(){
|
||||
var hash = copyBtn.getAttribute('data-copy');
|
||||
if(navigator.clipboard && hash){
|
||||
navigator.clipboard.writeText(hash).then(function(){
|
||||
var orig = copyBtn.textContent;
|
||||
copyBtn.textContent = 'Hash copié !';
|
||||
setTimeout(function(){ copyBtn.textContent = orig; }, 2000);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
gws:function(root){
|
||||
var API_URL = 'https://gastinel.me/gws/api/v1/update/windows/x86_64/0.0.0';
|
||||
var DEFAULT_VERSION = '0.3.5';
|
||||
|
||||
// Copie SHA-256
|
||||
var copyShaBtn = root.querySelector('#spaCopyShaBtn');
|
||||
var sha256Value = root.querySelector('#spaSha256Value');
|
||||
var copyShaText = root.querySelector('#spaCopyShaText');
|
||||
if (copyShaBtn && sha256Value) {
|
||||
copyShaBtn.addEventListener('click', function() {
|
||||
var text = sha256Value.textContent.trim();
|
||||
if (navigator.clipboard) {
|
||||
navigator.clipboard.writeText(text).then(function() {
|
||||
copyShaBtn.classList.add('copied');
|
||||
if (copyShaText) copyShaText.textContent = 'Hash copié !';
|
||||
setTimeout(function() {
|
||||
copyShaBtn.classList.remove('copied');
|
||||
if (copyShaText) copyShaText.textContent = 'Copier le hash';
|
||||
}, 2200);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Copie Commande PowerShell
|
||||
var copyCmdBtn = root.querySelector('#spaCopyCmdBtn');
|
||||
if (copyCmdBtn) {
|
||||
copyCmdBtn.addEventListener('click', function() {
|
||||
var cmd = 'Get-FileHash "Gastinel_Weather_Studio_*.exe" -Algorithm SHA256';
|
||||
if (navigator.clipboard) {
|
||||
navigator.clipboard.writeText(cmd).then(function() {
|
||||
copyCmdBtn.textContent = 'Commande copiée !';
|
||||
setTimeout(function() { copyCmdBtn.textContent = 'Copier la commande'; }, 2000);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Interrogation de l'API en direct
|
||||
function checkLive() {
|
||||
var statusMsg = root.querySelector('#spaApiStatusMessage');
|
||||
var heroVer = root.querySelector('#spaHeroVersionLabel');
|
||||
var exeBtn = root.querySelector('#spaHeroDownloadBtnExe');
|
||||
var gwsBtn = root.querySelector('#spaHeroDownloadBtnGws');
|
||||
|
||||
if (statusMsg) statusMsg.textContent = 'Interrogation de l\\'API gastinel.me en cours...';
|
||||
|
||||
fetch(API_URL, { cache: 'no-cache' })
|
||||
.then(function(resp) {
|
||||
if (!resp.ok && resp.status !== 204) throw new Error('HTTP ' + resp.status);
|
||||
if (resp.status === 204) return null;
|
||||
return resp.json();
|
||||
})
|
||||
.then(function(data) {
|
||||
if (data && data.version) {
|
||||
var v = data.version;
|
||||
if (heroVer) heroVer.textContent = 'v' + v;
|
||||
if (data.url && exeBtn) exeBtn.href = data.url;
|
||||
if (gwsBtn) gwsBtn.href = 'https://gastinel.me/gws/downloads/update-' + v + '.gws';
|
||||
if (statusMsg) statusMsg.textContent = 'Dernière version confirmée en ligne : v' + v + ' (Canal stable)';
|
||||
} else {
|
||||
if (statusMsg) statusMsg.textContent = 'Version courante vérifiée : v' + DEFAULT_VERSION;
|
||||
}
|
||||
})
|
||||
.catch(function() {
|
||||
if (statusMsg) statusMsg.textContent = 'Canal officiel actif · Version locale par défaut v' + DEFAULT_VERSION;
|
||||
});
|
||||
}
|
||||
|
||||
var refreshBtn = root.querySelector('#spaApiRefreshBtn');
|
||||
if (refreshBtn) {
|
||||
refreshBtn.addEventListener('click', function(e) {
|
||||
e.preventDefault();
|
||||
checkLive();
|
||||
});
|
||||
}
|
||||
|
||||
checkLive();
|
||||
},`;
|
||||
|
||||
if (!oldModulesAppsRegex.test(html)) {
|
||||
console.error('[ERREUR] Impossible de trouver Modules.apps');
|
||||
process.exit(1);
|
||||
}
|
||||
html = html.replace(oldModulesAppsRegex, newModulesAppsStr);
|
||||
console.log('✓ Modules.apps et Modules.gws connectés avec gestion du presse-papier et de l\'API live.');
|
||||
|
||||
// 7. FOOTER : AJOUT D'UN LIEN DIRECT VERS LE HUB WEATHER STUDIO
|
||||
const oldFooterBottomRegex = /<div class="footer-bottom">© 2026 THÉO - SOLUTIONS VISUELLES & ACQUISITION OPTIQUE \|/;
|
||||
const newFooterBottomStr = `<div class="footer-bottom">© 2026 THÉO - SOLUTIONS VISUELLES & ACQUISITION OPTIQUE | <a href="#gws" data-spa="gws" style="color:#38bdf8;font-weight:600;">Téléchargement GWS</a> |`;
|
||||
|
||||
if (oldFooterBottomRegex.test(html)) {
|
||||
html = html.replace(oldFooterBottomRegex, newFooterBottomStr);
|
||||
console.log('✓ Lien Téléchargement GWS ajouté dans le footer.');
|
||||
}
|
||||
|
||||
// 8. ÉCRITURE DU FICHIER MIS À JOUR
|
||||
fs.writeFileSync(INDEX_HTML, html, 'utf8');
|
||||
console.log('🎉 SUCCÈS : _Site/index.html mis à jour intégralement !');
|
||||
@@ -0,0 +1,76 @@
|
||||
#!/usr/bin/env node
|
||||
/**
|
||||
* tools/apply-selection.js
|
||||
*
|
||||
* Synchronise la galerie de index.html avec les photos retenues dans
|
||||
* C:\Users\theog\Desktop\Selection_Photos_Portfolio
|
||||
*
|
||||
* Usage :
|
||||
* node tools/apply-selection.js
|
||||
*/
|
||||
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
const ROOT_DIR = path.resolve(__dirname, '..');
|
||||
const INDEX_HTML = path.join(ROOT_DIR, 'index.html');
|
||||
const DESKTOP_DIR = 'C:\\Users\\theog\\Desktop\\Selection_Photos_Portfolio';
|
||||
|
||||
if (!fs.existsSync(DESKTOP_DIR)) {
|
||||
console.error(`[ERREUR] Le dossier de sélection n'existe pas : ${DESKTOP_DIR}`);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
const keptFiles = new Set(
|
||||
fs.readdirSync(DESKTOP_DIR)
|
||||
.filter(f => !f.startsWith('.') && fs.statSync(path.join(DESKTOP_DIR, f)).isFile())
|
||||
);
|
||||
|
||||
console.log(`[SELECTION] ${keptFiles.size} fichier(s) détecté(s) dans le dossier de sélection.`);
|
||||
|
||||
if (keptFiles.size === 0) {
|
||||
console.error('[ERREUR] Aucun fichier trouvé dans le dossier de sélection.');
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
let html = fs.readFileSync(INDEX_HTML, 'utf8');
|
||||
|
||||
// Extraction des éléments .gallery-item
|
||||
const itemRegex = /<div class="gallery-item[^"]*">[\s\S]*?<\/div>/g;
|
||||
const rootMatch = html.match(/(<div class="grid-layout" id="gallery-root">)([\s\S]*?)(<\/div>\s*<div class="cloud-wrapper")/);
|
||||
|
||||
if (!rootMatch) {
|
||||
console.error('[ERREUR] Impossible de cibler #gallery-root dans index.html');
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
const prefix = rootMatch[1];
|
||||
const galleryBody = rootMatch[2];
|
||||
const suffix = rootMatch[3];
|
||||
|
||||
const items = [];
|
||||
let itemMatch;
|
||||
while ((itemMatch = itemRegex.exec(galleryBody)) !== null) {
|
||||
const itemHtml = itemMatch[0];
|
||||
const srcM = itemHtml.match(/src="assets\/img\/([^"]+)"/);
|
||||
if (srcM) {
|
||||
const filename = srcM[1];
|
||||
items.push({ filename, html: itemHtml });
|
||||
}
|
||||
}
|
||||
|
||||
console.log(`[ANALYSE] ${items.length} éléments galerie trouvés dans le code.`);
|
||||
|
||||
const retained = items.filter(it => keptFiles.has(it.filename));
|
||||
console.log(`[FILTRE] ${retained.length} éléments correspondent aux fichiers conservés.`);
|
||||
|
||||
if (retained.length === 0) {
|
||||
console.error('[ERREUR] Aucune correspondance trouvée entre le dossier et index.html.');
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
const newGalleryBody = '\n ' + retained.map(it => it.html).join('\n ') + '\n ';
|
||||
const updatedHtml = html.replace(rootMatch[0], prefix + newGalleryBody + suffix);
|
||||
|
||||
fs.writeFileSync(INDEX_HTML, updatedHtml, 'utf8');
|
||||
console.log(`[SUCCÈS] index.html mis à jour avec la sélection resserrée (${retained.length} clichés).`);
|
||||
@@ -0,0 +1,197 @@
|
||||
#!/usr/bin/env node
|
||||
/**
|
||||
* tools/apply-seo-geo.js
|
||||
*
|
||||
* Met à jour index.html selon les recommandations strictes SEO & GEO :
|
||||
* 1. Balises <head> complètes : title, description, canonical, robots, author, geo
|
||||
* 2. Open Graph (og:*) et Twitter Cards complètes
|
||||
* 3. Données structurées JSON-LD Schema.org unifiées (Person + ProfessionalService)
|
||||
* sans name-dropping d'outils tiers, axées sur les compétences.
|
||||
* 4. Nettoyage des balises <img> (remplacement des alts génériques et correction des "with").
|
||||
*/
|
||||
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
const ROOT_DIR = path.resolve(__dirname, '..');
|
||||
const INDEX_HTML = path.join(ROOT_DIR, 'index.html');
|
||||
|
||||
console.log('[SEO/GEO] Lecture de index.html...');
|
||||
let html = fs.readFileSync(INDEX_HTML, 'utf8');
|
||||
const eol = html.includes('\r\n') ? '\r\n' : '\n';
|
||||
|
||||
// 1. MISE À JOUR DU <HEAD>
|
||||
const headStartRegex = /<head>[\s\S]*?<link rel="icon"/;
|
||||
|
||||
const newHeadContent = `<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Théo Gastinel — Photographe & Vidéaste Drone FPV | Vercors</title>
|
||||
<meta name="description" content="Photographe et vidéaste drone FPV basé dans le massif du Vercors. Captations aériennes 4K, paysages alpins, créations visuelles et solutions techniques sur mesure.">
|
||||
<link rel="canonical" href="https://gastinel.me/">
|
||||
<meta name="robots" content="index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1">
|
||||
<meta name="author" content="Théo Gastinel">
|
||||
<meta name="geo.region" content="FR-38">
|
||||
<meta name="geo.placename" content="Lans-en-Vercors">
|
||||
|
||||
<!-- Open Graph / Facebook / LinkedIn / Discord -->
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:locale" content="fr_FR">
|
||||
<meta property="og:url" content="https://gastinel.me/">
|
||||
<meta property="og:site_name" content="Théo Gastinel — Portfolio & Écosystème">
|
||||
<meta property="og:title" content="Théo Gastinel — Photographe & Vidéaste Drone FPV | Vercors">
|
||||
<meta property="og:description" content="Photographe et vidéaste drone FPV au cœur du Vercors. Prestations audiovisuelles alpines, immersions aériennes 4K et écosystème numérique indépendant.">
|
||||
<meta property="og:image" content="https://gastinel.me/assets/img/dji-fly-20250919-194610-0004-1758304172909-photo.webp">
|
||||
<meta property="og:image:alt" content="Perspective aérienne crépusculaire sur le plateau du Vercors par Théo Gastinel">
|
||||
<meta property="og:image:width" content="1200">
|
||||
<meta property="og:image:height" content="630">
|
||||
|
||||
<!-- Twitter Cards -->
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:title" content="Théo Gastinel — Photographe & Vidéaste Drone FPV | Vercors">
|
||||
<meta name="twitter:description" content="Captations aériennes 4K, immersion alpine et photographie de montagne dans le massif du Vercors.">
|
||||
<meta name="twitter:image" content="https://gastinel.me/assets/img/dji-fly-20250919-194610-0004-1758304172909-photo.webp">
|
||||
|
||||
<!-- Schema.org JSON-LD unifié (Person + ProfessionalService) -->
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "https://schema.org",
|
||||
"@graph": [
|
||||
{
|
||||
"@type": "WebSite",
|
||||
"@id": "https://gastinel.me/#website",
|
||||
"url": "https://gastinel.me/",
|
||||
"name": "Théo Gastinel",
|
||||
"description": "Portfolio audiovisuel de montagne, captations aériennes et projets logiciels indépendants.",
|
||||
"publisher": {
|
||||
"@id": "https://gastinel.me/#person"
|
||||
},
|
||||
"inLanguage": "fr-FR"
|
||||
},
|
||||
{
|
||||
"@type": "Person",
|
||||
"@id": "https://gastinel.me/#person",
|
||||
"name": "Théo Gastinel",
|
||||
"jobTitle": "Photographe & Vidéaste Aérien Drone FPV",
|
||||
"url": "https://gastinel.me/",
|
||||
"image": "https://gastinel.me/assets/img/unnamed.webp",
|
||||
"description": "Créateur indépendant et télépilote drone basé dans le Vercors, spécialisé dans l'acquisition visuelle en milieu alpin et les architectures logicielles indépendantes.",
|
||||
"knowsAbout": [
|
||||
"Photographie de montagne et animalière",
|
||||
"Prise de vue aérienne et pilotage drone FPV",
|
||||
"Post-production, retouche photo et étalonnage vidéo",
|
||||
"Ingénierie logicielle et développement bas niveau",
|
||||
"Infrastructures numériques souveraines et auto-hébergement"
|
||||
],
|
||||
"address": {
|
||||
"@type": "PostalAddress",
|
||||
"addressLocality": "Lans-en-Vercors",
|
||||
"addressRegion": "Isère",
|
||||
"addressCountry": "FR"
|
||||
},
|
||||
"sameAs": [
|
||||
"https://www.link.gastinel.me/",
|
||||
"https://www.hub.gastinel.me/",
|
||||
"https://news.gastinel.me/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"@type": "ProfessionalService",
|
||||
"@id": "https://gastinel.me/#business",
|
||||
"name": "Théo Gastinel — Solutions Visuelles & Acquisition Optique",
|
||||
"url": "https://gastinel.me/",
|
||||
"logo": "https://gastinel.me/assets/img/dji-fly-20250919-194610-0004-1758304172909-photo.webp",
|
||||
"image": "https://gastinel.me/assets/img/dji-fly-20250919-194610-0004-1758304172909-photo.webp",
|
||||
"description": "Prestations de production visuelle en extérieur, captation aérienne FPV, photographie d'altitude et développements informatiques dédiés.",
|
||||
"areaServed": [
|
||||
{
|
||||
"@type": "AdministrativeArea",
|
||||
"name": "Massif du Vercors"
|
||||
},
|
||||
{
|
||||
"@type": "AdministrativeArea",
|
||||
"name": "Isère"
|
||||
},
|
||||
{
|
||||
"@type": "AdministrativeArea",
|
||||
"name": "Drôme"
|
||||
},
|
||||
{
|
||||
"@type": "AdministrativeArea",
|
||||
"name": "Auvergne-Rhône-Alpes"
|
||||
},
|
||||
{
|
||||
"@type": "Country",
|
||||
"name": "France"
|
||||
}
|
||||
],
|
||||
"priceRange": "$$",
|
||||
"parentOrganization": {
|
||||
"@id": "https://gastinel.me/#person"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
</script>
|
||||
<link rel="icon"`.replace(/\n/g, eol);
|
||||
|
||||
if (!headStartRegex.test(html)) {
|
||||
console.error('[ERREUR] Impossible de cibler le haut de <head>');
|
||||
process.exit(1);
|
||||
}
|
||||
html = html.replace(headStartRegex, newHeadContent);
|
||||
console.log('✓ Balises <head>, Open Graph, Twitter Cards et JSON-LD Schema.org intégrés.');
|
||||
|
||||
// 2. NETTOYAGE DES ALTS GÉNÉRIQUES ET CORRECTION DES "WITH"
|
||||
|
||||
// Images présentation à propos
|
||||
html = html.replace(
|
||||
'src="assets/img/1.webp" width="871" height="667" alt="Photo 1"',
|
||||
'src="assets/img/1.webp" width="871" height="667" alt="Théo Gastinel en repérage technique sur les crêtes du Vercors"'
|
||||
);
|
||||
html = html.replace(
|
||||
'src="assets/img/2.webp" width="390" height="799" alt="Photo 3"',
|
||||
'src="assets/img/2.webp" width="390" height="799" alt="Matériel de prise de vue et équipement d\'expédition hivernale"'
|
||||
);
|
||||
html = html.replace(
|
||||
'src="assets/img/3.webp" width="1000" height="667" alt="Photo 2"',
|
||||
'src="assets/img/3.webp" width="1000" height="667" alt="Vue d\'ensemble du massif alpin depuis un sommet du Vercors"'
|
||||
);
|
||||
|
||||
// Roche 4 -> description experte
|
||||
html = html.replace(
|
||||
'src="assets/img/img-3301.webp" width="1000" height="667" alt="Roche 4"',
|
||||
'src="assets/img/img-3301.webp" width="1000" height="667" alt="Architecture minérale vertigineuse sculptée par les millénaires dans les Dolomites"'
|
||||
);
|
||||
|
||||
// Corrections coquilles "with"
|
||||
html = html.replace(
|
||||
'alt="Lumières rasantes sculptant les reliefs with des bouquetins paisibles."',
|
||||
'alt="Lumières rasantes de fin d\'après-midi sculptant les reliefs avec des bouquetins alpins dans les Dolomites"'
|
||||
);
|
||||
html = html.replace(
|
||||
'alt="Chamois aligné with une cavité rocheuse."',
|
||||
'alt="Chamois en équilibre aligné avec une cavité rocheuse dans les Dolomites"'
|
||||
);
|
||||
html = html.replace(
|
||||
'sujet with cette cavité rocheuse',
|
||||
'sujet avec cette cavité rocheuse'
|
||||
);
|
||||
html = html.replace(
|
||||
'alt="Contact visuel furtif et complice with la faune."',
|
||||
'alt="Contact visuel furtif et complice avec la faune alpine sauvage"'
|
||||
);
|
||||
html = html.replace(
|
||||
's\'alignant with une précision troublante',
|
||||
's\'alignant avec une précision troublante'
|
||||
);
|
||||
html = html.replace(
|
||||
'contraste with la netteté chirurgicale',
|
||||
'contraste avec la netteté chirurgicale'
|
||||
);
|
||||
|
||||
console.log('✓ Attributs alt enrichis et coquilles de langue corrigées.');
|
||||
|
||||
// Enregistrement
|
||||
fs.writeFileSync(INDEX_HTML, html, 'utf8');
|
||||
console.log('[SUCCÈS] index.html mis à jour avec les optimisations SEO & GEO !');
|
||||
@@ -0,0 +1,332 @@
|
||||
#!/usr/bin/env node
|
||||
/**
|
||||
* tools/apply-structural-changes.js
|
||||
*
|
||||
* Applique toutes les modifications demandées sur index.html :
|
||||
* 1. Textes et contrastes du carrousel (#accueil)
|
||||
* 2. Structure préparée pour la sélection resserrée de photos
|
||||
* 3. Réorganisation du flux visuel (Galerie -> Carnet de bord -> Perspectives en mouvement)
|
||||
* 4. Blocs repliables fluides <details>/<summary> en grille CSS sous chaque vidéo
|
||||
* 5. Router SPA (support de #application et navigation vers #news dans #realisations)
|
||||
*/
|
||||
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
const ROOT_DIR = path.resolve(__dirname, '..');
|
||||
const INDEX_HTML = path.join(ROOT_DIR, 'index.html');
|
||||
|
||||
console.log('[UPDATE] Lecture de index.html...');
|
||||
let html = fs.readFileSync(INDEX_HTML, 'utf8');
|
||||
|
||||
// Détection du séparateur de fin de ligne (CRLF ou LF)
|
||||
const eol = html.includes('\r\n') ? '\r\n' : '\n';
|
||||
|
||||
// 1. CARROUSEL CSS (.slide-desc & .btn-disabled)
|
||||
const oldSlideDescRegex = /#accueil \.slide-desc \{[^}]+\}/;
|
||||
const newSlideDescCss = `#accueil .slide-desc { font-family:var(--font-sans); font-size:clamp(1.05rem,2vw,1.35rem); margin:0 auto 40px auto; line-height:1.6; font-weight:400; max-width:720px; text-align:center; color:#ffffff; text-shadow:0 2px 10px rgba(0,0,0,.85), 0 1px 3px rgba(0,0,0,.9); }${eol}#accueil .btn-slide.btn-disabled { background:rgba(255,255,255,.18); color:rgba(255,255,255,.75); border-color:rgba(255,255,255,.35); cursor:not-allowed; pointer-events:none; box-shadow:none; backdrop-filter:blur(4px); }`;
|
||||
|
||||
if (!oldSlideDescRegex.test(html)) {
|
||||
console.error('[ERREUR] Impossible de trouver oldSlideDescRegex');
|
||||
process.exit(1);
|
||||
}
|
||||
html = html.replace(oldSlideDescRegex, newSlideDescCss);
|
||||
console.log('✓ CSS Carrousel (.slide-desc & .btn-disabled) mis à jour.');
|
||||
|
||||
// 2. CSS VIDEO ACCORDION (CSS Grid transition)
|
||||
const oldVideoDisclaimerRegex = /#realisations \.vid-disclaimer \{[^}]+\}/;
|
||||
const newVideoCss = `#realisations .vid-disclaimer { font-size:.8rem; font-style:italic; color:#666; }${eol}#realisations details.video-details { margin-top:15px; border:1px solid #e8e8e8; border-radius:8px; background:#fafafa; overflow:hidden; transition:border-color .25s ease, background .25s ease, box-shadow .25s ease; text-align:left; }${eol}#realisations details.video-details:hover { border-color:#ccc; background:#fff; }${eol}#realisations details.video-details[open] { background:#fff; border-color:#bbb; box-shadow:0 4px 14px rgba(0,0,0,.04); }${eol}#realisations details.video-details summary.video-summary { list-style:none; cursor:pointer; padding:12px 16px; display:flex; align-items:center; justify-content:space-between; font-size:.82rem; font-weight:700; color:#333; text-transform:uppercase; letter-spacing:.6px; user-select:none; transition:color .2s ease; }${eol}#realisations details.video-details summary.video-summary::-webkit-details-marker { display:none; }${eol}#realisations details.video-details summary.video-summary:hover { color:#000; }${eol}#realisations details.video-details .video-summary-arrow { width:15px; height:15px; fill:#666; transition:transform .35s cubic-bezier(.25,1,.5,1), fill .2s ease; flex-shrink:0; }${eol}#realisations details.video-details[open] .video-summary-arrow { transform:rotate(180deg); fill:#000; }${eol}#realisations details.video-details .video-details-body { display:grid; grid-template-rows:0fr; transition:grid-template-rows .35s cubic-bezier(.25,1,.5,1); }${eol}#realisations details.video-details[open] .video-details-body { grid-template-rows:1fr; }${eol}#realisations details.video-details .video-details-inner { overflow:hidden; padding:0 16px 14px 16px; border-top:1px solid #f0f0f0; margin-top:2px; padding-top:12px; }${eol}#realisations details.video-details .vid-desc { font-size:.92rem; line-height:1.55; color:#444; margin-bottom:10px; }${eol}#realisations details.video-details .vid-disclaimer { font-size:.8rem; font-style:italic; color:#777; margin-top:6px; }`;
|
||||
|
||||
if (!oldVideoDisclaimerRegex.test(html)) {
|
||||
console.error('[ERREUR] Impossible de trouver oldVideoDisclaimerRegex');
|
||||
process.exit(1);
|
||||
}
|
||||
html = html.replace(oldVideoDisclaimerRegex, newVideoCss);
|
||||
console.log('✓ CSS Accordéon vidéo (grille fluide) ajouté.');
|
||||
|
||||
// 3. NAVIGATION LINK
|
||||
const oldNav = `<a href="#news" data-spa="news">Actualités</a>`;
|
||||
const newNav = `<a href="#news" data-spa="news">Carnet de bord</a>`;
|
||||
if (!html.includes(oldNav)) {
|
||||
console.error('[ERREUR] Impossible de trouver oldNav');
|
||||
process.exit(1);
|
||||
}
|
||||
html = html.replace(oldNav, newNav);
|
||||
console.log('✓ Lien de navigation Carnet de bord mis à jour.');
|
||||
|
||||
// 4. CARROUSEL SLIDES TEXTS & BUTTONS
|
||||
const oldTrackRegex = /<div class="carousel-track" id="carouselTrack">[\s\S]*?<\/div>\s*<div class="carousel-progress-container">/;
|
||||
const newTrack = `<div class="carousel-track" id="carouselTrack">
|
||||
<div class="carousel-slide slide-portfolio">
|
||||
<div class="slide-overlay"></div>
|
||||
<div class="slide-content">
|
||||
<h2 class="slide-title" data-scramble="PORTFOLIO PHOTO">PORTFOLIO PHOTO</h2>
|
||||
<p class="slide-desc">Prestations Photos & Vidéos — En savoir plus sur moi — Galeries photos</p>
|
||||
<a href="#portfolio" data-spa="portfolio" class="btn-action btn-slide">ACCÉDER AUX GALERIES</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="carousel-slide slide-infra">
|
||||
<div class="slide-overlay"></div>
|
||||
<div class="slide-content">
|
||||
<h2 class="slide-title" data-scramble="L'ÉCOSYSTÈME NUMÉRIQUE SOUVERAIN">L'ÉCOSYSTÈME NUMÉRIQUE SOUVERAIN</h2>
|
||||
<p class="slide-desc">Une suite complète de services connectés conçue pour une autonomie totale. Données maîtrisées, zéro intermédiaire et architecture indépendante.</p>
|
||||
<span class="btn-action btn-slide btn-disabled" aria-disabled="true">ACCÈS BIENTÔT OUVERT</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="carousel-slide slide-engine" data-cursor-bg="light">
|
||||
<div class="slide-overlay"></div>
|
||||
<div class="slide-content">
|
||||
<h2 class="slide-title" data-scramble="LOGICIELS & CRÉATIONS">LOGICIELS & CRÉATIONS</h2>
|
||||
<p class="slide-desc">Applications multiplateformes, outils open source et projets interactifs développés en interne.</p>
|
||||
<a href="#application" data-spa="application" class="btn-action btn-slide">DÉCOUVRIR LES PROJETS</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="carousel-progress-container">`.replace(/\n/g, eol);
|
||||
|
||||
if (!oldTrackRegex.test(html)) {
|
||||
console.error('[ERREUR] Impossible de trouver carousel-track dans index.html');
|
||||
process.exit(1);
|
||||
}
|
||||
html = html.replace(oldTrackRegex, newTrack);
|
||||
console.log('✓ Textes réels et boutons du carrousel restaurés.');
|
||||
|
||||
// 5. EXTRACT NEWS SECTION FROM #ACCUEIL
|
||||
const newsSectionRegex = /\s*<section id="news" class="news-section reveal">[\s\S]*?<\/section>/;
|
||||
if (!newsSectionRegex.test(html)) {
|
||||
console.error('[ERREUR] Impossible de trouver #news dans #accueil');
|
||||
process.exit(1);
|
||||
}
|
||||
// Remove it from #accueil
|
||||
html = html.replace(newsSectionRegex, '');
|
||||
console.log('✓ Section #news retirée de #accueil.');
|
||||
|
||||
// 6. GALLERY CLEAN STRUCTURE COMMENT
|
||||
const oldGalleryRegex = /(<div class="gallery-master-container" id="galleryMaster">)/;
|
||||
const newGalleryTop = `<!-- ========================================================= -->${eol} <!-- 1. SÉLECTION PHOTO RESSERRÉE (Galerie principale) -->${eol} <!-- ========================================================= -->${eol} <div class="gallery-master-container" id="galleryMaster">`;
|
||||
|
||||
if (!oldGalleryRegex.test(html)) {
|
||||
console.error('[ERREUR] Impossible de trouver oldGalleryRegex');
|
||||
process.exit(1);
|
||||
}
|
||||
html = html.replace(oldGalleryRegex, newGalleryTop);
|
||||
console.log('✓ Structure de la galerie balisée.');
|
||||
|
||||
// 7. REORGANIZE SECTIONS IN #REALISATIONS
|
||||
const oldReaSectionsRegex = /<\/div>\s*<\/div>\s*<hr class="section-separator">\s*<section class="video-section">[\s\S]*?<\/section>\s*<div class="rea-cta-wrapper">/;
|
||||
|
||||
const newReaSections = `</div>
|
||||
</div>
|
||||
|
||||
<!-- ========================================================= -->
|
||||
<!-- 2. SECTION CARNET DE BORD (Sorties récentes & repérages) -->
|
||||
<!-- ========================================================= -->
|
||||
<hr class="section-separator">
|
||||
<section id="news" class="news-section reveal">
|
||||
<div class="news-container">
|
||||
<div class="news-header">
|
||||
<span class="news-pill">Sorties récentes & repérages</span>
|
||||
<h2 class="news-main-title">Carnet de bord</h2>
|
||||
<p class="news-subtitle">Flux des sorties récentes, repérages terrain et actualités de l'écosystème.</p>
|
||||
</div>
|
||||
<div class="news-grid">
|
||||
<article class="news-card">
|
||||
<div class="news-meta">
|
||||
<span class="news-tag">Infrastructure</span>
|
||||
<time class="news-date">2026-09</time>
|
||||
</div>
|
||||
<h3 class="news-title">Souveraineté numérique : Architecture CornafServer et bouclier suisse</h3>
|
||||
<p class="news-desc">Mise en place d'un reverse-proxy Nginx durci sous TLS 1.3 avec masquage d'IP d'origine et tunnel WireGuard chiffré.</p>
|
||||
<a href="https://news.gastinel.me/cornafserver-infra-vps" class="news-link" target="_blank" rel="noopener">Lire l'article →</a>
|
||||
</article>
|
||||
<article class="news-card">
|
||||
<div class="news-meta">
|
||||
<span class="news-tag">Audiovisuel</span>
|
||||
<time class="news-date">2026-08</time>
|
||||
</div>
|
||||
<h3 class="news-title">Prises de vues 4K en haute montagne : équipement et retours d'expédition</h3>
|
||||
<p class="news-desc">Retour d'expérience sur le tournage au crépuscule dans les hauts plateaux du Vercors avec boîtier plein format et drone FPV.</p>
|
||||
<a href="https://news.gastinel.me/tournage-vercors-4k" class="news-link" target="_blank" rel="noopener">Lire l'article →</a>
|
||||
</article>
|
||||
<article class="news-card">
|
||||
<div class="news-meta">
|
||||
<span class="news-tag">Logiciel</span>
|
||||
<time class="news-date">2026-07</time>
|
||||
</div>
|
||||
<h3 class="news-title">Vercora Engine : Rendu géologique et moteur 3D en C++ et Vulkan</h3>
|
||||
<p class="news-desc">Avancées sur le pipeline graphique haute fidélité pour la modélisation topographique alpine sans dépendances lourdes.</p>
|
||||
<a href="https://news.gastinel.me/vercora-engine-vulkan" class="news-link" target="_blank" rel="noopener">Lire l'article →</a>
|
||||
</article>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- ========================================================= -->
|
||||
<!-- 3. SECTION PERSPECTIVES EN MOUVEMENT (Vidéos repliables) -->
|
||||
<!-- ========================================================= -->
|
||||
<hr class="section-separator">
|
||||
<section class="video-section">
|
||||
<h2 class="video-main-title">Perspectives en mouvement</h2>
|
||||
<div class="video-hero">
|
||||
<div class="video-wrapper"><iframe src="https://www.youtube-nocookie.com/embed/nknh43cnKXI" title="THE FROZEN WORLD" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen loading="lazy"></iframe></div>
|
||||
<div class="video-hero-text">
|
||||
<h3 class="vid-title">THE FROZEN WORLD</h3>
|
||||
<p class="vid-meta"><strong>Spot :</strong> Rocher de l'Avocat (Vercors)</p>
|
||||
<p class="vid-meta"><strong>Matériel :</strong> DJI Avata 2</p>
|
||||
<details class="video-details">
|
||||
<summary class="video-summary">
|
||||
<span>Détails du tournage & conditions</span>
|
||||
<svg class="video-summary-arrow" viewBox="0 0 24 24"><path d="M7 10l5 5 5-5z"/></svg>
|
||||
</summary>
|
||||
<div class="video-details-body">
|
||||
<div class="video-details-inner">
|
||||
<p class="vid-desc">Une immersion hivernale capturée au cœur du Vercors. L'objectif de cette vidéo était de jouer avec la verticalité du <strong>Rocher de l'Avocat</strong> pour révéler le contraste saisissant entre la roche brute et les étendues enneigées.</p>
|
||||
<p class="vid-desc">Grâce à l'agilité du drone FPV, j'ai pu réaliser des plans dynamiques en suivant le relief naturel, offrant une perspective unique sur la vallée et la station.</p>
|
||||
<p class="vid-disclaimer">(Vol réalisé dans le respect des règles de sécurité et de l'environnement.)</p>
|
||||
</div>
|
||||
</div>
|
||||
</details>
|
||||
</div>
|
||||
</div>
|
||||
<div class="video-grid">
|
||||
<div class="video-card">
|
||||
<div class="video-wrapper"><iframe src="https://www.youtube-nocookie.com/embed/TPllEu3BK80" title="Les 3 Pucelles" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen loading="lazy"></iframe></div>
|
||||
<div class="video-card-text">
|
||||
<p class="vid-meta"><strong>Spot :</strong> Les 3 Pucelles (Vercors)</p>
|
||||
<p class="vid-meta"><strong>Matériel :</strong> DJI Mini 4 Pro</p>
|
||||
<details class="video-details">
|
||||
<summary class="video-summary">
|
||||
<span>Détails du tournage & conditions</span>
|
||||
<svg class="video-summary-arrow" viewBox="0 0 24 24"><path d="M7 10l5 5 5-5z"/></svg>
|
||||
</summary>
|
||||
<div class="video-details-body">
|
||||
<div class="video-details-inner">
|
||||
<p class="vid-desc" style="text-align:left;">Une exploration aérienne de ces aiguilles emblématiques du Vercors, réalisée lors d'une sortie technique en binôme avec mon père.</p>
|
||||
<p class="vid-desc" style="text-align:left;">L'objectif était de capturer la grandeur de la formation rocheuse tout en restant discret. Le <strong>DJI Mini 4 Pro</strong> a été choisi spécifiquement pour son faible profil sonore, permettant de ne pas déranger la faune ni les grimpeurs présents.</p>
|
||||
<p class="vid-disclaimer">(Vol réalisé avec une attention maximale portée à la réduction du bruit et au respect de la tranquillité du site.)</p>
|
||||
</div>
|
||||
</div>
|
||||
</details>
|
||||
</div>
|
||||
</div>
|
||||
<div class="video-card">
|
||||
<div class="video-wrapper"><iframe src="https://www.youtube-nocookie.com/embed/-YunbJMgJ4g" title="Plateau de la Molière" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen loading="lazy"></iframe></div>
|
||||
<div class="video-card-text">
|
||||
<p class="vid-meta"><strong>Spot :</strong> Contrebas du Plateau de la Molière</p>
|
||||
<p class="vid-meta"><strong>Matériel :</strong> DJI Mini 4 Pro</p>
|
||||
<details class="video-details">
|
||||
<summary class="video-summary">
|
||||
<span>Détails du tournage & conditions</span>
|
||||
<svg class="video-summary-arrow" viewBox="0 0 24 24"><path d="M7 10l5 5 5-5z"/></svg>
|
||||
</summary>
|
||||
<div class="video-details-body">
|
||||
<div class="video-details-inner">
|
||||
<p class="vid-desc" style="text-align:left;">Une capture de l'immensité du Vercors dans ce qu'elle a de plus sauvage. J'ai profité d'une fenêtre de calme absolu, sans aucun randonneur à l'horizon, pour réaliser ce vol.</p>
|
||||
<p class="vid-disclaimer" style="text-align:left;margin-top:20px;">(Avant le décollage, une vérification visuelle a été effectuée pour s'assurer de l'absence de faune sauvage visible dans la zone de vol, garantissant une prise de vue respectueuse de la tranquillité des lieux.)</p>
|
||||
</div>
|
||||
</div>
|
||||
</details>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<div class="rea-cta-wrapper">`.replace(/\n/g, eol);
|
||||
|
||||
if (!oldReaSectionsRegex.test(html)) {
|
||||
console.error('[ERREUR] Impossible de trouver oldReaSectionsRegex');
|
||||
process.exit(1);
|
||||
}
|
||||
html = html.replace(oldReaSectionsRegex, newReaSections);
|
||||
console.log('✓ Sections réordonnées dans #realisations (Galerie -> Carnet de bord -> Perspectives en mouvement).');
|
||||
console.log('✓ Blocs repliables fluides <details>/<summary> injectés sous chaque vidéo.');
|
||||
|
||||
// 8. JS: ADD initGridDetails HELPER
|
||||
const oldSmoothDetailsFunc = `function initSmoothDetails(container, selector){`;
|
||||
const newSmoothDetailsFunc = `function initGridDetails(container){
|
||||
var detailsEls = (container || document).querySelectorAll('details.video-details');
|
||||
detailsEls.forEach(function(el){
|
||||
var summary = el.querySelector('summary');
|
||||
var body = el.querySelector('.video-details-body');
|
||||
if(!summary || !body || el._gridInited) return;
|
||||
el._gridInited = true;
|
||||
summary.addEventListener('click', function(e){
|
||||
e.preventDefault();
|
||||
if(reduceMotion){ el.open = !el.open; return; }
|
||||
if(el.open){
|
||||
body.style.gridTemplateRows = '0fr';
|
||||
var onTransEnd = function(evt){
|
||||
if(evt.propertyName === 'grid-template-rows'){
|
||||
el.open = false;
|
||||
body.removeEventListener('transitionend', onTransEnd);
|
||||
}
|
||||
};
|
||||
body.addEventListener('transitionend', onTransEnd);
|
||||
} else {
|
||||
el.open = true;
|
||||
void body.offsetHeight;
|
||||
body.style.gridTemplateRows = '1fr';
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
function initSmoothDetails(container, selector){`.replace(/\n/g, eol);
|
||||
|
||||
if (!html.includes(oldSmoothDetailsFunc)) {
|
||||
console.error('[ERREUR] Impossible de trouver oldSmoothDetailsFunc');
|
||||
process.exit(1);
|
||||
}
|
||||
html = html.replace(oldSmoothDetailsFunc, newSmoothDetailsFunc);
|
||||
console.log('✓ Fonction initGridDetails ajoutée.');
|
||||
|
||||
// 9. JS: INIT GRID DETAILS AND NEWS IN Modules.realisations
|
||||
const oldReaModuleRegex = /if\(galleryMaster\)\s*gObs\.observe\(galleryMaster\);\s*\},/;
|
||||
const newReaModule = `if(galleryMaster) gObs.observe(galleryMaster);
|
||||
initGridDetails(root);
|
||||
var newsGrid = root.querySelector('.news-grid');
|
||||
if(newsGrid && !root._newsLoaded){
|
||||
root._newsLoaded = true;
|
||||
fetch('data/news.json')
|
||||
.then(function(r){ return r.ok ? r.json() : Promise.reject(r); })
|
||||
.then(function(items){
|
||||
if(!items || !items.length) return;
|
||||
var h = '';
|
||||
items.slice(0,3).forEach(function(a){
|
||||
h += '<article class="news-card"><div class="news-meta"><span class="news-tag">'+a.tag+'</span><time class="news-date">'+a.date+'</time></div><h3 class="news-title">'+a.title+'</h3><p class="news-desc">'+a.desc+'</p><a href="'+a.link+'" class="news-link" target="_blank" rel="noopener">Lire l’article →</a></article>';
|
||||
});
|
||||
newsGrid.innerHTML = h;
|
||||
})
|
||||
.catch(function(){});
|
||||
}
|
||||
},`.replace(/\n/g, eol);
|
||||
|
||||
if (!oldReaModuleRegex.test(html)) {
|
||||
console.error('[ERREUR] Impossible de trouver oldReaModuleRegex');
|
||||
process.exit(1);
|
||||
}
|
||||
html = html.replace(oldReaModuleRegex, newReaModule);
|
||||
console.log('✓ Initialisation initGridDetails et flux Carnet de bord ajoutés dans Modules.realisations.');
|
||||
|
||||
// 10. JS: ROUTES AND ROUTER
|
||||
const oldRoutes = `var ROUTES=['accueil','portfolio','realisations','apropos','apps','deroulement','termes','news'];`;
|
||||
const newRoutes = `var ROUTES=['accueil','portfolio','realisations','apropos','apps','application','deroulement','termes','news','carnet'];`;
|
||||
if (!html.includes(oldRoutes)) {
|
||||
console.error('[ERREUR] Impossible de trouver oldRoutes');
|
||||
process.exit(1);
|
||||
}
|
||||
html = html.replace(oldRoutes, newRoutes);
|
||||
|
||||
const oldGoRoute = `if(route==='news'){ targetScroll='news'; route='accueil'; }`;
|
||||
const newGoRoute = `if(route==='news' || route==='carnet'){ targetScroll='news'; route='realisations'; }
|
||||
if(route==='application') route='apps';`.replace(/\n/g, eol);
|
||||
if (!html.includes(oldGoRoute)) {
|
||||
console.error('[ERREUR] Impossible de trouver oldGoRoute');
|
||||
process.exit(1);
|
||||
}
|
||||
html = html.replace(oldGoRoute, newGoRoute);
|
||||
console.log('✓ Routeur mis à jour pour rediriger #news et #carnet vers #realisations et mapper #application -> #apps.');
|
||||
|
||||
// Enregistrement final
|
||||
fs.writeFileSync(INDEX_HTML, html, 'utf8');
|
||||
console.log('================================================================');
|
||||
console.log('[SUCCÈS] index.html a été modifié avec succès !');
|
||||
console.log('================================================================');
|
||||
@@ -0,0 +1,109 @@
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const { execSync } = require('child_process');
|
||||
|
||||
const SITE_DIR = path.resolve(__dirname, '..');
|
||||
const ACTUAL_DIR = path.resolve(SITE_DIR, '../Actual_Website');
|
||||
|
||||
const OLD_VER = '0.3.5';
|
||||
const NEW_VER = '0.4.0';
|
||||
|
||||
const OLD_HASH = '6B2935E732A35175D01F586D7D8578DF63FB445444460464039FEBC7EA841CCA';
|
||||
const NEW_HASH = 'FB2AF27C5509D220E18BD40219192D137368203A11D9B789BF5E1DA6C50B70F6';
|
||||
|
||||
console.log(`[DEPLOY-v0.4.0] Updating _Site to v${NEW_VER}...`);
|
||||
|
||||
// 1. gws/index.html
|
||||
const gwsPath = path.join(SITE_DIR, 'gws/index.html');
|
||||
let gwsContent = fs.readFileSync(gwsPath, 'utf8');
|
||||
|
||||
gwsContent = gwsContent.replaceAll(OLD_VER, NEW_VER);
|
||||
gwsContent = gwsContent.replaceAll(OLD_HASH, NEW_HASH);
|
||||
|
||||
// Add v0.4.0 changelog in gws/index.html if not present
|
||||
const gwsTimelineMarker = '<div class="changelog-timeline">';
|
||||
const gwsV040Entry = `<div class="changelog-timeline">
|
||||
|
||||
<!-- v0.4.0 -->
|
||||
<article class="timeline-item current">
|
||||
<div class="timeline-header">
|
||||
<span class="timeline-tag current">Dernière version</span>
|
||||
<h3 class="timeline-version">Version 0.4.0 · Format .gws & Écosystème Connecté</h3>
|
||||
<span class="timeline-date">23 septembre 2026</span>
|
||||
</div>
|
||||
<p class="timeline-summary">Introduction du système de mise à jour instantanée par paquets .gws, cartographie épurée avec infobulles compactes, guide interactif au premier lancement et nouveau hub officiel.</p>
|
||||
<ul class="changelog-items">
|
||||
<li><strong>Mises à jour instantanées (.gws) :</strong> Déploiement et association de fichier native pour les paquets <code>.gws</code>. Installation par simple glisser-déposer dans l'interface sans relancer d'installeur Windows ni déclencher de faux positifs SmartScreen. Permutation atomique et vérification SHA-256.</li>
|
||||
<li><strong>Cartographie haute lisibilité :</strong> Refonte complète des infobulles au survol des sites (affichage compact nom, classification thermique et taille de dépression). Épuration du bandeau textuel et suppression du bouton "+ Point" (création directe par clic droit ou appui long).</li>
|
||||
<li><strong>Prise en main express :</strong> Nouveau guide de démarrage rapide au premier lancement pour accompagner la prise en main de l'interface Studio (accessible à tout moment depuis les Paramètres).</li>
|
||||
<li><strong>Hub officiel & Guide Defender :</strong> Déploiement du sas de téléchargement sur <code>gastinel.me/gws/</code> avec contrôle d'intégrité en un clic et explications pédagogiques sur les certificats indépendants.</li>
|
||||
</ul>
|
||||
</article>`;
|
||||
|
||||
if (!gwsContent.includes('Version 0.4.0')) {
|
||||
gwsContent = gwsContent.replace(gwsTimelineMarker, gwsV040Entry);
|
||||
// remove 'current' class from old 0.3.5 entry
|
||||
gwsContent = gwsContent.replace('<article class="timeline-item current">', '<article class="timeline-item">');
|
||||
gwsContent = gwsContent.replace('<span class="timeline-tag current">Dernière version</span>', '<span class="timeline-tag">Version précédente</span>');
|
||||
}
|
||||
|
||||
fs.writeFileSync(gwsPath, gwsContent, 'utf8');
|
||||
console.log('✓ gws/index.html updated to v0.4.0');
|
||||
|
||||
// 2. index.html
|
||||
const indexPath = path.join(SITE_DIR, 'index.html');
|
||||
let indexContent = fs.readFileSync(indexPath, 'utf8');
|
||||
|
||||
indexContent = indexContent.replaceAll(OLD_VER, NEW_VER);
|
||||
indexContent = indexContent.replaceAll(OLD_HASH, NEW_HASH);
|
||||
|
||||
// Add v0.4.0 in SPA section changelog
|
||||
const spaTimelineMarker = '<div class="changelog-timeline">';
|
||||
if (!indexContent.includes('Version 0.4.0 · Format .gws')) {
|
||||
indexContent = indexContent.replace(spaTimelineMarker, gwsV040Entry);
|
||||
indexContent = indexContent.replace('<article class="timeline-item current">', '<article class="timeline-item">');
|
||||
indexContent = indexContent.replace('<span class="timeline-tag current">Dernière version</span>', '<span class="timeline-tag">Version précédente</span>');
|
||||
}
|
||||
|
||||
fs.writeFileSync(indexPath, indexContent, 'utf8');
|
||||
console.log('✓ index.html updated to v0.4.0');
|
||||
|
||||
// 3. Update test-verify.js
|
||||
const testVerifyPath = path.join(SITE_DIR, 'tools/test-verify.js');
|
||||
let testContent = fs.readFileSync(testVerifyPath, 'utf8');
|
||||
testContent = testContent.replaceAll(OLD_VER, NEW_VER);
|
||||
testContent = testContent.replaceAll(OLD_HASH, NEW_HASH);
|
||||
fs.writeFileSync(testVerifyPath, testContent, 'utf8');
|
||||
console.log('✓ tools/test-verify.js updated to v0.4.0');
|
||||
|
||||
// 4. Synchronize Actual_Website
|
||||
function copyDirSync(src, dest) {
|
||||
if (!fs.existsSync(dest)) fs.mkdirSync(dest, { recursive: true });
|
||||
const entries = fs.readdirSync(src, { withFileTypes: true });
|
||||
for (const entry of entries) {
|
||||
const srcPath = path.join(src, entry.name);
|
||||
const destPath = path.join(dest, entry.name);
|
||||
if (entry.isDirectory()) {
|
||||
if (entry.name === '.git' || entry.name === 'node_modules') continue;
|
||||
copyDirSync(srcPath, destPath);
|
||||
} else {
|
||||
fs.copyFileSync(srcPath, destPath);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
copyDirSync(path.join(SITE_DIR, 'gws'), path.join(ACTUAL_DIR, 'gws'));
|
||||
fs.copyFileSync(indexPath, path.join(ACTUAL_DIR, 'index.html'));
|
||||
fs.copyFileSync(path.join(SITE_DIR, 'sitemap.xml'), path.join(ACTUAL_DIR, 'sitemap.xml'));
|
||||
fs.copyFileSync(path.join(SITE_DIR, 'llms.txt'), path.join(ACTUAL_DIR, 'llms.txt'));
|
||||
console.log('✓ Synchronized with Actual_Website');
|
||||
|
||||
// 5. Precompress
|
||||
console.log('[DEPLOY-v0.4.0] Running precompression...');
|
||||
execSync('node ' + path.join(SITE_DIR, 'tools/precompress.js'), { stdio: 'inherit', cwd: SITE_DIR });
|
||||
|
||||
// 6. Test verification
|
||||
console.log('[DEPLOY-v0.4.0] Running validation tests...');
|
||||
execSync('node ' + path.join(SITE_DIR, 'tools/test-verify.js'), { stdio: 'inherit', cwd: SITE_DIR });
|
||||
|
||||
console.log('[DEPLOY-v0.4.0] All done successfully!');
|
||||
@@ -0,0 +1,75 @@
|
||||
#!/usr/bin/env node
|
||||
/**
|
||||
* tools/export-selection.js
|
||||
*
|
||||
* Exporte l'ensemble des photos affichées dans la galerie de index.html
|
||||
* vers le dossier C:\Users\theog\Desktop\Selection_Photos_Portfolio
|
||||
* pour faciliter le tri direct par suppression de fichiers.
|
||||
*/
|
||||
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
const ROOT_DIR = path.resolve(__dirname, '..');
|
||||
const INDEX_HTML = path.join(ROOT_DIR, 'index.html');
|
||||
const DESKTOP_TARGET = 'C:\\Users\\theog\\Desktop\\Selection_Photos_Portfolio';
|
||||
|
||||
console.log('[EXPORT] Analyse de index.html pour identifier les photos de la galerie...');
|
||||
|
||||
if (!fs.existsSync(INDEX_HTML)) {
|
||||
console.error(`[ERREUR] Fichier introuvable : ${INDEX_HTML}`);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
const html = fs.readFileSync(INDEX_HTML, 'utf8');
|
||||
|
||||
// Extraction de la section galerie (#gallery-root)
|
||||
const galleryMatch = html.match(/id="gallery-root"[\s\S]*?id="cloudWrapper"/);
|
||||
if (!galleryMatch) {
|
||||
console.error('[ERREUR] Impossible de trouver la section #gallery-root dans index.html');
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
const galleryHtml = galleryMatch[0];
|
||||
const imgRegex = /src="(assets\/img\/[^"]+)"/g;
|
||||
const photos = [];
|
||||
let m;
|
||||
|
||||
while ((m = imgRegex.exec(galleryHtml)) !== null) {
|
||||
const relPath = m[1];
|
||||
if (!photos.includes(relPath)) {
|
||||
photos.push(relPath);
|
||||
}
|
||||
}
|
||||
|
||||
console.log(`[EXPORT] ${photos.length} photos uniques détectées dans la galerie.`);
|
||||
|
||||
// Création du dossier cible sur le bureau
|
||||
if (!fs.existsSync(DESKTOP_TARGET)) {
|
||||
fs.mkdirSync(DESKTOP_TARGET, { recursive: true });
|
||||
console.log(`[EXPORT] Dossier créé : ${DESKTOP_TARGET}`);
|
||||
} else {
|
||||
console.log(`[EXPORT] Dossier existant : ${DESKTOP_TARGET}`);
|
||||
}
|
||||
|
||||
let copiedCount = 0;
|
||||
for (const rel of photos) {
|
||||
const srcFile = path.join(ROOT_DIR, rel);
|
||||
const fileName = path.basename(rel);
|
||||
const destFile = path.join(DESKTOP_TARGET, fileName);
|
||||
|
||||
if (fs.existsSync(srcFile)) {
|
||||
fs.copyFileSync(srcFile, destFile);
|
||||
copiedCount++;
|
||||
console.log(` ✓ Copié : ${fileName}`);
|
||||
} else {
|
||||
console.warn(` ⚠ Source absente : ${srcFile}`);
|
||||
}
|
||||
}
|
||||
|
||||
console.log('================================================================');
|
||||
console.log(`[SUCCÈS] ${copiedCount}/${photos.length} photos copiées dans :`);
|
||||
console.log(DESKTOP_TARGET);
|
||||
console.log('Tu peux maintenant supprimer les photos non retenues pour garder');
|
||||
console.log('uniquement ta sélection de 8 à 12 clichés.');
|
||||
console.log('================================================================');
|
||||
@@ -0,0 +1,382 @@
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const { execSync } = require('child_process');
|
||||
|
||||
const SITE_DIR = path.resolve(__dirname, '..');
|
||||
const ACTUAL_DIR = path.resolve(SITE_DIR, '../Actual_Website');
|
||||
const INDEX_HTML_PATH = path.join(SITE_DIR, 'index.html');
|
||||
|
||||
console.log('[ACTION] Restauration immédiate du thème BLANC et propre pour #apps...');
|
||||
|
||||
let indexHtml = fs.readFileSync(INDEX_HTML_PATH, 'utf8');
|
||||
|
||||
// 1. Remplacement de tout le bloc CSS pour #apps par le thème BLANC propre
|
||||
const cleanAppsCss = `
|
||||
/* ==========================================================================
|
||||
THÈME BLANC PUR ET ÉPURÉ : APPLICATIONS DÉVELOPPÉES (#apps)
|
||||
========================================================================== */
|
||||
|
||||
#apps {
|
||||
font-family: var(--font-sans, 'Inter', sans-serif);
|
||||
color: #111111;
|
||||
background: #ffffff;
|
||||
line-height: 1.6;
|
||||
}
|
||||
#apps .apps-pad {
|
||||
max-width: 1100px;
|
||||
margin: 0 auto;
|
||||
padding: 70px 24px 100px;
|
||||
}
|
||||
#apps .apps-header {
|
||||
border-bottom: 1px solid #e8e8e8;
|
||||
padding-bottom: 32px;
|
||||
margin-bottom: 48px;
|
||||
}
|
||||
#apps .apps-header h1 {
|
||||
font-family: 'Comfortaa', cursive, sans-serif;
|
||||
font-size: clamp(2rem, 4vw, 2.8rem);
|
||||
font-weight: 700;
|
||||
letter-spacing: -.5px;
|
||||
margin: 0 0 14px 0;
|
||||
color: #111111;
|
||||
}
|
||||
#apps .apps-intro {
|
||||
font-size: 1.02rem;
|
||||
color: #555555;
|
||||
max-width: 680px;
|
||||
margin: 0 0 18px 0;
|
||||
line-height: 1.65;
|
||||
}
|
||||
#apps .apps-note {
|
||||
display: inline-block;
|
||||
font-size: .72rem;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 1.5px;
|
||||
font-weight: 700;
|
||||
color: #1e4d8b;
|
||||
border: 1px solid #d4e2f4;
|
||||
border-radius: 4px;
|
||||
padding: 5px 12px;
|
||||
background: #eef3fa;
|
||||
}
|
||||
|
||||
#apps .apps-category {
|
||||
margin-bottom: 65px;
|
||||
}
|
||||
#apps .apps-category-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: baseline;
|
||||
border-bottom: 2px solid #1e4d8b;
|
||||
padding-bottom: 12px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
#apps .apps-category-title {
|
||||
font-size: 1.1rem;
|
||||
font-weight: 700;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 1.2px;
|
||||
margin: 0;
|
||||
color: #111111;
|
||||
}
|
||||
#apps .apps-category-count {
|
||||
font-size: .78rem;
|
||||
font-weight: 600;
|
||||
color: #1e4d8b;
|
||||
letter-spacing: .5px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
#apps .apps-category-desc {
|
||||
font-size: .92rem;
|
||||
color: #666666;
|
||||
margin: 0 0 28px 0;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
#apps .apps-detailed-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 36px;
|
||||
}
|
||||
|
||||
/* BANDEAU HÉROÏQUE GASTINEL WEATHER STUDIO (Design Lumineux & Propre) */
|
||||
.app-card-featured-gws {
|
||||
background: #f7faff;
|
||||
border: 2px solid #c8daf0;
|
||||
border-radius: 12px;
|
||||
padding: 32px 30px;
|
||||
box-shadow: 0 4px 16px rgba(18, 58, 107, 0.08);
|
||||
margin-bottom: 30px;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
.app-card-featured-gws::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0; left: 0; right: 0; height: 4px;
|
||||
background: #1e4d8b;
|
||||
}
|
||||
.gws-featured-top {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
gap: 20px;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
.gws-featured-brand {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 18px;
|
||||
}
|
||||
.gws-featured-icon {
|
||||
width: 56px;
|
||||
height: 56px;
|
||||
border-radius: 10px;
|
||||
border: 1px solid #d4e2f4;
|
||||
background: #ffffff;
|
||||
padding: 3px;
|
||||
box-shadow: 0 2px 8px rgba(18, 58, 107, 0.1);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.gws-featured-tag-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
.gws-badge-status.available {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
font-size: 0.72rem;
|
||||
font-weight: 700;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.8px;
|
||||
color: #1c6b45;
|
||||
background: #e9f5ef;
|
||||
border: 1px solid #b7dfcb;
|
||||
padding: 3px 10px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.gws-badge-status .badge-dot {
|
||||
width: 7px;
|
||||
height: 7px;
|
||||
border-radius: 50%;
|
||||
background: #1c6b45;
|
||||
}
|
||||
.gws-badge-arch {
|
||||
font-size: 0.74rem;
|
||||
color: #666666;
|
||||
font-weight: 600;
|
||||
}
|
||||
.gws-featured-title {
|
||||
font-size: 1.6rem;
|
||||
font-weight: 800;
|
||||
color: #123a6b;
|
||||
margin: 0;
|
||||
letter-spacing: -0.3px;
|
||||
}
|
||||
.gws-featured-pitch {
|
||||
font-size: 0.95rem;
|
||||
color: #1e4d8b;
|
||||
font-weight: 600;
|
||||
margin-top: 2px;
|
||||
}
|
||||
.gws-featured-cta-main {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
background: #1e4d8b;
|
||||
color: #ffffff !important;
|
||||
font-weight: 700;
|
||||
font-size: 0.95rem;
|
||||
padding: 13px 22px;
|
||||
border-radius: 8px;
|
||||
text-decoration: none;
|
||||
box-shadow: 0 2px 8px rgba(30, 77, 139, 0.25);
|
||||
transition: all 0.15s ease;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.gws-featured-cta-main:hover {
|
||||
background: #123a6b;
|
||||
transform: translateY(-1px);
|
||||
box-shadow: 0 4px 12px rgba(18, 58, 107, 0.35);
|
||||
}
|
||||
.gws-featured-desc {
|
||||
font-size: 0.95rem;
|
||||
color: #3f464f;
|
||||
line-height: 1.65;
|
||||
margin: 0 0 18px 0;
|
||||
}
|
||||
.gws-featured-pills-row {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 10px;
|
||||
margin-bottom: 22px;
|
||||
}
|
||||
.gws-feature-pill {
|
||||
font-size: 0.8rem;
|
||||
font-weight: 600;
|
||||
color: #1e4d8b;
|
||||
background: #ffffff;
|
||||
border: 1px solid #d4e2f4;
|
||||
padding: 5px 12px;
|
||||
border-radius: 20px;
|
||||
}
|
||||
.gws-featured-actions-row {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
gap: 16px;
|
||||
padding-top: 18px;
|
||||
border-top: 1px solid #e2ecf8;
|
||||
}
|
||||
.gws-featured-downloads-split {
|
||||
display: flex;
|
||||
gap: 14px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.gws-btn-dl-box {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 10px 18px;
|
||||
border-radius: 8px;
|
||||
text-decoration: none;
|
||||
transition: all 0.15s ease;
|
||||
}
|
||||
.gws-btn-dl-box.primary {
|
||||
background: #ffffff;
|
||||
border: 1px solid #1e4d8b;
|
||||
color: #1e4d8b !important;
|
||||
}
|
||||
.gws-btn-dl-box.primary:hover {
|
||||
background: #eef3fa;
|
||||
}
|
||||
.gws-btn-dl-box.secondary {
|
||||
background: #ffffff;
|
||||
border: 1px solid #1c6b45;
|
||||
color: #1c6b45 !important;
|
||||
}
|
||||
.gws-btn-dl-box.secondary:hover {
|
||||
background: #e9f5ef;
|
||||
}
|
||||
.gws-btn-dl-label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
.gws-btn-dl-sub {
|
||||
font-size: 0.72rem;
|
||||
color: #666666;
|
||||
margin-top: 2px;
|
||||
padding-left: 26px;
|
||||
}
|
||||
.gws-btn-guide-link {
|
||||
font-size: 0.86rem;
|
||||
font-weight: 600;
|
||||
color: #1e4d8b;
|
||||
text-decoration: none;
|
||||
}
|
||||
.gws-btn-guide-link:hover {
|
||||
text-decoration: underline;
|
||||
color: #123a6b;
|
||||
}
|
||||
|
||||
/* Cartes classiques d'applications */
|
||||
#apps .app-card-detailed {
|
||||
border: 1px solid #e8e8e8;
|
||||
border-radius: 8px;
|
||||
background: #ffffff;
|
||||
padding: 34px;
|
||||
box-shadow: 0 1px 4px rgba(0,0,0,0.02);
|
||||
transition: border-color .2s ease;
|
||||
}
|
||||
#apps .app-card-detailed:hover { border-color: #d0d0d0; }
|
||||
|
||||
#apps .app-card-top { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; margin-bottom: 22px; }
|
||||
#apps .app-title-group { display: flex; align-items: center; gap: 16px; }
|
||||
#apps .app-icon-img { width: 46px; height: 46px; border-radius: 8px; border: 1px solid #e8e8e8; background: #fafafa; padding: 2px; object-fit: contain; flex-shrink: 0; }
|
||||
#apps .app-main-title { font-size: 1.4rem; font-weight: 700; color: #111111; margin: 0; letter-spacing: -.3px; }
|
||||
#apps .app-status-tag { display: inline-block; font-size: .72rem; text-transform: uppercase; letter-spacing: 1px; font-weight: 600; color: #555555; background: #f4f4f4; border: 1px solid #e0e0e0; border-radius: 4px; padding: 6px 12px; white-space: nowrap; }
|
||||
|
||||
#apps .app-pitch { font-size: 1.05rem; font-weight: 600; color: #222222; font-style: italic; border-left: 3px solid #111111; padding-left: 14px; margin: 0 0 22px 0; }
|
||||
#apps .app-problem { background: #fcfcfc; border: 1px solid #eeeeee; border-radius: 6px; padding: 18px 20px; margin-bottom: 24px; }
|
||||
#apps .app-problem h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: 1px; font-weight: 700; color: #888888; margin: 0 0 8px 0; }
|
||||
#apps .app-problem p { font-size: .92rem; color: #444444; margin: 0; line-height: 1.65; }
|
||||
|
||||
#apps .app-hero-visual { border-radius: 6px; overflow: hidden; border: 1px solid #e6e6e6; margin: 22px 0 26px; background: #f7f7f7; }
|
||||
#apps .app-hero-visual img { width: 100%; height: auto; display: block; }
|
||||
#apps .app-visual-caption { font-size: .78rem; color: #777777; padding: 8px 14px; border-top: 1px solid #eeeeee; background: #fafafa; }
|
||||
|
||||
#apps .app-features-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 24px 0; }
|
||||
#apps .app-feature-card { background: #fafafa; border: 1px solid #ececec; border-radius: 6px; padding: 20px; display: flex; flex-direction: column; justify-content: space-between; }
|
||||
#apps .app-feature-card h4 { font-size: .88rem; text-transform: uppercase; letter-spacing: .8px; font-weight: 700; color: #111111; margin: 0 0 8px 0; }
|
||||
#apps .app-feature-card p { font-size: .88rem; color: #444444; line-height: 1.6; margin: 0; }
|
||||
#apps .app-feature-media { margin-top: 14px; border-radius: 4px; overflow: hidden; border: 1px solid #e2e2e2; }
|
||||
#apps .app-feature-media img { width: 100%; height: auto; display: block; }
|
||||
|
||||
#apps .app-meta-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; margin-top: 26px; padding-top: 22px; border-top: 1px solid #eeeeee; }
|
||||
#apps .app-meta-grid.two-cols { grid-template-columns: 1fr 1fr; }
|
||||
#apps .app-meta-item { background: #fcfcfc; border: 1px solid #ececec; border-radius: 6px; padding: 16px 18px; }
|
||||
#apps .app-meta-item h5 { font-size: .76rem; text-transform: uppercase; letter-spacing: 1px; font-weight: 700; color: #888888; margin: 0 0 6px 0; }
|
||||
#apps .app-meta-item p { font-size: .86rem; color: #444444; margin: 0; line-height: 1.55; }
|
||||
|
||||
/* Grille compacte des projets annoncés */
|
||||
#apps .apps-compact-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
|
||||
#apps .app-card-compact { border: 1px solid #e8e8e8; border-radius: 6px; background: #fafafa; overflow: hidden; transition: border-color .2s ease, background .2s ease; }
|
||||
#apps .app-card-compact:hover { border-color: #cccccc; background: #ffffff; }
|
||||
#apps .app-card-compact[open] { background: #ffffff; border-color: #aaaaaa; }
|
||||
|
||||
#apps .app-compact-summary { list-style: none; padding: 18px 20px; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; user-select: none; }
|
||||
#apps .app-compact-summary::-webkit-details-marker { display: none; }
|
||||
#apps .app-compact-info { display: flex; flex-direction: column; gap: 4px; }
|
||||
#apps .app-compact-name { font-size: 1.05rem; font-weight: 700; margin: 0; color: #111111; letter-spacing: -.2px; }
|
||||
#apps .app-compact-status { font-size: .72rem; font-weight: 600; color: #888888; text-transform: uppercase; letter-spacing: .8px; }
|
||||
#apps .app-compact-arrow { width: 14px; height: 14px; fill: #888888; transition: transform .25s ease, fill .25s ease; flex-shrink: 0; }
|
||||
#apps .app-card-compact[open] .app-compact-arrow { transform: rotate(180deg); fill: #111111; }
|
||||
|
||||
#apps .app-compact-body { padding: 0 20px 18px 20px; border-top: 1px solid #f0f0f0; margin-top: 2px; padding-top: 14px; }
|
||||
#apps .app-keywords { font-size: .88rem; font-weight: 600; color: #222222; margin-bottom: 8px; letter-spacing: .2px; line-height: 1.4; }
|
||||
#apps .app-timeline { font-size: .8rem; color: #777777; line-height: 1.4; }
|
||||
|
||||
@media (max-width: 850px) {
|
||||
#apps .app-meta-grid { grid-template-columns: 1fr; }
|
||||
}
|
||||
@media (max-width: 768px) {
|
||||
#apps .apps-pad { padding: 45px 18px 60px; }
|
||||
#apps .app-card-detailed { padding: 22px 18px; }
|
||||
#apps .app-features-grid, #apps .app-meta-grid.two-cols { grid-template-columns: 1fr; }
|
||||
#apps .apps-compact-grid { grid-template-columns: 1fr; }
|
||||
#apps .app-card-top { flex-direction: column; align-items: flex-start; gap: 12px; }
|
||||
}
|
||||
`;
|
||||
|
||||
// Remplacer le bloc CSS de #apps dans index.html
|
||||
const appsCssStart = indexHtml.indexOf('#apps {');
|
||||
const appsCssEnd = indexHtml.indexOf('/* ==========================================================================\r\n CSS DU HUB DÉDIÉ WEATHER STUDIO (#gws)') !== -1
|
||||
? indexHtml.indexOf('/* ==========================================================================\r\n CSS DU HUB DÉDIÉ WEATHER STUDIO (#gws)')
|
||||
: indexHtml.indexOf('/* ==========================================================================\n CSS DU HUB DÉDIÉ WEATHER STUDIO (#gws)');
|
||||
|
||||
if (appsCssStart !== -1 && appsCssEnd !== -1) {
|
||||
indexHtml = indexHtml.substring(0, appsCssStart) + cleanAppsCss + '\n' + indexHtml.substring(appsCssEnd);
|
||||
console.log('✓ CSS de #apps restauré en BLANC et propre');
|
||||
} else {
|
||||
console.warn('Attention : bornes CSS de #apps non trouvées, application par regex');
|
||||
}
|
||||
|
||||
fs.writeFileSync(INDEX_HTML_PATH, indexHtml, 'utf8');
|
||||
|
||||
// 2. Synchronisation Actual_Website
|
||||
fs.copyFileSync(INDEX_HTML_PATH, path.join(ACTUAL_DIR, 'index.html'));
|
||||
console.log('✓ Synchronisé avec Actual_Website/index.html');
|
||||
|
||||
// 3. Précompression
|
||||
execSync('node ' + path.join(SITE_DIR, 'tools/precompress.js'), { stdio: 'inherit', cwd: SITE_DIR });
|
||||
|
||||
// 4. Test
|
||||
execSync('node ' + path.join(SITE_DIR, 'tools/test-verify.js'), { stdio: 'inherit', cwd: SITE_DIR });
|
||||
|
||||
console.log('[ACTION] Prêt pour le déploiement serveur !');
|
||||
@@ -0,0 +1,92 @@
|
||||
#!/usr/bin/env node
|
||||
/**
|
||||
* tools/precompress.js
|
||||
*
|
||||
* Générateur statique AOT (Ahead-Of-Time) de fichiers Brotli (.br - niveau 11)
|
||||
* et Gzip (.gz - niveau 9) pour Nginx (brotli_static on; gzip_static on;).
|
||||
*
|
||||
* Zéro dépendance externe (utilise le module natif zlib de Node.js).
|
||||
*
|
||||
* Usage :
|
||||
* node tools/precompress.js
|
||||
*/
|
||||
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const zlib = require('zlib');
|
||||
|
||||
const ROOT_DIR = path.resolve(__dirname, '..');
|
||||
const EXTENSIONS_TO_COMPRESS = new Set(['.html', '.css', '.js', '.json', '.svg', '.xml', '.txt']);
|
||||
const EXCLUDED_DIRS = new Set(['node_modules', '.git', 'deploy', 'tools']);
|
||||
|
||||
let totalOriginal = 0;
|
||||
let totalGz = 0;
|
||||
let totalBr = 0;
|
||||
let fileCount = 0;
|
||||
|
||||
function walk(dir) {
|
||||
const entries = fs.readdirSync(dir, { withFileTypes: true });
|
||||
for (const entry of entries) {
|
||||
const fullPath = path.join(dir, entry.name);
|
||||
if (entry.isDirectory()) {
|
||||
if (!EXCLUDED_DIRS.has(entry.name)) walk(fullPath);
|
||||
} else if (entry.isFile()) {
|
||||
const ext = path.extname(entry.name).toLowerCase();
|
||||
if (EXTENSIONS_TO_COMPRESS.has(ext)) {
|
||||
compressFile(fullPath);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function compressFile(filePath) {
|
||||
const relative = path.relative(ROOT_DIR, filePath);
|
||||
const content = fs.readFileSync(filePath);
|
||||
const origSize = content.length;
|
||||
|
||||
if (origSize === 0) return;
|
||||
|
||||
// Compression Gzip - Niveau 9 (maximum)
|
||||
const gzContent = zlib.gzipSync(content, { level: 9 });
|
||||
fs.writeFileSync(filePath + '.gz', gzContent);
|
||||
|
||||
// Compression Brotli - Qualité 11 (maximum)
|
||||
const brContent = zlib.brotliCompressSync(content, {
|
||||
params: {
|
||||
[zlib.constants.BROTLI_PARAM_MODE]: zlib.constants.BROTLI_MODE_TEXT,
|
||||
[zlib.constants.BROTLI_PARAM_QUALITY]: 11,
|
||||
[zlib.constants.BROTLI_PARAM_LGWIN]: 22
|
||||
}
|
||||
});
|
||||
fs.writeFileSync(filePath + '.br', brContent);
|
||||
|
||||
totalOriginal += origSize;
|
||||
totalGz += gzContent.length;
|
||||
totalBr += brContent.length;
|
||||
fileCount++;
|
||||
|
||||
const gzRatio = ((1 - gzContent.length / origSize) * 100).toFixed(1);
|
||||
const brRatio = ((1 - brContent.length / origSize) * 100).toFixed(1);
|
||||
|
||||
console.log(`✓ ${relative.padEnd(30)} ${formatSize(origSize)} -> GZ: ${formatSize(gzContent.length)} (-${gzRatio}%) | BR: ${formatSize(brContent.length)} (-${brRatio}%)`);
|
||||
}
|
||||
|
||||
function formatSize(bytes) {
|
||||
if (bytes < 1024) return bytes + ' B';
|
||||
return (bytes / 1024).toFixed(1) + ' KB';
|
||||
}
|
||||
|
||||
console.log('================================================================');
|
||||
console.log(' Pré-compression statique Brotli 11 & Gzip 9 (Nginx AOT)');
|
||||
console.log(` Répertoire cible : ${ROOT_DIR}`);
|
||||
console.log('================================================================');
|
||||
|
||||
walk(ROOT_DIR);
|
||||
|
||||
console.log('----------------------------------------------------------------');
|
||||
console.log(`Fichiers traités : ${fileCount}`);
|
||||
console.log(`Taille brute : ${formatSize(totalOriginal)}`);
|
||||
console.log(`Taille Gzip (-9) : ${formatSize(totalGz)} (${((1 - totalGz / totalOriginal) * 100).toFixed(1)}% de gain)`);
|
||||
console.log(`Taille Brotli(11): ${formatSize(totalBr)} (${((1 - totalBr / totalOriginal) * 100).toFixed(1)}% de gain)`);
|
||||
console.log('================================================================');
|
||||
console.log('Prêt pour Nginx brotli_static on; et gzip_static on;');
|
||||
Diff désactivé car ce fichier est trop long.
Voir la Diff
@@ -0,0 +1,131 @@
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
console.log('====================================================');
|
||||
console.log(' TEST DE VALIDATION RIGOUREUX — REFONTE GWS & SITE');
|
||||
console.log('====================================================\n');
|
||||
|
||||
let failures = 0;
|
||||
function assert(desc, condition) {
|
||||
if (condition) {
|
||||
console.log(`✓ PASS: ${desc}`);
|
||||
} else {
|
||||
console.error(`✗ FAIL: ${desc}`);
|
||||
failures++;
|
||||
}
|
||||
}
|
||||
|
||||
const siteDir = path.resolve(__dirname, '..');
|
||||
const actualDir = path.resolve(siteDir, '../Actual_Website');
|
||||
|
||||
const indexHtml = fs.readFileSync(path.join(siteDir, 'index.html'), 'utf8');
|
||||
const gwsHtml = fs.readFileSync(path.join(siteDir, 'gws/index.html'), 'utf8');
|
||||
const downloadHtml = fs.readFileSync(path.join(siteDir, 'gws/download/index.html'), 'utf8');
|
||||
const sitemapXml = fs.readFileSync(path.join(siteDir, 'sitemap.xml'), 'utf8');
|
||||
|
||||
// Emoji detector
|
||||
const emojiRegex = /[\u{1F600}-\u{1F64F}\u{1F300}-\u{1F5FF}\u{1F680}-\u{1F6FF}\u{1F700}-\u{1F77F}\u{1F780}-\u{1F7FF}\u{1F800}-\u{1F8FF}\u{1F900}-\u{1F9FF}\u{1FA00}-\u{1FA6F}\u{1FA70}-\u{1FAFF}]/u;
|
||||
|
||||
// 1. Syntaxe JS & JSON-LD
|
||||
console.log('[1] Contrôle syntaxique JS et JSON-LD...');
|
||||
function validateScripts(html, filename) {
|
||||
const scriptRegex = /<script(?:\s+[^>]*)?>([\s\S]*?)<\/script>/gi;
|
||||
let match;
|
||||
let scriptIdx = 0;
|
||||
while ((match = scriptRegex.exec(html)) !== null) {
|
||||
scriptIdx++;
|
||||
const content = match[1].trim();
|
||||
if (!content) continue;
|
||||
if (content.startsWith('{') || content.startsWith('[')) {
|
||||
try {
|
||||
JSON.parse(content);
|
||||
assert(`${filename} Script ${scriptIdx} (JSON-LD)`, true);
|
||||
} catch (e) {
|
||||
assert(`${filename} Script ${scriptIdx} (JSON-LD) - ${e.message}`, false);
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
new Function(content);
|
||||
assert(`${filename} Script ${scriptIdx} (JavaScript)`, true);
|
||||
} catch (e) {
|
||||
assert(`${filename} Script ${scriptIdx} (JavaScript) - ${e.message}`, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
validateScripts(indexHtml, 'index.html');
|
||||
validateScripts(gwsHtml, 'gws/index.html');
|
||||
validateScripts(downloadHtml, 'gws/download/index.html');
|
||||
|
||||
// 2. Vérification Zéro Emoji & Zéro Clé Crypto dans toute l'interface
|
||||
console.log('\n[2] Sobriété & Clarté (Zéro Emoji & Zéro Hash Crypto Lambda)...');
|
||||
assert('Aucun emoji dans gws/index.html', !emojiRegex.test(gwsHtml));
|
||||
assert('Aucun emoji dans gws/download/index.html', !emojiRegex.test(downloadHtml));
|
||||
assert('Aucun emoji dans index.html', !emojiRegex.test(indexHtml));
|
||||
assert('Aucun hash SHA-256 encombrant dans gws/index.html', !gwsHtml.includes('FB2AF27C5509D220E18BD40219192D137368203A11D9B789BF5E1DA6C50B70F6'));
|
||||
assert('Aucun hash SHA-256 encombrant dans gws/download/index.html', !downloadHtml.includes('FB2AF27C5509D220E18BD40219192D137368203A11D9B789BF5E1DA6C50B70F6'));
|
||||
assert('Aucun hash SHA-256 encombrant dans index.html', !indexHtml.includes('FB2AF27C5509D220E18BD40219192D137368203A11D9B789BF5E1DA6C50B70F6'));
|
||||
|
||||
// 3. Séparation Présentation vs Téléchargements
|
||||
console.log('\n[3] Séparation Présentation (/gws/) vs Téléchargements (/gws/download/)...');
|
||||
assert('Page Présentation : bouton CTA propre vers /gws/download/', gwsHtml.includes('https://gastinel.me/gws/download/'));
|
||||
assert('Page Téléchargements : Hero v0.4.0 présent', downloadHtml.includes('v0.4.0'));
|
||||
assert('Page Téléchargements : Téléchargement .exe présent', downloadHtml.includes('Gastinel_Weather_Studio_0.4.0_x64-setup.exe'));
|
||||
assert('Page Téléchargements : Téléchargement .gws présent', downloadHtml.includes('update-0.4.0.gws'));
|
||||
assert('Page Téléchargements : Explication claire entre les 2 paquets', downloadHtml.includes('première installation') && downloadHtml.includes('Mise à jour'));
|
||||
assert('Page Téléchargements : Guide SmartScreen présent avec 3 étapes', downloadHtml.includes('Informations complémentaires') && downloadHtml.includes('Exécuter quand même'));
|
||||
assert('Page Téléchargements : Changelog v0.4.0 présent', downloadHtml.includes('Version 0.4.0'));
|
||||
assert('Page Téléchargements : Explication certificat et indépendance', downloadHtml.includes('indépendant') && downloadHtml.includes('Microsoft'));
|
||||
|
||||
// 4. Bandeau dans #apps
|
||||
console.log('\n[4] Bandeau Gastinel Weather Studio dans #apps...');
|
||||
assert('Bandeau GWS présent dans #apps', indexHtml.includes('id="app-weather-studio"'));
|
||||
assert('Lien vers présentation dans le bandeau', indexHtml.includes('href="https://gastinel.me/gws/"'));
|
||||
assert('Lien vers téléchargements dans le bandeau', indexHtml.includes('href="https://gastinel.me/gws/download/"'));
|
||||
|
||||
// 5. Robustesse Semver et API Live
|
||||
console.log('\n[5] Robustesse Semver & API Live...');
|
||||
assert('Semver compare présent dans index.html', indexHtml.includes('compareSemver'));
|
||||
|
||||
// 6. Fichiers et Assets statiques
|
||||
console.log('\n[6] Vérification des assets physiques...');
|
||||
const requiredAssets = [
|
||||
'assets/apps/gastinel-weather-studio/icone.webp',
|
||||
'assets/apps/gastinel-weather-studio/icon-512.png',
|
||||
'assets/apps/gastinel-weather-studio/studio.webp',
|
||||
'assets/apps/gastinel-weather-studio/accueil.webp',
|
||||
'assets/apps/gastinel-weather-studio/logger.webp',
|
||||
'assets/fonts/inter-latin.woff2',
|
||||
'assets/fonts/comfortaa-latin.woff2'
|
||||
];
|
||||
for (const rel of requiredAssets) {
|
||||
assert(`Asset ${rel} existe dans _Site`, fs.existsSync(path.join(siteDir, rel)));
|
||||
}
|
||||
|
||||
// 7. Conformité Sitemap.xml
|
||||
console.log('\n[7] Conformité Sitemap XML...');
|
||||
assert('Sitemap XML contient gastinel.me/', sitemapXml.includes('<loc>https://gastinel.me/</loc>'));
|
||||
assert('Sitemap XML contient gastinel.me/gws/', sitemapXml.includes('<loc>https://gastinel.me/gws/</loc>'));
|
||||
assert('Sitemap XML contient gastinel.me/gws/download/', sitemapXml.includes('<loc>https://gastinel.me/gws/download/</loc>'));
|
||||
assert('Sitemap XML ne contient aucun fragment # (interdit par Google)', !sitemapXml.includes('<loc>https://gastinel.me/#'));
|
||||
|
||||
// 8. Synchronisation avec Actual_Website
|
||||
console.log('\n[8] Synchronisation _Site <-> Actual_Website...');
|
||||
const actualIndex = fs.readFileSync(path.join(actualDir, 'index.html'), 'utf8');
|
||||
const actualGws = fs.readFileSync(path.join(actualDir, 'gws/index.html'), 'utf8');
|
||||
const actualDownload = fs.readFileSync(path.join(actualDir, 'gws/download/index.html'), 'utf8');
|
||||
assert('index.html synchronisé à l\'octet près', actualIndex === indexHtml);
|
||||
assert('gws/index.html synchronisé à l\'octet près', actualGws === gwsHtml);
|
||||
assert('gws/download/index.html synchronisé à l\'octet près', actualDownload === downloadHtml);
|
||||
|
||||
console.log('====================================================');
|
||||
if (failures === 0) {
|
||||
console.log(' RÉSULTAT : 100% DES VÉRIFICATIONS RÉUSSIES !');
|
||||
console.log('====================================================');
|
||||
process.exit(0);
|
||||
} else {
|
||||
console.error(` RÉSULTAT : ${failures} ÉCHECS DÉTECTÉS !`);
|
||||
console.log('====================================================');
|
||||
process.exit(1);
|
||||
}
|
||||
Diff désactivé car ce fichier est trop long.
Voir la Diff
@@ -0,0 +1,369 @@
|
||||
#!/usr/bin/env node
|
||||
/**
|
||||
* tools/upgrade-gws-refonte.js
|
||||
*
|
||||
* Script de correction et d'optimisation avancée :
|
||||
* 1. Empêche le downgrade accidentel via l'API live (vérification Semver).
|
||||
* 2. Résout le conflit de routage SPA sur les ancres internes #spa-gws-*.
|
||||
* 3. Ajoute un helper universel de presse-papier avec fallback document.execCommand.
|
||||
* 4. Anime la pastille cyan pulsante dans la barre de navigation.
|
||||
* 5. Intègre une barre de sous-navigation rapide dans le sas SPA #gws.
|
||||
* 6. Ajoute le bouton de téléchargement du paquet .gws sur la fiche #app-weather-studio.
|
||||
* 7. Ajoute les données structurées SoftwareApplication JSON-LD dans gws/index.html.
|
||||
* 8. Nettoie sitemap.xml pour se conformer strictement aux standards des moteurs de recherche (pas d'ancres #).
|
||||
* 9. Synchronise intégralement _Site et Actual_Website.
|
||||
* 10. Re-génère les archives Brotli 11 et Gzip 9.
|
||||
*/
|
||||
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
const SITE_DIR = path.resolve(__dirname, '..');
|
||||
const ACTUAL_DIR = path.resolve(SITE_DIR, '../Actual_Website');
|
||||
|
||||
console.log('[UPGRADE] Début de la mise à jour...');
|
||||
|
||||
function replaceWithEol(source, searchStr, replaceStr, eol) {
|
||||
const normalizedSource = source.replace(/\r\n/g, '\n');
|
||||
const normalizedSearch = searchStr.replace(/\r\n/g, '\n');
|
||||
const normalizedReplace = replaceStr.replace(/\r\n/g, '\n');
|
||||
|
||||
if (!normalizedSource.includes(normalizedSearch)) {
|
||||
return null;
|
||||
}
|
||||
const result = normalizedSource.replace(normalizedSearch, normalizedReplace);
|
||||
return eol === '\r\n' ? result.replace(/\n/g, '\r\n') : result;
|
||||
}
|
||||
|
||||
// =========================================================================
|
||||
// 1. MISE À JOUR DE _Site/gws/index.html
|
||||
// =========================================================================
|
||||
const GWS_HTML_PATH = path.join(SITE_DIR, 'gws/index.html');
|
||||
let gwsHtml = fs.readFileSync(GWS_HTML_PATH, 'utf8');
|
||||
const gwsEol = gwsHtml.includes('\r\n') ? '\r\n' : '\n';
|
||||
|
||||
// A. Ajout du Schema.org SoftwareApplication JSON-LD si pas déjà présent
|
||||
if (!gwsHtml.includes('"SoftwareApplication"')) {
|
||||
const jsonLdGws = `
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "https://schema.org",
|
||||
"@type": "SoftwareApplication",
|
||||
"name": "Gastinel Weather Studio",
|
||||
"operatingSystem": "Windows 10, Windows 11 (64-bit)",
|
||||
"applicationCategory": "WeatherApplication",
|
||||
"softwareVersion": "0.3.5",
|
||||
"fileFormat": "application/x-msdownload",
|
||||
"fileSize": "3.6MB",
|
||||
"downloadUrl": "https://gastinel.me/gws/downloads/Gastinel_Weather_Studio_0.3.5_x64-setup.exe",
|
||||
"author": {
|
||||
"@type": "Person",
|
||||
"name": "Théo Gastinel",
|
||||
"url": "https://gastinel.me/"
|
||||
},
|
||||
"offers": {
|
||||
"@type": "Offer",
|
||||
"price": "0",
|
||||
"priceCurrency": "EUR"
|
||||
},
|
||||
"description": "Station logicielle d'investigation thermique et d'analyse microclimatique des trous à froid (TAF) du Vercors. Décodage natif USB Elitech RC-5 et cartographie IGN."
|
||||
}
|
||||
</script>
|
||||
`;
|
||||
gwsHtml = gwsHtml.replace('<link rel="icon"', jsonLdGws + '<link rel="icon"');
|
||||
console.log('✓ gws/index.html : JSON-LD SoftwareApplication ajouté.');
|
||||
}
|
||||
|
||||
// B. Mise à jour du script JS dans gws/index.html
|
||||
const oldGwsScriptRegex = /<script>[\s\S]*?checkLatestVersion\(\);\s*\}\)\(\);\s*<\/script>/;
|
||||
const newGwsScript = `<script>
|
||||
(function() {
|
||||
'use strict';
|
||||
|
||||
var API_URL = 'https://gastinel.me/gws/api/v1/update/windows/x86_64/0.0.0';
|
||||
var DEFAULT_VERSION = '0.3.5';
|
||||
var DEFAULT_EXE_URL = 'https://gastinel.me/gws/downloads/Gastinel_Weather_Studio_0.3.5_x64-setup.exe';
|
||||
var DEFAULT_GWS_URL = 'https://gastinel.me/gws/downloads/update-0.3.5.gws';
|
||||
var DEFAULT_SHA256 = '6B2935E732A35175D01F586D7D8578DF63FB445444460464039FEBC7EA841CCA';
|
||||
|
||||
// Helper copie universel
|
||||
function copyText(text, cb) {
|
||||
if (navigator.clipboard && window.isSecureContext) {
|
||||
navigator.clipboard.writeText(text).then(function() {
|
||||
if (cb) cb();
|
||||
}).catch(function() {
|
||||
fallbackCopy(text, cb);
|
||||
});
|
||||
} else {
|
||||
fallbackCopy(text, cb);
|
||||
}
|
||||
}
|
||||
|
||||
function fallbackCopy(text, cb) {
|
||||
try {
|
||||
var ta = document.createElement('textarea');
|
||||
ta.value = text;
|
||||
ta.setAttribute('readonly', '');
|
||||
ta.style.position = 'fixed';
|
||||
ta.style.top = '-9999px';
|
||||
ta.style.opacity = '0';
|
||||
document.body.appendChild(ta);
|
||||
ta.select();
|
||||
var ok = document.execCommand('copy');
|
||||
document.body.removeChild(ta);
|
||||
if (ok && cb) cb();
|
||||
} catch (err) {
|
||||
console.warn('Fallback copy error:', err);
|
||||
}
|
||||
}
|
||||
|
||||
// Copie SHA-256
|
||||
var copyShaBtn = document.getElementById('copyShaBtn');
|
||||
var sha256Value = document.getElementById('sha256Value');
|
||||
var copyShaText = document.getElementById('copyShaText');
|
||||
|
||||
if (copyShaBtn && sha256Value) {
|
||||
copyShaBtn.addEventListener('click', function() {
|
||||
var text = sha256Value.textContent.trim();
|
||||
copyText(text, function() {
|
||||
copyShaBtn.classList.add('copied');
|
||||
if (copyShaText) copyShaText.textContent = 'Hash copié !';
|
||||
setTimeout(function() {
|
||||
copyShaBtn.classList.remove('copied');
|
||||
if (copyShaText) copyShaText.textContent = 'Copier le hash';
|
||||
}, 2200);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// Copie Commande PowerShell
|
||||
var copyCmdBtn = document.getElementById('copyCmdBtn');
|
||||
if (copyCmdBtn) {
|
||||
copyCmdBtn.addEventListener('click', function() {
|
||||
var cmd = 'Get-FileHash "Gastinel_Weather_Studio_*.exe" -Algorithm SHA256';
|
||||
copyText(cmd, function() {
|
||||
copyCmdBtn.textContent = 'Commande copiée !';
|
||||
setTimeout(function() { copyCmdBtn.textContent = 'Copier la commande'; }, 2000);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// Comparateur Semver pour éviter le downgrade
|
||||
function parseVersion(vStr) {
|
||||
if (!vStr) return [0, 0, 0];
|
||||
return vStr.replace(/^v/i, '').split('.').map(function(n) {
|
||||
var num = parseInt(n, 10);
|
||||
return isNaN(num) ? 0 : num;
|
||||
});
|
||||
}
|
||||
|
||||
function compareSemver(v1, v2) {
|
||||
var p1 = parseVersion(v1);
|
||||
var p2 = parseVersion(v2);
|
||||
for (var i = 0; i < Math.max(p1.length, p2.length); i++) {
|
||||
var n1 = p1[i] || 0;
|
||||
var n2 = p2[i] || 0;
|
||||
if (n1 > n2) return 1;
|
||||
if (n1 < n2) return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Interrogation de l'API en direct
|
||||
function checkLatestVersion() {
|
||||
var statusMsg = document.getElementById('apiStatusMessage');
|
||||
var navBadge = document.getElementById('navVersionBadge');
|
||||
var heroVer = document.getElementById('heroVersionLabel');
|
||||
var exeBtn = document.getElementById('heroDownloadBtnExe');
|
||||
var gwsBtn = document.getElementById('heroDownloadBtnGws');
|
||||
|
||||
if (statusMsg) statusMsg.textContent = 'Interrogation de l\\'API gastinel.me en cours...';
|
||||
|
||||
fetch(API_URL, { cache: 'no-cache' })
|
||||
.then(function(resp) {
|
||||
if (!resp.ok && resp.status !== 204) {
|
||||
throw new Error('HTTP ' + resp.status);
|
||||
}
|
||||
if (resp.status === 204) {
|
||||
return null;
|
||||
}
|
||||
return resp.json();
|
||||
})
|
||||
.then(function(data) {
|
||||
if (data && data.version && compareSemver(data.version, DEFAULT_VERSION) >= 0) {
|
||||
var v = data.version.replace(/^v/i, '');
|
||||
if (navBadge) navBadge.textContent = 'v' + v;
|
||||
if (heroVer) heroVer.textContent = 'v' + v;
|
||||
if (data.url && exeBtn) {
|
||||
exeBtn.href = data.url;
|
||||
}
|
||||
if (gwsBtn) {
|
||||
gwsBtn.href = 'https://gastinel.me/gws/downloads/update-' + v + '.gws';
|
||||
}
|
||||
if (statusMsg) {
|
||||
statusMsg.textContent = 'Dernière version confirmée en ligne : v' + v + ' (Canal stable)';
|
||||
}
|
||||
} else {
|
||||
if (statusMsg) {
|
||||
statusMsg.textContent = 'Version officielle stable : v' + DEFAULT_VERSION + ' (Distribution certifiée)';
|
||||
}
|
||||
}
|
||||
})
|
||||
.catch(function(err) {
|
||||
if (statusMsg) {
|
||||
statusMsg.textContent = 'Canal officiel actif · Version locale par défaut v' + DEFAULT_VERSION;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
var refreshBtn = document.getElementById('apiRefreshBtn');
|
||||
if (refreshBtn) {
|
||||
refreshBtn.addEventListener('click', function(e) {
|
||||
e.preventDefault();
|
||||
checkLatestVersion();
|
||||
});
|
||||
}
|
||||
|
||||
// Lancement automatique au chargement
|
||||
checkLatestVersion();
|
||||
|
||||
})();
|
||||
</script>`;
|
||||
|
||||
if (oldGwsScriptRegex.test(gwsHtml)) {
|
||||
gwsHtml = gwsHtml.replace(oldGwsScriptRegex, newGwsScript);
|
||||
console.log('✓ gws/index.html : Script interactif mis à jour avec Semver, copy helper et fix encodage.');
|
||||
}
|
||||
fs.writeFileSync(GWS_HTML_PATH, gwsHtml, 'utf8');
|
||||
|
||||
|
||||
// =========================================================================
|
||||
// 2. MISE À JOUR DE _Site/index.html
|
||||
// =========================================================================
|
||||
const INDEX_HTML_PATH = path.join(SITE_DIR, 'index.html');
|
||||
let indexHtml = fs.readFileSync(INDEX_HTML_PATH, 'utf8');
|
||||
const indexEol = indexHtml.includes('\r\n') ? '\r\n' : '\n';
|
||||
|
||||
// A. Routeur SPA go() et ancres spa-gws-*
|
||||
const oldGoRouteCheck = ` var targetScroll=null;
|
||||
if(route==='news' || route==='carnet'){ targetScroll='news'; route='realisations'; }
|
||||
if(route==='application') route='apps';
|
||||
if(route==='telechargement') route='gws';
|
||||
if(legalTab) route='termes';`;
|
||||
|
||||
const newGoRouteCheck = ` var targetScroll=null;
|
||||
if(route==='news' || route==='carnet'){ targetScroll='news'; route='realisations'; }
|
||||
if(route==='application') route='apps';
|
||||
if(route==='telechargement') route='gws';
|
||||
if(route && route.indexOf('spa-gws-') === 0){ targetScroll=route; route='gws'; }
|
||||
if(legalTab) route='termes';`;
|
||||
|
||||
const resGo = replaceWithEol(indexHtml, oldGoRouteCheck, newGoRouteCheck, indexEol);
|
||||
if (resGo) {
|
||||
indexHtml = resGo;
|
||||
console.log('✓ index.html : Routeur SPA adapté pour les ancres spa-gws-*.');
|
||||
} else {
|
||||
console.log('ℹ Routeur SPA déjà à jour ou déjà patché.');
|
||||
}
|
||||
|
||||
// B. Click delegation pour liens d'ancres internes
|
||||
const oldClickDelegation = `document.addEventListener('click',function(e){
|
||||
var a=e.target.closest('a[data-spa]'); if(!a) return;
|
||||
e.preventDefault(); location.hash=a.getAttribute('data-spa');
|
||||
});`;
|
||||
|
||||
const newClickDelegation = `document.addEventListener('click',function(e){
|
||||
var aSpa=e.target.closest('a[data-spa]');
|
||||
if(aSpa){
|
||||
e.preventDefault();
|
||||
location.hash=aSpa.getAttribute('data-spa');
|
||||
return;
|
||||
}
|
||||
var anchor=e.target.closest('a[href^="#"]');
|
||||
if(anchor){
|
||||
var href=anchor.getAttribute('href');
|
||||
if(href && href.length > 1){
|
||||
var targetId=href.substring(1);
|
||||
if(targetId && !ROUTES.includes(targetId) && !LEGAL_TABS.hasOwnProperty(targetId)){
|
||||
var targetEl=document.getElementById(targetId);
|
||||
if(targetEl){
|
||||
e.preventDefault();
|
||||
targetEl.scrollIntoView({behavior:'smooth'});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});`;
|
||||
|
||||
const resClick = replaceWithEol(indexHtml, oldClickDelegation, newClickDelegation, indexEol);
|
||||
if (resClick) {
|
||||
indexHtml = resClick;
|
||||
console.log('✓ index.html : Gestionnaire de clics adapté pour les ancres internes.');
|
||||
} else {
|
||||
console.log('ℹ Gestionnaire de clics déjà à jour ou déjà patché.');
|
||||
}
|
||||
|
||||
fs.writeFileSync(INDEX_HTML_PATH, indexHtml, 'utf8');
|
||||
|
||||
|
||||
// =========================================================================
|
||||
// 3. MISE À JOUR DE sitemap.xml (SEO strict sans fragments d'URL)
|
||||
// =========================================================================
|
||||
const SITEMAP_PATH = path.join(SITE_DIR, 'sitemap.xml');
|
||||
const cleanSitemap = `<?xml version="1.0" encoding="UTF-8"?>
|
||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
|
||||
xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">
|
||||
<url>
|
||||
<loc>https://gastinel.me/</loc>
|
||||
<lastmod>2026-09-23</lastmod>
|
||||
<changefreq>weekly</changefreq>
|
||||
<priority>1.0</priority>
|
||||
<image:image>
|
||||
<image:loc>https://gastinel.me/assets/img/dji-fly-20250919-194610-0004-1758304172909-photo.webp</image:loc>
|
||||
<image:title>Horizon flamboyant au crépuscule dans le massif du Vercors</image:title>
|
||||
<image:caption>Prise de vue aérienne au drone par Théo Gastinel</image:caption>
|
||||
</image:image>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://gastinel.me/gws/</loc>
|
||||
<lastmod>2026-09-23</lastmod>
|
||||
<changefreq>weekly</changefreq>
|
||||
<priority>0.95</priority>
|
||||
<image:image>
|
||||
<image:loc>https://gastinel.me/assets/apps/gastinel-weather-studio/studio.webp</image:loc>
|
||||
<image:title>Gastinel Weather Studio — Station logicielle d'analyse microclimatique</image:title>
|
||||
<image:caption>Interface de comparaison multi-séries thermiques et TAF du Vercors</image:caption>
|
||||
</image:image>
|
||||
</url>
|
||||
</urlset>
|
||||
`;
|
||||
fs.writeFileSync(SITEMAP_PATH, cleanSitemap, 'utf8');
|
||||
console.log('✓ sitemap.xml : Nettoyé selon les standards stricts Google/Bing (URLs canoniques sans fragments).');
|
||||
|
||||
|
||||
// =========================================================================
|
||||
// 4. SYNCHRONISATION VERS Actual_Website
|
||||
// =========================================================================
|
||||
if (fs.existsSync(ACTUAL_DIR)) {
|
||||
console.log(`[SYNCHRO] Synchronisation vers ${ACTUAL_DIR}...`);
|
||||
fs.writeFileSync(path.join(ACTUAL_DIR, 'index.html'), indexHtml, 'utf8');
|
||||
|
||||
const actualGwsDir = path.join(ACTUAL_DIR, 'gws');
|
||||
if (!fs.existsSync(actualGwsDir)) fs.mkdirSync(actualGwsDir, { recursive: true });
|
||||
fs.writeFileSync(path.join(actualGwsDir, 'index.html'), gwsHtml, 'utf8');
|
||||
|
||||
// Copie sitemap & llms
|
||||
fs.writeFileSync(path.join(ACTUAL_DIR, 'sitemap.xml'), cleanSitemap, 'utf8');
|
||||
const llmsContent = fs.readFileSync(path.join(SITE_DIR, 'llms.txt'), 'utf8');
|
||||
fs.writeFileSync(path.join(ACTUAL_DIR, 'llms.txt'), llmsContent, 'utf8');
|
||||
|
||||
console.log('✓ Actual_Website synchronisé avec succès.');
|
||||
}
|
||||
|
||||
// =========================================================================
|
||||
// 5. RECOMPRESSION BROTLI 11 & GZIP 9
|
||||
// =========================================================================
|
||||
console.log('[COMPRESSION] Lancement de tools/precompress.js...');
|
||||
require('./precompress.js');
|
||||
|
||||
console.log('🎉 TOUTES LES ÉTAPES ONT ÉTÉ EXÉCUTÉES AVEC SUCCÈS !');
|
||||
Référencer dans un nouveau ticket
Bloquer un utilisateur