المكوّنات · شريط شعارات عملاء
شريط شعارات عملاء
شريط لا نهائي يتوقّف تمامًا مع تقليل الحركة
12 تصاميم من هذه العائلة
<div class="bk bkl"><section>
<p class="lead" data-ar="يثق بنا أكثر من 40 مؤسّسة في المنطقة" data-en="Trusted by 40+ institutions across the region">يثق بنا أكثر من 40 مؤسّسة في المنطقة</p>
<div class="marq" aria-label="شعارات عملائنا"><div class="track"></div></div>
</section></div>
/* pt-scoped */
/* block-logos — مصرف */
.bkl{width:100%;height:100%;display:flex;flex-direction:column;
font-size:10px;color:var(--pt-text-secondary);overflow:hidden}
.bkl h2{margin:0;font-size:19px;line-height:1.35;color:var(--pt-text-primary);
font-weight:700;letter-spacing:-.01em}
.bkl h3{margin:0;font-size:12px;line-height:1.4;color:var(--pt-text-primary);font-weight:600}
.bkl h4{margin:0;font-size:10px;color:var(--pt-text-primary);font-weight:600}
.bkl p{margin:0;font-size:9.5px;line-height:1.85;color:var(--pt-text-muted)}
.bkl .eyebrow{font-size:8px;letter-spacing:.14em;color:var(--pt-accent);font-weight:700}
.bkl .num{font-variant-numeric:tabular-nums;letter-spacing:-.01em}
.bkl button, .bkl a{font:inherit;cursor:pointer;text-decoration:none}
.bkl button:focus-visible, .bkl a:focus-visible, .bkl input:focus-visible, .bkl summary:focus-visible{outline:2px solid var(--pt-focus-ring);outline-offset:2px}
/* الأقسام تمتدّ من حافّة إلى حافّة — هذا ما يميّزها عن المكوّنات */
.bkl > section{flex:1;display:flex;flex-direction:column;justify-content:center;min-height:0}
@media(pointer:coarse){.bkl button, .bkl a{min-height:44px;display:inline-flex;
align-items:center;justify-content:center}
}
/* شخصية: شريط أفقي بتلاشٍ عند الحافّتين، بلا حدود */
.bkl > section{gap:10px;padding:18px 0;background:var(--pt-surface);align-items:center}
.bkl .lead{font-size:9px;color:var(--pt-text-muted);text-align:center}
.bkl .marq{width:100%;overflow:hidden;
-webkit-mask-image:linear-gradient(90deg,transparent,#000 9%,#000 91%,transparent);
mask-image:linear-gradient(90deg,transparent,#000 9%,#000 91%,transparent)}
.bkl .track{display:flex;gap:26px;width:max-content;
animation:bkslide 22s linear infinite}
/* الإزاحة −50% بالضبط لأنّ المسار مكرّر مرّتين: أي رقم آخر يُحدث قفزة */
@keyframes bkslide{from{transform:translateX(0)}to{transform:translateX(-50%)}}
[dir=rtl] .bkl .track{animation-name:bkslide-rtl}
@keyframes bkslide-rtl{from{transform:translateX(0)}to{transform:translateX(50%)}}
@media(prefers-reduced-motion:reduce){.bkl .track{animation:none;
justify-content:center;width:100%;flex-wrap:wrap;row-gap:10px}
}
.bkl .lg{display:flex;align-items:center;gap:5px;flex:none;
color:var(--pt-text-muted);font-size:10px;font-weight:700;letter-spacing:.02em;
opacity:.62;transition:opacity var(--pt-motion-duration-fast) var(--pt-motion-easing-standard)}
.bkl .lg:hover{opacity:1;color:var(--pt-text-primary)}
.bkl .lg i{font-style:normal;font-size:13px;color:var(--pt-accent)}
@media(prefers-reduced-motion:reduce){.bkl .lg{transition:none}
}
/* يعمل داخل إطار معزول — لا يعتمد على شيء خارجه */
/* pt-remount — يعاد التركيب عند تبديل اللغة */
(function () {
var host = document.querySelector('.bkl');
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 LOGOS = [
{ i: '◆', ar: 'الأفق القابضة', en: 'Ufuq Holding' },
{ i: '◉', ar: 'مجموعة نماء', en: 'Namaa Group' },
{ i: '▲', ar: 'صناعات الخليج', en: 'Gulf Industries' },
{ i: '⬢', ar: 'دار العمران', en: 'Dar Al-Umran' },
{ i: '◈', ar: 'تقنيات الشرق', en: 'East Tech' },
{ i: '❖', ar: 'مرافئ اللوجستية', en: 'Marafi Logistics' }
];
/* المسار مكرّر مرّتين، والحركة تُزيح نصفه بالضبط — فتبدو الدورة بلا بداية */
var one = LOGOS.map(function (l) {
return '<span class="lg"><i aria-hidden="true">' + l.i + '</i>' +
(ar ? l.ar : l.en) + '</span>';
}).join('');
var track = root.querySelector('.track');
track.innerHTML = one + one;
/* النسخة الثانية تكرار بصري لا محتوى — لا يقرؤها القارئ الشاشيّ مرّتين */
[].slice.call(track.children).slice(LOGOS.length).forEach(function (el) {
el.setAttribute('aria-hidden', 'true');
});
if (matchMedia('(prefers-reduced-motion: reduce)').matches) {
/* التوقّف التامّ لا الإبطاء: مثيرات الدوار لا تعنيها السرعة */
[].slice.call(track.children).slice(LOGOS.length).forEach(function (el) { el.remove(); });
}
}
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(); });
})();
# Client Logo Marquee
**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:** Client Logo Marquee — An endless strip that stops completely when motion is reduced
**Why this component matters:** Duplicate the track and translate by exactly −50% so the loop is seamless; and under prefers-reduced-motion stop it outright rather than slowing it — vestibular triggers do not care about speed.
**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.