Cards keep mascots, profile shows the real photo
This commit is contained in:
1 parent
8f4dc81a88
commit
af75141c02
2 files changed
+7
-5
No files matched your search
@@ -22,9 +22,11 @@ Real team photos go here (AGENTS.md → Team roster, D-art-direction P3).
|
|||||||
|
|
||||||
## Activation
|
## Activation
|
||||||
|
|
||||||
Drop a file into this directory with the exact slug name above — the card's `<img>` loads it
|
Drop a file into this directory with the exact slug name above and add `photo: assets/team/<slug>.webp`
|
||||||
automatically and hides the initials fallback. If the file is absent, the card shows the member's
|
to `content/team/<slug>.md` — the **profile window** then shows the real photo (it falls back to the
|
||||||
initial on a brand-soft disc (no broken image, no 404 flash). No code change needed.
|
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`.
|
||||||
|
|
||||||
## Источник
|
## Источник
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -339,10 +339,10 @@ if (window.matchMedia('(max-width: 767px)').matches) {
|
|||||||
var wrap = document.getElementById('team-grid');
|
var wrap = document.getElementById('team-grid');
|
||||||
if (!wrap) return;
|
if (!wrap) return;
|
||||||
wrap.innerHTML = TEAM.map(function (m) {
|
wrap.innerHTML = TEAM.map(function (m) {
|
||||||
// Фото ложится поверх монограммы; нет фото — «мордочка» (плейсхолдер), нет и её — монограмма (D12).
|
// Карточка — «мордочка» (решение заказчика 2026-11-10): реальное фото живёт только в профиле.
|
||||||
var face = '<span class="team-card__avatar">' +
|
var face = '<span class="team-card__avatar">' +
|
||||||
monogram(m.initials || (m.name || '?').charAt(0), 'team-card__monogram') +
|
monogram(m.initials || (m.name || '?').charAt(0), 'team-card__monogram') +
|
||||||
((m.photo || m.mascot) ? '<img class="team-card__photo" src="' + esc(m.photo || m.mascot) + '" alt="' + esc(m.name) +
|
(m.mascot ? '<img class="team-card__photo" src="' + esc(m.mascot) + '" alt="' + esc(m.name) +
|
||||||
'" width="96" height="96" loading="lazy" decoding="async" ' +
|
'" width="96" height="96" loading="lazy" decoding="async" ' +
|
||||||
'onload="this.previousElementSibling.hidden=true" onerror="this.remove()">' : '') +
|
'onload="this.previousElementSibling.hidden=true" onerror="this.remove()">' : '') +
|
||||||
'</span>';
|
'</span>';
|
||||||
|
|||||||
Reference in new issue
Block a user