From af75141c021ed6c52d7a12318151b4f08ff86937 Mon Sep 17 00:00:00 2001 From: FastD Date: Tue, 10 Nov 2026 19:01:14 +0300 Subject: [PATCH] Cards keep mascots, profile shows the real photo --- src/assets/team/README.md | 8 +++++--- src/js/main.js | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/assets/team/README.md b/src/assets/team/README.md index 641bcf9..e06db21 100644 --- a/src/assets/team/README.md +++ b/src/assets/team/README.md @@ -22,9 +22,11 @@ Real team photos go here (AGENTS.md → Team roster, D-art-direction P3). ## Activation -Drop a file into this directory with the exact slug name above — the card's `` loads it -automatically and hides the initials fallback. If the file is absent, the card shows the member's -initial on a brand-soft disc (no broken image, no 404 flash). No code change needed. +Drop a file into this directory with the exact slug name above and add `photo: assets/team/.webp` +to `content/team/.md` — the **profile window** then shows the real photo (it falls back to the +card mascot when `photo` is absent). The **card** keeps the mascot by a customer decision (2026-11-10): +`mascot` drives the 96×96 circle, `photo` drives the profile. Run `node scripts/generate-content.mjs` +after editing the `.md`. ## Источник diff --git a/src/js/main.js b/src/js/main.js index 7392d99..ba7c48b 100644 --- a/src/js/main.js +++ b/src/js/main.js @@ -339,10 +339,10 @@ if (window.matchMedia('(max-width: 767px)').matches) { var wrap = document.getElementById('team-grid'); if (!wrap) return; wrap.innerHTML = TEAM.map(function (m) { - // Фото ложится поверх монограммы; нет фото — «мордочка» (плейсхолдер), нет и её — монограмма (D12). + // Карточка — «мордочка» (решение заказчика 2026-11-10): реальное фото живёт только в профиле. var face = '' + monogram(m.initials || (m.name || '?').charAt(0), 'team-card__monogram') + - ((m.photo || m.mascot) ? '' + esc(m.name) +
+        (m.mascot ? '<img class=' : '') + '';