Переглянути джерело

docs(memory): capitalize BDR-005 favicon strategy + LRN-002 PIL icon recipe

- 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) <noreply@anthropic.com>
Bastien Chanot 1 годину тому
батько
коміт
86d4c729ed
3 змінених файлів з 32 додано та 0 видалено
  1. 16 0
      .claude/memory/decisions.md
  2. 6 0
      .claude/memory/journal.md
  3. 10 0
      .claude/memory/learnings.md

+ 16 - 0
.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 `<link>` tags in `<head>` 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`.

+ 6 - 0
.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 `<em>` 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.

+ 10 - 0
.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.