feat(brand): refonte favicon + og-image, reskin /soutenir
All checks were successful
Deploy info-canicule / deploy (push) Successful in 1m31s
All checks were successful
Deploy info-canicule / deploy (push) Successful in 1m31s
- favicon.svg : nouveau logo (sun + brand + droplet) cohérent avec le header - favicon-32 / favicon-192 / apple-touch-icon générés par scripts/build-favicon.mjs (sharp) - og-image refait avec la nouvelle identité (paper, Manrope-like, pills vigilance avec glyphes) - Base.astro : link rel icon + apple-touch-icon ajoutés - /soutenir : reskin (kicker + h1 accentué + barre d'objectif en brand-tint, blocs ic-card), fonctionnalité Ko-fi conservée Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
0723ee10e3
commit
d5c0b0968d
9 changed files with 153 additions and 81 deletions
27
scripts/build-favicon.mjs
Normal file
27
scripts/build-favicon.mjs
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
#!/usr/bin/env node
|
||||
// Génère les fallbacks PNG du favicon (apple-touch-icon + 32px) depuis public/favicon.svg.
|
||||
// Lancé à la demande quand le SVG change : `node scripts/build-favicon.mjs`.
|
||||
|
||||
import sharp from 'sharp';
|
||||
import { readFileSync } from 'node:fs';
|
||||
import { resolve, dirname } from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url));
|
||||
const SVG = resolve(__dirname, '../public/favicon.svg');
|
||||
const buf = readFileSync(SVG);
|
||||
|
||||
const outputs = [
|
||||
{ path: '../public/apple-touch-icon.png', size: 180 },
|
||||
{ path: '../public/favicon-32.png', size: 32 },
|
||||
{ path: '../public/favicon-192.png', size: 192 },
|
||||
];
|
||||
|
||||
for (const o of outputs) {
|
||||
const dest = resolve(__dirname, o.path);
|
||||
await sharp(buf, { density: 384 })
|
||||
.resize(o.size, o.size, { fit: 'contain', background: { r: 0, g: 0, b: 0, alpha: 0 } })
|
||||
.png({ compressionLevel: 9 })
|
||||
.toFile(dest);
|
||||
console.log(`Wrote ${dest} (${o.size}×${o.size})`);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue