المكوّنات · قسم تذييل كامل
قسم تذييل كامل
أعمدة روابط ونشرة وحقوق بسنة محسوبة لا مكتوبة
12 تصاميم من هذه العائلة
<div class="bk bkft"><section>
<div class="top">
<div class="brand">
<span class="mk" aria-hidden="true">◆</span>
<h4 data-ar="مطاعم السرايا" data-en="Al-Saraya">مطاعم السرايا</h4>
<p data-ar="ثمانية فروع في الرياض وجدّة، وتوصيل حتى منتصف الليل." data-en="Eight branches in Riyadh and Jeddah, delivering until midnight.">ثمانية فروع في الرياض وجدّة، وتوصيل حتى منتصف الليل.</p>
</div>
<nav class="cols" aria-label="روابط التذييل">
<div><h4 data-ar="المطعم" data-en="Restaurant">المطعم</h4>
<a href="#" data-ar="القائمة" data-en="Menu">القائمة</a>
<a href="#" data-ar="الفروع" data-en="Branches">الفروع</a>
<a href="#" data-ar="الحجز" data-en="Booking">الحجز</a></div>
<div><h4 data-ar="الشركة" data-en="Company">الشركة</h4>
<a href="#" data-ar="عنّا" data-en="About">عنّا</a>
<a href="#" data-ar="الوظائف" data-en="Careers">الوظائف</a>
<a href="#" data-ar="الامتياز" data-en="Franchise">الامتياز</a></div>
<div><h4 data-ar="تواصل" data-en="Contact">تواصل</h4>
<a href="#" data-ar="اتّصل بنا" data-en="Call us">اتّصل بنا</a>
<a href="#" data-ar="شكوى" data-en="Complaint">شكوى</a></div>
</nav>
<form class="news" novalidate>
<h4 data-ar="عروض الأسبوع" data-en="Weekly offers">عروض الأسبوع</h4>
<span class="fld"><input type="email" placeholder="بريدك" aria-label="بريدك الإلكتروني" dir="ltr">
<button type="submit" aria-label="اشترك">→</button></span>
<span class="hint" role="status" aria-live="polite"></span>
</form>
</div>
<div class="bot"><span class="cr num"></span>
<span class="legal"><a href="#" data-ar="الخصوصية" data-en="Privacy">الخصوصية</a>
<a href="#" data-ar="الشروط" data-en="Terms">الشروط</a></span></div>
</section></div>
/* pt-scoped */
/* block-footer — سلسلة مطاعم */
.bkft{width:100%;height:100%;display:flex;flex-direction:column;
font-size:10px;color:var(--pt-text-secondary);overflow:hidden}
.bkft h2{margin:0;font-size:19px;line-height:1.35;color:var(--pt-text-primary);
font-weight:700;letter-spacing:-.01em}
.bkft h3{margin:0;font-size:12px;line-height:1.4;color:var(--pt-text-primary);font-weight:600}
.bkft h4{margin:0;font-size:10px;color:var(--pt-text-primary);font-weight:600}
.bkft p{margin:0;font-size:9.5px;line-height:1.85;color:var(--pt-text-muted)}
.bkft .eyebrow{font-size:8px;letter-spacing:.14em;color:var(--pt-accent);font-weight:700}
.bkft .num{font-variant-numeric:tabular-nums;letter-spacing:-.01em}
.bkft button, .bkft a{font:inherit;cursor:pointer;text-decoration:none}
.bkft button:focus-visible, .bkft a:focus-visible, .bkft input:focus-visible, .bkft summary:focus-visible{outline:2px solid var(--pt-focus-ring);outline-offset:2px}
/* الأقسام تمتدّ من حافّة إلى حافّة — هذا ما يميّزها عن المكوّنات */
.bkft > section{flex:1;display:flex;flex-direction:column;justify-content:center;min-height:0}
@media(pointer:coarse){.bkft button, .bkft a{min-height:44px;display:inline-flex;
align-items:center;justify-content:center}
}
/* شخصية: تذييل داكن، أربعة أعمدة، فاصل سفلي */
.bkft > section{justify-content:flex-end;gap:9px;padding:13px 22px 10px;
background:var(--pt-color-ink-900)}
.bkft .top{display:grid;grid-template-columns:1.5fr 2fr 1.3fr;gap:16px;align-items:start}
.bkft .brand{display:flex;flex-direction:column;gap:3px}
.bkft .mk{width:19px;height:19px;display:grid;place-items:center;
border-radius:var(--pt-radius-sm);background:var(--pt-accent);
color:var(--pt-color-ink-900);font-size:9px}
.bkft h4{color:#fff;font-size:9px}
.bkft .brand p{font-size:8px;color:rgba(255,255,255,.5);line-height:1.75}
.bkft .cols{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.bkft .cols div{display:flex;flex-direction:column;gap:3px}
.bkft .cols a{font-size:8.5px;color:rgba(255,255,255,.62)}
.bkft .cols a:hover{color:var(--pt-accent)}
.bkft .news{display:flex;flex-direction:column;gap:4px}
.bkft .fld{display:flex;border-radius:var(--pt-radius-sm);overflow:hidden;
border:1px solid rgba(255,255,255,.18);background:rgba(255,255,255,.06)}
.bkft .fld:focus-within{border-color:var(--pt-accent)}
.bkft input{flex:1;min-width:0;border:0;background:transparent;font:inherit;font-size:8.5px;
color:#fff;padding:5px 8px;outline:none}
.bkft input::placeholder{color:rgba(255,255,255,.38)}
.bkft .fld button{border:0;padding:0 9px;background:var(--pt-accent);
color:var(--pt-color-ink-900);font-size:11px}
.bkft .hint{font-size:7.5px;min-height:10px;color:rgba(255,255,255,.5)}
.bkft .hint.ok{color:var(--pt-accent)}
.bkft .hint.bad{color:var(--pt-color-danger-400)}
.bkft .bot{display:flex;align-items:center;justify-content:space-between;gap:10px;
padding-top:8px;border-top:1px solid rgba(255,255,255,.1);font-size:7.5px;
color:rgba(255,255,255,.42)}
.bkft .legal{display:flex;gap:10px}
.bkft .legal a{color:inherit}
.bkft .legal a:hover{color:var(--pt-accent)}
/* يعمل داخل إطار معزول — لا يعتمد على شيء خارجه */
/* pt-remount — يعاد التركيب عند تبديل اللغة */
(function () {
var host = document.querySelector('.bkft');
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 year = new Date().getFullYear();
root.querySelector('.cr').textContent = ar
? '© ' + year + ' مطاعم السرايا — جميع الحقوق محفوظة'
: '© ' + year + ' Al-Saraya — All rights reserved';
var frm = root.querySelector('.news');
var em = frm.querySelector('input'), hint = root.querySelector('.hint');
frm.addEventListener('submit', function (e) {
e.preventDefault();
var ok = /^[^@\s]+@[^@\s]+\.[a-z]{2,}$/i.test(em.value.trim());
hint.className = 'hint ' + (ok ? 'ok' : 'bad');
hint.textContent = ok ? (ar ? '✓ اشتركت — عروض كل ثلاثاء' : '✓ Subscribed — offers every Tuesday')
: (ar ? 'أدخل بريدًا صحيحًا' : 'Enter a valid email');
em.setAttribute('aria-invalid', String(!ok));
if (ok) { em.value = ''; setTimeout(function () {
hint.className = 'hint'; hint.textContent = ''; }, 2600); }
});
}
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(); });
})();
# Full Footer
**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:** Full Footer — Link columns, a newsletter, and a copyright year computed rather than typed
**Why this component matters:** Compute the copyright year at render time. A hard-coded year is the most common stale detail on the web and quietly signals an abandoned site.
**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.