المكوّنات · قسم الفريق
قسم الفريق
بطاقات أشخاص بأدوار وروابط، بشبكة تتساوى ارتفاعًا
12 تصاميم من هذه العائلة
<div class="bk bkm"><section>
<div class="head">
<span class="eyebrow" data-ar="من نحن" data-en="THE TEAM">من نحن</span>
<h3 data-ar="أربعة أشخاص، وعمل واحد" data-en="Four people, one craft">أربعة أشخاص، وعمل واحد</h3>
</div>
<ul class="grid"></ul>
</section></div>
/* pt-scoped */
/* block-team — استوديو تصميم */
.bkm{width:100%;height:100%;display:flex;flex-direction:column;
font-size:10px;color:var(--pt-text-secondary);overflow:hidden}
.bkm h2{margin:0;font-size:19px;line-height:1.35;color:var(--pt-text-primary);
font-weight:700;letter-spacing:-.01em}
.bkm h3{margin:0;font-size:12px;line-height:1.4;color:var(--pt-text-primary);font-weight:600}
.bkm h4{margin:0;font-size:10px;color:var(--pt-text-primary);font-weight:600}
.bkm p{margin:0;font-size:9.5px;line-height:1.85;color:var(--pt-text-muted)}
.bkm .eyebrow{font-size:8px;letter-spacing:.14em;color:var(--pt-accent);font-weight:700}
.bkm .num{font-variant-numeric:tabular-nums;letter-spacing:-.01em}
.bkm button, .bkm a{font:inherit;cursor:pointer;text-decoration:none}
.bkm button:focus-visible, .bkm a:focus-visible, .bkm input:focus-visible, .bkm summary:focus-visible{outline:2px solid var(--pt-focus-ring);outline-offset:2px}
/* الأقسام تمتدّ من حافّة إلى حافّة — هذا ما يميّزها عن المكوّنات */
.bkm > section{flex:1;display:flex;flex-direction:column;justify-content:center;min-height:0}
@media(pointer:coarse){.bkm button, .bkm a{min-height:44px;display:inline-flex;
align-items:center;justify-content:center}
}
/* شخصية: بطاقات متمركزة بصور دائرية، انحناء متوسّط */
.bkm > section{gap:10px;padding:14px 22px;background:var(--pt-bg-base)}
.bkm .head{display:flex;flex-direction:column;align-items:center;gap:2px;text-align:center}
.bkm .grid{list-style:none;margin:0;padding:0;display:grid;
grid-template-columns:repeat(4,1fr);gap:9px;align-items:stretch}
.bkm .grid li{display:flex;flex-direction:column;align-items:center;gap:3px;text-align:center;
padding:10px 7px;border-radius:var(--pt-radius-md);background:var(--pt-surface);
border:1px solid var(--pt-border-subtle);
transition:border-color var(--pt-motion-duration-fast) var(--pt-motion-easing-standard)}
.bkm .grid li:hover{border-color:var(--pt-accent)}
.bkm .av{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;
font-size:14px;font-weight:700;color:var(--pt-color-ink-900);margin-bottom:2px}
.bkm .nm{font-size:9px;color:var(--pt-text-primary);font-weight:600}
.bkm .rl{font-size:7.5px;color:var(--pt-text-muted)}
.bkm .lk{margin-top:2px;font-size:7px;color:var(--pt-accent);letter-spacing:.06em}
@media(prefers-reduced-motion:reduce){.bkm .grid li{transition:none}
}
/* يعمل داخل إطار معزول — لا يعتمد على شيء خارجه */
/* pt-remount — يعاد التركيب عند تبديل اللغة */
(function () {
var host = document.querySelector('.bkm');
if (!host) return;
var snapshot = host.innerHTML;
var timers = [];
var ac = null;
/* الجسم كما كتبه المولِّد. يستقبل بدائل مظلَّلة لـ root وdocument
والمؤقّتات، فينظّف نفسه دون أن يعرف أنه قابل لإعادة التركيب. */
function run(root, document, setTimeout, setInterval) {
var ar = document.documentElement.lang !== 'en';
var n = function (v, d) { return Number(v).toLocaleString('en-US', {
minimumFractionDigits: d || 0, maximumFractionDigits: d || 0 }); };
var TEAM = [
{ n: { ar: 'ليان القحطاني', en: 'Layan Al-Qahtani' },
r: { ar: 'مديرة الاستوديو', en: 'Studio director' }, h: 262 },
{ n: { ar: 'يوسف الدوسري', en: 'Yousef Al-Dosari' },
r: { ar: 'مصمّم هوية', en: 'Brand designer' }, h: 188 },
{ n: { ar: 'سلمى النعيمي', en: 'Salma Al-Nuaimi' },
r: { ar: 'مصمّمة واجهات', en: 'UI designer' }, h: 32 },
{ n: { ar: 'راكان الحربي', en: 'Rakan Al-Harbi' },
r: { ar: 'مخرج فيديو', en: 'Motion lead' }, h: 146 }
];
/* الحرف الأوّل زينة والاسم مكتوب تحته — فالصورة مخفيّة عن القارئ الشاشيّ
وإلّا قرأ كل شخص مرّتين. */
root.querySelector('.grid').innerHTML = TEAM.map(function (t) {
var name = ar ? t.n.ar : t.n.en;
return '<li><span class="av" aria-hidden="true" style="background:hsl(' + t.h +
' 58% 68%)">' + name.charAt(0) + '</span>' +
'<span class="nm">' + name + '</span>' +
'<span class="rl">' + (ar ? t.r.ar : t.r.en) + '</span>' +
'<span class="lk">' + (ar ? 'أعماله' : 'Portfolio') + ' ↗</span></li>';
}).join('');
}
function mount() {
ac = new AbortController();
var real = window.document;
/* وسيط يمرّر كل شيء إلى المستند الحقيقي، ويعلّق كل مستمع بإشارة
تُقطع عند إعادة التركيب — فلا يبقى مستمع من نسخة ماتت. */
var doc = new Proxy(real, {
get: function (t, k) {
if (k === 'addEventListener') {
return function (type, fn, opts) {
var o = (opts && typeof opts === 'object') ? Object.assign({}, opts)
: { capture: !!opts };
o.signal = ac.signal;
return t.addEventListener(type, fn, o);
};
}
var v = t[k];
return typeof v === 'function' ? v.bind(t) : v;
}
});
function track(fn) {
return function (f, ms) { var id = fn(f, ms); timers.push(id); return id; };
}
run(host, doc, track(window.setTimeout.bind(window)),
track(window.setInterval.bind(window)));
}
function unmount() {
if (ac) ac.abort();
// المعرّفان يتشاركان فضاءً واحدًا في المتصفّح، فالإلغاء المزدوج آمن
timers.forEach(function (id) { window.clearTimeout(id); window.clearInterval(id); });
timers = [];
host.innerHTML = snapshot;
}
mount();
addEventListener('pt-lang', function () { unmount(); mount(); });
})();
# Team Section
**Role:** You are an Arabic-first UI designer and front-end engineer. Read the whole
specification before writing a single line, then follow it literally. If two requirements
conflict, favour usability over visual effect.
**Goal:** Team Section — People cards with roles and links, on an equal-height grid
**Why this component matters:** Team photos are decorative when the name is already text — mark them aria-hidden and let the name carry the meaning, or a screen reader reads each person twice.
**Direction:** Genuine RTL — not a mirrored Latin layout. Use logical properties
(`margin-inline-start`, `padding-inline`, `inset-inline-start`, `text-align: start`),
never physical ones (`margin-left`, `left`). The layout must flip with `dir` on its own,
with no duplicated rules.
**Typography:** Cairo for Arabic, IBM Plex Sans for Latin. Arabic line-height must be
`0.18` higher than the Latin equivalent — dots, hamzas and maddas need more vertical room.
Arabic font-size runs `1.06×` the Latin size at the same optical weight.
**Numerals:** Western digits in both languages (`1,234.50`). Only the currency changes:
`ر.س` **after** the number in Arabic, `$` **before** it in English. Jordanian dinar
uses **three** decimal places, not two.
**Colors:** Dark mode — background `#0D142B` · surfaces `#211F54` · borders `#545C91` · text `#918FC2`.
Accent `#ADA9E8` must never exceed 8% of the screen area.
**Language:** Bilingual — every string carries both Arabic and English, and the layout
flips with `dir` automatically.
**States:** `default` · `hover` · `focus` · `active` · `disabled` · `loading` · `error`.
Do not design the resting state alone.
**Accessibility:** Contrast ratio at least `4.5:1`, complete keyboard navigation,
visible focus rings, and honour `prefers-reduced-motion`.
**Output:** Clean HTML and CSS in two separate files. No frameworks, no libraries,
no external dependencies.