From 86d4c729edc4b9e5a177e50ec11dafb15f1bb7c3 Mon Sep 17 00:00:00 2001 From: Bastien Chanot Date: Sun, 17 May 2026 03:53:42 +0200 Subject: [PATCH] docs(memory): capitalize BDR-005 favicon strategy + LRN-002 PIL icon recipe MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - BDR-005: SVG primary + PIL-generated PNG/ICO fallback for favicon set; alternatives (rsvg-convert/inkscape, SVG-only, online generator) rejected with reasons; CV mirror deferred to user finalization. - LRN-002: PIL supersample x8 + Lanczos downscale produces clean small-format icon antialiasing without rsvg-convert/inkscape/ImageMagick. - journal: 2026-05-17 entry — extended-vitrine refactor (1369d27) + favicon set (ef31fb3); CV files left untouched (user WIP). Co-Authored-By: Claude Opus 4.7 (1M context) --- .claude/memory/decisions.md | 16 ++++++++++++++++ .claude/memory/journal.md | 6 ++++++ .claude/memory/learnings.md | 10 ++++++++++ 3 files changed, 32 insertions(+) diff --git a/.claude/memory/decisions.md b/.claude/memory/decisions.md index 82294de..565faed 100644 --- a/.claude/memory/decisions.md +++ b/.claude/memory/decisions.md @@ -26,6 +26,7 @@ rules: | BDR-002 | 2026-05-15 | weasyprint pour PDF CV depuis HTML | accepted | | BDR-003 | 2026-05-15 | Position pro: CDI prioritaire, freelance parallèle | accepted | | BDR-004 | 2026-05-15 | Containerize site with nginx:alpine behind reverse proxy | accepted | +| BDR-005 | 2026-05-17 | Favicon: SVG primary + PIL raster fallback | accepted | --- @@ -79,3 +80,18 @@ rules: - Bare static files served by host nginx — no isolation, config drift between sites, harder rollback. - Caddy / Traefik container — overkill for 1 static site, host nginx already handles TLS for other domains. - **Reference**: `Dockerfile`, `nginx.conf`, `docker-compose.yml`, `.env.example`. + +--- + +## BDR-005 — Favicon: SVG primary + PIL raster fallback + +- **Date**: 2026-05-17 +- **Status**: accepted +- **Decision**: Ship `favicon.svg` (vector primary) + PIL-generated `favicon-32.png`, `favicon.ico` (16/24/32/48), `apple-touch-icon.png` (180×180). 4 `` tags in `` of `index.html`. +- **Why**: Modern browsers fetch SVG (sharp any DPI). Legacy + iOS fall back ICO/PNG. PIL preinstalled on host → zero new dep. Mark replicates `.brand::before` pulse-dot (visual continuity with nav). +- **Alternatives rejected**: + - `rsvg-convert` / `inkscape` for SVG→PNG — not installed on host, setup friction. + - SVG-only — drops Safari <14 + iOS home-screen. + - Online favicon generator — external dep, opaque rendering, no source control. +- **CV HTML**: not modified (user's WIP M state). Browser auto-fetches `/favicon.ico` from root → CV tab still shows icon. Link block mirror logged in `.claude/tasks/TODO.md` for later. +- **Reference**: `favicon.svg`, `favicon-32.png`, `favicon.ico`, `apple-touch-icon.png`, `index.html` head, commit `ef31fb3`. diff --git a/.claude/memory/journal.md b/.claude/memory/journal.md index 219acef..ee260cb 100644 --- a/.claude/memory/journal.md +++ b/.claude/memory/journal.md @@ -26,3 +26,9 @@ rules: - Commits: `54e8300..7957b04` + user's `414bce1` (CV final). - Dedicated `#formation` section added between Parcours + Contact: timeline reused, 3 theme-cards inside École 42 entry (Systèmes/Kernel · Bas niveau · Sécurité/Algo), TSRIT block with `Félicitations du jury` honors pill. Removed `.contact-side` aside + dead CSS, `.contact-list` 2-col on >=768px to fill freed space. Nav link inserted. Commit `1d5fbfa`. - Formation copy fix: title now "Deux écoles, un fil rouge : le bas niveau."; strip `` from section-intro for consistency; rewrite École 42 role+desc (kernel/memory/shell/security); drop false TSRIT li claiming CareGame CDI (CareGame stage was 2018-2019 during 42, not 2015 TSRIT). 1 file, +4/-5. + +## 2026-05-17 + +- Landing extended-vitrine refactor shipped (commit `1369d27`): meta/title sync CV, hero subtitle "Systèmes · Embarqué · Backend", stack 6→8 cards (drop VMware/Gitflow/Agile, add cgroups/namespaces/SELinux/GitHub Actions + Cloud-Infra + IA-Outils, Familier avec C++), Parcours 3 entries rewritten bullets+stack pills (lone-wolf wording purged, Deewee dates corrected fév→nov 2017), new Projets section (Git auto-hébergé + Homelab), new Méthode section (5 points), contact email → bastien@bchanot.fr. +- Favicon set added (commit `ef31fb3`): SVG primary + PIL-generated PNG/ICO/apple-touch. Brand pulse-dot translated to icon. BDR-005 + LRN-002 logged. +- CV files (`CV_Bastien_Chanot.html`, `.pdf`) untouched — user's WIP M state, off-scope per brief. diff --git a/.claude/memory/learnings.md b/.claude/memory/learnings.md index 32f5b8c..538dfbd 100644 --- a/.claude/memory/learnings.md +++ b/.claude/memory/learnings.md @@ -20,6 +20,7 @@ rules: | ID | Date | Pattern | Applies to | |----|------|---------|------------| | LRN-001 | 2026-05-15 | certbot --nginx matches `server_name`, not filename | nginx + certbot on multi-site VPS | +| LRN-002 | 2026-05-17 | PIL supersample ×8 + Lanczos = clean icon antialiasing | Python stdlib icon generation | --- @@ -29,3 +30,12 @@ rules: - **Pattern**: `certbot install --cert-name X` (and `certbot --nginx -d X`) locates the target vhost by scanning every `server_name` directive in active nginx configs. The filename in `sites-available/` is irrelevant. A file named `X.conf` with `server_name Y;` inside will NOT be picked up for domain X. - **Context**: `/etc/nginx/sites-available/bchanot.fr` existed and was symlinked into `sites-enabled/`, but its body still contained `server_name autreprojet.fr www.autreprojet.fr;` — a copy-paste leftover from a previous project. Certbot returned `Could not automatically find a matching server block for bchanot.fr`. - **Future application**: Before running certbot on a multi-site VPS, `grep -n "server_name" /etc/nginx/sites-enabled/*` — confirm the target domain is actually declared inside, not just present in the filename. Same logic applies when troubleshooting "why is nginx serving the wrong site" — match by `server_name`, never by filename. + +--- + +## LRN-002 — PIL supersample ×8 + Lanczos = clean small-format icon antialiasing + +- **Date**: 2026-05-17 +- **Pattern**: Render icon at 8× target size via `ImageDraw.rounded_rectangle` + `ellipse` on RGBA canvas, then `Image.resize((target, target), Image.LANCZOS)`. Output rivals `rsvg-convert` / `inkscape` for simple geometric shapes. Crisp at 16×16 favicon scale, no visible jaggies. +- **Context**: Generated `favicon-32.png`, `apple-touch-icon.png` (180×180), `favicon.ico` (multi-size 16/24/32/48) for `bchanot.fr` from scratch — no `rsvg-convert` / `inkscape` / `ImageMagick` on host. Single PIL script, ~20 lines. +- **Future application**: Any project needing a PNG/ICO icon set with a stdlib-only Python toolchain. Skip if shape is complex (text rendering, gradients, curves) — use `rsvg-convert` or commit a finalized PNG instead.