24-4: home page sections — implemented, QA Review
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
id: 24-4
|
id: 24-4
|
||||||
title: 24-4 Home Page Sections (Hero to Latest Articles)
|
title: 24-4 Home Page Sections (Hero to Latest Articles)
|
||||||
status: Ready for Dev
|
status: QA Review
|
||||||
date: 2026-10-31
|
date: 2026-10-31
|
||||||
parent: 24
|
parent: 24
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
# Manual tests — 24-4 Home Page Sections
|
||||||
|
|
||||||
|
Automated (passed 2026-10-31, `tests/Feature/Design/HomeRedesignTest.php`, 8 tests): sections `top`, pillars band, `founder`,
|
||||||
|
`services`, `mission`, `values`, `posts` in order in ar and en; copy from site/home keys; one h1 and non-empty alt on every
|
||||||
|
image; the four JPEGs exist (magic bytes); hero balance + static balance render; four service rows linking `#book` with chips;
|
||||||
|
text-only post cards with 3 posts and the empty message with none; no "Unsplash"; all new site.* keys in both languages;
|
||||||
|
`lang/*/home.php` unchanged versus BASE.
|
||||||
|
UI loop (libra.test `/`, 390/768/1440): no horizontal scroll at any width, h1 count 1, no missing alt. At 390 it reports 1
|
||||||
|
element past the edge (probably the hero `.tag` card, which is positioned off the frame on purpose) — please eyeball.
|
||||||
|
Fonts in use include Cairo (existing Tailwind classes elsewhere in the shell), Markazi and IBM Plex.
|
||||||
|
|
||||||
|
- [ ] `/` in Arabic and in English (`/language/en`): the seven sections read correctly and look like the approved mockup.
|
||||||
|
- [ ] Hero: balance settles level; moving the mouse across the frame tips it.
|
||||||
|
- [ ] Hover a service row: fills forest, cream text. Hover a value card: lifts, medallion rotates. Hover a post card: lifts.
|
||||||
|
- [ ] Each of the 3 latest posts opens `/posts/{post}`; with no published posts the "coming soon" text shows.
|
||||||
|
- [ ] 390px: no sideways scroll; sections stack; the tag card does not cut off the screen.
|
||||||
|
- [ ] The "Book a consultation" buttons scroll to `#book`, which only exists after 24-5.
|
||||||
@@ -140,7 +140,7 @@
|
|||||||
| 24-1 | 24-1 Public Design Foundation (Stylesheet, Script, Fonts, Layout) | QA Review |
|
| 24-1 | 24-1 Public Design Foundation (Stylesheet, Script, Fonts, Layout) | QA Review |
|
||||||
| 24-2 | 24-2 Navigation and Footer | QA Review |
|
| 24-2 | 24-2 Navigation and Footer | QA Review |
|
||||||
| 24-3 | 24-3 Signature Balance Component | QA Review |
|
| 24-3 | 24-3 Signature Balance Component | QA Review |
|
||||||
| 24-4 | 24-4 Home Page Sections (Hero to Latest Articles) | Ready for Dev |
|
| 24-4 | 24-4 Home Page Sections (Hero to Latest Articles) | QA Review |
|
||||||
| 24-5 | 24-5 Home Booking Card (Compact Booking and Day Strip) | Ready for Dev |
|
| 24-5 | 24-5 Home Booking Card (Compact Booking and Day Strip) | Ready for Dev |
|
||||||
| 24-6 | 24-6 Booking Page and Booking Success | Ready for Dev |
|
| 24-6 | 24-6 Booking Page and Booking Success | Ready for Dev |
|
||||||
| 24-7 | 24-7 About Page | Ready for Dev |
|
| 24-7 | 24-7 About Page | Ready for Dev |
|
||||||
|
|||||||
@@ -20,4 +20,48 @@ return [
|
|||||||
'footer_contact' => 'تواصل',
|
'footer_contact' => 'تواصل',
|
||||||
'footer_terms' => 'شروط الاستخدام',
|
'footer_terms' => 'شروط الاستخدام',
|
||||||
'footer_privacy' => 'سياسة الخصوصية',
|
'footer_privacy' => 'سياسة الخصوصية',
|
||||||
|
'hero_eyebrow' => 'ليبرا للحقوق · فلسطين',
|
||||||
|
'hero_title_a' => 'العدالة ',
|
||||||
|
'hero_title_em' => 'ممارسةٌ يومية',
|
||||||
|
'hero_title_b' => '، لا مبدأٌ نظري.',
|
||||||
|
'trust_1_title' => 'أفراد وشركات',
|
||||||
|
'trust_1_text' => 'استشارات وتمثيل',
|
||||||
|
'trust_2_title' => 'المرأة والأسرة',
|
||||||
|
'trust_2_text' => 'دعم قانوني متخصص',
|
||||||
|
'trust_3_title' => 'عربي · English',
|
||||||
|
'trust_3_text' => 'خدمة بلغتين',
|
||||||
|
'alt_olive_tree' => 'شجرة زيتون معمّرة بين صخور كلسية',
|
||||||
|
'balance_label' => 'ميزان العدالة',
|
||||||
|
'frame_caption' => 'لكلّ حقٍّ وزنُه',
|
||||||
|
'frame_tag' => 'استشارات حضورية أو عن بُعد',
|
||||||
|
'pillars_label' => 'ركائزنا',
|
||||||
|
'pillar_justice' => 'العدالة',
|
||||||
|
'pillar_justice_text' => 'الإنصاف، والمساءلة، وسيادة القانون.',
|
||||||
|
'pillar_dignity' => 'الكرامة',
|
||||||
|
'pillar_dignity_text' => 'القيمة الأصيلة لكل إنسان.',
|
||||||
|
'pillar_advocacy' => 'الدفاع',
|
||||||
|
'pillar_advocacy_text' => 'انخراطٌ فاعل، وقولُ الحق في وجه السلطة.',
|
||||||
|
'art_founder' => 'المادة ٠١ — المؤسِّسة',
|
||||||
|
'founder_role' => 'المؤسِّسة · محامية',
|
||||||
|
'founder_quote' => '«العدالة ممارسة يومية، وليست مجرد مبدأ نظري.»',
|
||||||
|
'founder_cta' => 'اقرأ قصتنا',
|
||||||
|
'art_services' => 'المادة ٠٢ — الخدمات',
|
||||||
|
'services_lede' => 'ممارسة قانونية أصيلة، تقوم على البحث والمعرفة الميدانية.',
|
||||||
|
'art_vision' => 'المادة ٠٣ — الرؤية',
|
||||||
|
'vision_title' => 'منسوجةٌ من نسيج المجتمع',
|
||||||
|
'vision_text' => 'ليبرا نسيجٌ أصيل من المجتمع، تتقصّى مشكلاته وتوثّقها وتكشف جذورها، وتقدّم حلولاً عملية لرأب أوجاعه مهما صغرت، عبر العمل التشاركي والبحث الميداني الحقيقي.',
|
||||||
|
'alt_hoop' => 'تطريز بغرزة الصليب مشدود على طارة خشبية',
|
||||||
|
'card_institution_label' => 'لمؤسستنا',
|
||||||
|
'card_institution_title' => 'القانون والبحث والميدان',
|
||||||
|
'card_institution_text' => 'نلتقط نبض المجتمع ونحوّل تحدياته إلى معرفة وحلول قانونية مبتكرة.',
|
||||||
|
'alt_olives' => 'ثمار زيتون على غصن',
|
||||||
|
'card_society_label' => 'للمجتمع',
|
||||||
|
'card_society_title' => 'شريكٌ موثوق للقضاء',
|
||||||
|
'card_society_text' => 'نعيد وصل المجتمع بتاريخه وإرثه القانوني.',
|
||||||
|
'alt_hills' => 'تلال وطريق متعرّج عند الغروب',
|
||||||
|
'card_diaspora_label' => 'لفلسطينيي الشتات',
|
||||||
|
'card_diaspora_title' => 'عودةٌ إلى الأرض والعائلة',
|
||||||
|
'card_diaspora_text' => 'نساعد الفلسطينيين في الخارج على البحث في عائلاتهم وتاريخهم وأراضيهم.',
|
||||||
|
'art_values' => 'المادة ٠٤ — القيم',
|
||||||
|
'art_articles' => 'المادة ٠٥ — المقالات',
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -20,4 +20,48 @@ return [
|
|||||||
'footer_contact' => 'Contact',
|
'footer_contact' => 'Contact',
|
||||||
'footer_terms' => 'Terms of use',
|
'footer_terms' => 'Terms of use',
|
||||||
'footer_privacy' => 'Privacy policy',
|
'footer_privacy' => 'Privacy policy',
|
||||||
|
'hero_eyebrow' => 'Libra for Rights · Palestine',
|
||||||
|
'hero_title_a' => 'Justice is a ',
|
||||||
|
'hero_title_em' => 'daily practice',
|
||||||
|
'hero_title_b' => ', not a theory.',
|
||||||
|
'trust_1_title' => 'Individuals & companies',
|
||||||
|
'trust_1_text' => 'Consultations and representation',
|
||||||
|
'trust_2_title' => 'Women & family',
|
||||||
|
'trust_2_text' => 'Specialised legal support',
|
||||||
|
'trust_3_title' => 'Arabic · English',
|
||||||
|
'trust_3_text' => 'Bilingual service',
|
||||||
|
'alt_olive_tree' => 'An ancient olive tree among limestone rocks',
|
||||||
|
'balance_label' => 'The scales of justice',
|
||||||
|
'frame_caption' => 'Every right carries its weight',
|
||||||
|
'frame_tag' => 'Consultations in person or remotely',
|
||||||
|
'pillars_label' => 'Our pillars',
|
||||||
|
'pillar_justice' => 'Justice',
|
||||||
|
'pillar_justice_text' => 'Fairness, accountability and the rule of law.',
|
||||||
|
'pillar_dignity' => 'Dignity',
|
||||||
|
'pillar_dignity_text' => 'The inherent worth of every person.',
|
||||||
|
'pillar_advocacy' => 'Advocacy',
|
||||||
|
'pillar_advocacy_text' => 'Active engagement, and speaking truth to power.',
|
||||||
|
'art_founder' => 'Article 01 — The founder',
|
||||||
|
'founder_role' => 'Founder · Attorney at Law',
|
||||||
|
'founder_quote' => '“Justice is a daily practice, not merely a theoretical principle.”',
|
||||||
|
'founder_cta' => 'Read our story',
|
||||||
|
'art_services' => 'Article 02 — Services',
|
||||||
|
'services_lede' => 'Traditional legal practice, combined with research-driven insight.',
|
||||||
|
'art_vision' => 'Article 03 — Vision',
|
||||||
|
'vision_title' => 'Woven from the fabric of society',
|
||||||
|
'vision_text' => 'Libra investigates society\'s problems, documents them, uncovers their roots, and offers practical solutions to mend social pains — however small — through collaborative work and genuine field research.',
|
||||||
|
'alt_hoop' => 'Cross-stitch embroidery stretched on a wooden hoop',
|
||||||
|
'card_institution_label' => 'For our institution',
|
||||||
|
'card_institution_title' => 'Law, research and fieldwork',
|
||||||
|
'card_institution_text' => 'Capturing society\'s pulse and turning its challenges into knowledge and innovative legal solutions.',
|
||||||
|
'alt_olives' => 'Olives ripening on a branch',
|
||||||
|
'card_society_label' => 'For society',
|
||||||
|
'card_society_title' => 'A trusted partner to the judiciary',
|
||||||
|
'card_society_text' => 'Reconnecting society with its history and legal heritage.',
|
||||||
|
'alt_hills' => 'Hills and a winding road at sunset',
|
||||||
|
'card_diaspora_label' => 'For Palestinians in the diaspora',
|
||||||
|
'card_diaspora_title' => 'Back to the land and the family',
|
||||||
|
'card_diaspora_text' => 'Helping Palestinians abroad research their families, their history and their land.',
|
||||||
|
'art_values' => 'Article 04 — Values',
|
||||||
|
'art_articles' => 'Article 05 — Articles',
|
||||||
];
|
];
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 213 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 222 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 278 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 132 KiB |
@@ -124,6 +124,144 @@ body.site .foot span{display:block;padding:10px 0}
|
|||||||
|
|
||||||
body.site .site-balance{display:block;overflow:visible}
|
body.site .site-balance{display:block;overflow:visible}
|
||||||
|
|
||||||
|
/* ---------- Home page (24-4) ---------- */
|
||||||
|
body.site .hero{position:relative;padding:56px 0 96px;overflow:hidden}
|
||||||
|
body.site .hero .wrap{display:grid;grid-template-columns:1fr 1.08fr;gap:56px;align-items:center}
|
||||||
|
body.site .hero h1{font-size:clamp(2.6rem,4.6vw,4.1rem);line-height:1.12;margin:18px 0 22px;letter-spacing:0;word-spacing:.08em}
|
||||||
|
html[lang=en] body.site .hero h1{letter-spacing:-.02em}
|
||||||
|
body.site .hero h1 em{font-style:normal;color:var(--olive);text-decoration:underline dashed var(--gold) .07em;text-underline-offset:.28em;text-decoration-skip-ink:none}
|
||||||
|
body.site .lede{font-size:1.15rem;color:#3A4033;max-width:34em;margin:0 0 30px}
|
||||||
|
body.site .cta-row{display:flex;flex-wrap:wrap;gap:12px;align-items:center}
|
||||||
|
body.site .trust{display:flex;gap:26px;margin-top:40px;padding-top:24px;border-top:1px solid var(--line);flex-wrap:wrap}
|
||||||
|
body.site .trust div{font-size:.88rem;color:var(--muted);line-height:1.5}
|
||||||
|
body.site .trust strong{display:block;font-family:var(--display);font-size:1.5rem;color:var(--ink)}
|
||||||
|
|
||||||
|
body.site .frame{position:relative;aspect-ratio:4/4.6;border-radius:999px 999px 18px 18px;overflow:hidden;background:var(--forest);
|
||||||
|
box-shadow:0 2px 0 rgba(255,255,255,.6) inset, 0 40px 70px -30px rgba(30,34,25,.55), 0 0 0 10px rgba(244,241,234,1), 0 0 0 11px var(--line)}
|
||||||
|
body.site .frame img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;filter:saturate(.75) contrast(1.05);transform:scale(1.08);transition:transform .6s var(--ease)}
|
||||||
|
body.site .frame::before{content:"";position:absolute;inset:0;z-index:1;
|
||||||
|
background:linear-gradient(180deg,rgba(35,42,28,.35) 0%,rgba(35,42,28,.62) 45%,rgba(35,42,28,.9) 100%)}
|
||||||
|
body.site .frame .glow{position:absolute;z-index:1;width:420px;height:420px;border-radius:50%;pointer-events:none;
|
||||||
|
background:radial-gradient(circle,rgba(196,168,130,.28),transparent 65%);transform:translate(-50%,-50%);left:50%;top:45%;transition:opacity .4s}
|
||||||
|
body.site #scales{position:absolute;z-index:2;inset:10% 8% 12%;width:84%;height:78%;overflow:visible}
|
||||||
|
body.site .frame figcaption{position:absolute;z-index:3;inset-inline:0;bottom:18px;text-align:center;color:rgba(244,241,234,.78);font-family:var(--display);font-style:italic;font-size:1rem}
|
||||||
|
body.site .tag{position:absolute;z-index:4;inset-inline-end:-18px;top:16%;background:var(--cream);border-radius:14px;padding:14px 18px;box-shadow:var(--shadow-2);
|
||||||
|
display:flex;gap:12px;align-items:center;max-width:250px;font-size:.86rem;line-height:1.45}
|
||||||
|
body.site .tag .dot{width:10px;height:10px;border-radius:50%;background:var(--olive);box-shadow:0 0 0 5px rgba(74,93,35,.16);flex:none;animation:site-pulse 2.4s infinite}
|
||||||
|
@keyframes site-pulse{50%{box-shadow:0 0 0 9px rgba(74,93,35,.05)}}
|
||||||
|
body.site .hero-art{position:relative}
|
||||||
|
body.site .band{background:var(--forest);color:var(--cream);position:relative;
|
||||||
|
background-image:radial-gradient(1200px 300px at 50% -10%,rgba(196,168,130,.16),transparent 70%),
|
||||||
|
repeating-linear-gradient(0deg,rgba(255,255,255,.018) 0 1px,transparent 1px 3px)}
|
||||||
|
body.site .pillars{display:grid;grid-template-columns:repeat(3,1fr);gap:0}
|
||||||
|
body.site .pillar{padding:44px 34px;position:relative;transition:background .35s}
|
||||||
|
body.site .pillar+.pillar{border-inline-start:1px solid rgba(244,241,234,.12)}
|
||||||
|
body.site .pillar:hover{background:rgba(244,241,234,.04)}
|
||||||
|
body.site .pillar .k{font-family:var(--display);font-size:2.1rem;color:var(--cream);display:flex;align-items:center;gap:14px}
|
||||||
|
body.site .pillar .k svg{width:26px;height:26px;flex:none}
|
||||||
|
body.site .pillar p{margin:8px 0 0;color:var(--gold-lt);font-size:.98rem;max-width:22em}
|
||||||
|
body.site .founder{display:grid;grid-template-columns:.9fr 1.1fr;gap:72px;align-items:center}
|
||||||
|
body.site .portrait{position:relative;border-radius:18px;overflow:hidden;background:#E9E4D8;aspect-ratio:4/5;box-shadow:var(--shadow-2)}
|
||||||
|
body.site .portrait img{width:100%;height:100%;object-fit:cover;object-position:50% 20%;filter:grayscale(1) contrast(1.06) brightness(1.04);mix-blend-mode:multiply;transition:transform .8s var(--ease), filter .8s}
|
||||||
|
body.site .portrait:hover img{transform:scale(1.03);filter:grayscale(.65) contrast(1.06) brightness(1.04)}
|
||||||
|
body.site .portrait::after{content:"";position:absolute;inset:14px;border:1.5px dashed rgba(166,137,102,.7);border-radius:10px;pointer-events:none}
|
||||||
|
body.site .namecard{position:absolute;inset-inline-start:22px;bottom:22px;background:rgba(244,241,234,.92);backdrop-filter:blur(6px);padding:12px 18px;border-radius:12px;box-shadow:var(--shadow-1)}
|
||||||
|
body.site .namecard b{font-family:var(--display);font-size:1.3rem;display:block;line-height:1.2}
|
||||||
|
body.site .namecard span{font-size:.85rem;color:var(--muted)}
|
||||||
|
body.site blockquote{margin:22px 0 26px;font-family:var(--display);font-size:clamp(1.6rem,2.6vw,2.2rem);line-height:1.45;color:var(--forest);position:relative;padding-inline-start:28px;border-inline-start:3px solid var(--gold)}
|
||||||
|
body.site .founder p{color:#3A4033;margin:0 0 16px}
|
||||||
|
body.site .sign{display:flex;align-items:center;gap:16px;margin-top:26px}
|
||||||
|
body.site .docket{border-top:1px solid var(--line)}
|
||||||
|
body.site .row{display:grid;grid-template-columns:90px 1.1fr 1.4fr 56px;gap:24px;align-items:center;padding:30px 22px;border-bottom:1px solid var(--line);
|
||||||
|
position:relative;text-decoration:none;border-radius:14px;transition:background .35s var(--ease), color .35s, box-shadow .35s, transform .35s var(--ease)}
|
||||||
|
body.site .row .n{font-family:var(--display);font-size:2.4rem;color:var(--gold);line-height:1}
|
||||||
|
body.site .row h3{font-size:1.65rem}
|
||||||
|
body.site .chips{display:flex;flex-wrap:wrap;gap:8px}
|
||||||
|
body.site .chip{font-size:.85rem;padding:5px 12px;border-radius:999px;background:rgba(45,54,36,.06);color:#3A4033;transition:background .35s,color .35s}
|
||||||
|
body.site .go{width:48px;height:48px;border-radius:50%;display:grid;place-items:center;box-shadow:inset 0 0 0 1.5px var(--line);transition:all .35s var(--ease)}
|
||||||
|
html[dir=ltr] body.site .go svg{transform:scaleX(-1)}
|
||||||
|
body.site .row:hover{background:var(--forest);color:var(--cream);transform:translateY(-2px);box-shadow:0 24px 50px -24px rgba(30,34,25,.75);border-color:transparent}
|
||||||
|
body.site .row:hover h3{color:var(--cream)}
|
||||||
|
body.site .row:hover .chip{background:rgba(244,241,234,.1);color:var(--gold-lt)}
|
||||||
|
body.site .row:hover .go{background:var(--gold);box-shadow:0 0 0 6px rgba(166,137,102,.2);color:var(--ink)}
|
||||||
|
body.site .row::before{content:"";position:absolute;inset:8px;border-radius:10px;border:1.5px dashed rgba(196,168,130,0);transition:border-color .35s;pointer-events:none}
|
||||||
|
body.site .row:hover::before{border-color:rgba(196,168,130,.45)}
|
||||||
|
body.site .fabric{background:#ECE7DC}
|
||||||
|
body.site .fabric-grid{display:grid;grid-template-columns:1.15fr 1fr;gap:64px;align-items:center;margin-bottom:72px}
|
||||||
|
body.site .hoop{position:relative;border-radius:50%;aspect-ratio:1;overflow:hidden;box-shadow:0 0 0 14px #CDB792, 0 0 0 16px #8A7555, 0 40px 70px -30px rgba(30,34,25,.6);max-width:520px;margin-inline:auto}
|
||||||
|
body.site .hoop img{width:100%;height:100%;object-fit:cover;filter:hue-rotate(-140deg) saturate(.55) sepia(.25);transition:transform 1.2s var(--ease)}
|
||||||
|
body.site .hoop:hover img{transform:scale(1.06) rotate(-2deg)}
|
||||||
|
body.site .fabric h2{font-size:clamp(2rem,3.4vw,3.1rem);margin:14px 0 20px}
|
||||||
|
body.site .fabric .big{font-family:var(--display);font-size:1.35rem;line-height:1.7;color:var(--forest)}
|
||||||
|
body.site .three{display:grid;grid-template-columns:repeat(3,1fr);gap:22px}
|
||||||
|
body.site .card{background:#fff;border-radius:16px;overflow:hidden;box-shadow:var(--shadow-1);border:1px solid rgba(45,54,36,.08);
|
||||||
|
transition:transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;display:flex;flex-direction:column}
|
||||||
|
body.site .card:hover{transform:translateY(-6px);box-shadow:var(--shadow-2);border-color:rgba(166,137,102,.55)}
|
||||||
|
body.site .card .ph{height:190px;position:relative;overflow:hidden;background:var(--forest)}
|
||||||
|
body.site .card .ph img{width:100%;height:100%;object-fit:cover;transition:transform .8s var(--ease);filter:saturate(.8)}
|
||||||
|
body.site .card:hover .ph img{transform:scale(1.06)}
|
||||||
|
body.site .card .ph::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,transparent 40%,rgba(35,42,28,.55))}
|
||||||
|
body.site .card .ph .lbl{position:absolute;z-index:1;inset-inline-start:18px;bottom:14px;color:var(--cream);font-family:var(--display);font-style:italic}
|
||||||
|
body.site .card .bd{padding:24px 26px 28px}
|
||||||
|
body.site .card h3{font-size:1.4rem;margin-bottom:8px}
|
||||||
|
body.site .card p{margin:0;color:var(--muted);font-size:.96rem}
|
||||||
|
body.site .motif-ph{display:grid;place-items:center}
|
||||||
|
body.site .motif-ph svg{width:150px;height:150px;margin-top:-10px}
|
||||||
|
body.site .sampler{display:grid;grid-template-columns:repeat(6,1fr);gap:16px}
|
||||||
|
body.site .val{background:#fff;border-radius:16px;padding:28px 14px 22px;text-align:center;border:1px solid rgba(45,54,36,.08);box-shadow:var(--shadow-1);
|
||||||
|
transition:transform .35s var(--ease), box-shadow .35s, border-color .35s}
|
||||||
|
body.site .medal{width:76px;height:76px;margin:0 auto 16px;border-radius:50%;display:grid;place-items:center;
|
||||||
|
background:radial-gradient(circle at 35% 30%,#FFFDF8,#EDE5D3 70%);
|
||||||
|
box-shadow:inset 0 0 0 1.5px rgba(166,137,102,.75), inset 0 -6px 12px rgba(138,117,85,.14), 0 0 0 5px #fff, 0 0 0 6px rgba(166,137,102,.35), 0 10px 20px -10px rgba(30,34,25,.45);
|
||||||
|
transition:box-shadow .35s var(--ease), transform .5s var(--ease)}
|
||||||
|
body.site .medal svg{width:32px;height:32px;fill:none;stroke:var(--gold-ink);stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;transition:stroke .35s}
|
||||||
|
body.site .val:hover .medal{transform:rotate(-8deg) scale(1.05);box-shadow:inset 0 0 0 1.5px var(--gold), inset 0 -6px 12px rgba(138,117,85,.14), 0 0 0 5px #fff, 0 0 0 6px var(--gold), 0 0 26px 2px rgba(166,137,102,.45)}
|
||||||
|
body.site .val:hover .medal svg{stroke:var(--olive)}
|
||||||
|
body.site .gem{width:12px;height:12px;transform:rotate(45deg);flex:none;background:linear-gradient(135deg,#F1E2C2,#A68966 60%,#6E5A3F);box-shadow:0 0 0 3px rgba(196,168,130,.18), 0 0 14px rgba(196,168,130,.5)}
|
||||||
|
body.site .val b{font-family:var(--display);font-size:1.2rem;display:block}
|
||||||
|
body.site .val:hover{transform:translateY(-6px) rotate(-.6deg);box-shadow:var(--shadow-2);border-color:rgba(166,137,102,.55)}
|
||||||
|
body.site .posts{display:grid;grid-template-columns:repeat(3,1fr);gap:22px}
|
||||||
|
body.site .post{position:relative;border-radius:16px;overflow:hidden;background:#fff;border:1px solid rgba(45,54,36,.08);box-shadow:var(--shadow-1);text-decoration:none;display:flex;flex-direction:column;
|
||||||
|
transition:transform .35s var(--ease), box-shadow .35s, border-color .35s}
|
||||||
|
body.site .post:hover{transform:translateY(-6px);box-shadow:var(--shadow-2);border-color:rgba(166,137,102,.55)}
|
||||||
|
body.site .post .ph{aspect-ratio:16/10;overflow:hidden;background:var(--forest)}
|
||||||
|
body.site .post .ph img{width:100%;height:100%;object-fit:cover;transition:transform .8s var(--ease)}
|
||||||
|
body.site .post:hover .ph img{transform:scale(1.05)}
|
||||||
|
body.site .post .bd{padding:30px 28px 28px;display:flex;flex-direction:column;gap:12px;flex:1;border-top:3px solid var(--gold);min-height:270px;position:relative}
|
||||||
|
body.site .post .bd::before{content:"”";position:absolute;inset-inline-end:22px;top:4px;font:700 5rem/1 var(--display);color:rgba(166,137,102,.22)}
|
||||||
|
body.site .post:hover .bd{border-top-color:var(--olive)}
|
||||||
|
body.site .post .meta{font-size:.8rem;color:var(--gold-ink);font-weight:600}
|
||||||
|
body.site .post h3{font-size:1.35rem}
|
||||||
|
body.site .post p{margin:0;color:var(--muted);font-size:.95rem}
|
||||||
|
body.site .post .more{margin-top:auto;font-weight:600;font-size:.9rem;color:var(--olive)}
|
||||||
|
body.site .post.text .ph{display:none}
|
||||||
|
body.site .post.text{background:var(--forest);color:var(--cream)}
|
||||||
|
body.site .post.text h3{color:var(--cream)}
|
||||||
|
body.site .post.text p{color:var(--gold-lt)}
|
||||||
|
body.site .post.text .meta{color:var(--gold-lt)}
|
||||||
|
body.site .post.text .more{color:var(--gold-lt)}
|
||||||
|
|
||||||
|
@media (max-width:1100px){
|
||||||
|
body.site .hero .wrap,body.site .founder,body.site .fabric-grid{grid-template-columns:1fr}
|
||||||
|
body.site .hero-art{max-width:560px;margin-inline:auto;width:100%}
|
||||||
|
body.site .sampler{grid-template-columns:repeat(3,1fr)}
|
||||||
|
body.site .posts{grid-template-columns:1fr 1fr}
|
||||||
|
body.site .posts .post:last-child{grid-column:1/-1}
|
||||||
|
}
|
||||||
|
@media (max-width:760px){
|
||||||
|
body.site .hero{padding:36px 0 64px}
|
||||||
|
body.site .tag{inset-inline-end:8px;top:auto;bottom:-20px}
|
||||||
|
body.site .pillars,body.site .three,body.site .posts{grid-template-columns:1fr}
|
||||||
|
body.site .pillar+.pillar{border-inline-start:0;border-top:1px solid rgba(244,241,234,.12)}
|
||||||
|
body.site .pillar{padding:30px 6px}
|
||||||
|
body.site .row{grid-template-columns:52px 1fr;padding:22px 12px;gap:10px 16px}
|
||||||
|
body.site .row .chips{grid-column:1/-1}
|
||||||
|
body.site .row .go{display:none}
|
||||||
|
body.site .row .n{font-size:1.8rem}
|
||||||
|
body.site .sampler{grid-template-columns:repeat(2,1fr)}
|
||||||
|
body.site .trust{gap:18px}
|
||||||
|
}
|
||||||
|
|
||||||
/* ---------- Reveal (hidden only when JavaScript runs) ---------- */
|
/* ---------- Reveal (hidden only when JavaScript runs) ---------- */
|
||||||
body.site.js [data-reveal]{opacity:0;transform:translateY(28px);transition:opacity .9s var(--ease),transform .9s var(--ease)}
|
body.site.js [data-reveal]{opacity:0;transform:translateY(28px);transition:opacity .9s var(--ease),transform .9s var(--ease)}
|
||||||
body.site.js [data-reveal].in{opacity:1;transform:none}
|
body.site.js [data-reveal].in{opacity:1;transform:none}
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
@props(['post'])
|
||||||
|
|
||||||
|
<a class="post" href="{{ route('posts.show', $post) }}" wire:navigate data-reveal>
|
||||||
|
<div class="bd">
|
||||||
|
<span class="meta" dir="auto">{{ $post->published_at?->translatedFormat('j F Y') }}</span>
|
||||||
|
<h3>{{ $post->getTitle() }}</h3>
|
||||||
|
<p>{{ \Illuminate\Support\Str::limit(strip_tags($post->getBody()), 140) }}</p>
|
||||||
|
<span class="more">{{ __('home.read_more') }}</span>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
@props(['label', 'title', 'lede' => null])
|
||||||
|
|
||||||
|
<div class="sec-head">
|
||||||
|
<div>
|
||||||
|
<span class="art-no" data-reveal>{{ $label }}</span>
|
||||||
|
<h2 data-reveal data-d="1">{{ $title }}</h2>
|
||||||
|
</div>
|
||||||
|
@if ($lede)
|
||||||
|
<p data-reveal data-d="2">{{ $lede }}</p>
|
||||||
|
@else
|
||||||
|
{{ $slot }}
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
@@ -18,222 +18,157 @@ new #[Layout('components.layouts.public')] class extends Component
|
|||||||
}; ?>
|
}; ?>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<div class="wrap py-8">
|
{{-- Hero --}}
|
||||||
{{-- Hero Section --}}
|
<section class="hero" id="top">
|
||||||
<section class="bg-background py-8 sm:py-12 lg:py-16">
|
<div class="wrap">
|
||||||
<div class="container mx-auto px-4 text-center">
|
<div>
|
||||||
{{-- Tagline --}}
|
<span class="eyebrow" data-reveal>{{ __('site.hero_eyebrow') }}</span>
|
||||||
<h1 class="text-[1.75rem] sm:text-[2rem] lg:text-[2.5rem] font-bold text-text mb-2">
|
<h1 data-reveal data-d="1">{{ __('site.hero_title_a') }}<em>{{ __('site.hero_title_em') }}</em>{{ __('site.hero_title_b') }}</h1>
|
||||||
{{ __('home.tagline') }}
|
<p class="lede" data-reveal data-d="2">{{ __('home.intro') }}</p>
|
||||||
</h1>
|
<div class="cta-row" data-reveal data-d="3">
|
||||||
|
<a class="btn btn-gold" href="#book"><span>{{ __('home.cta_book') }}</span>
|
||||||
{{-- Introductory Text --}}
|
<svg class="arr" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M19 12H5M11 6l-6 6 6 6"/></svg></a>
|
||||||
<p class="text-text text-base sm:text-lg max-w-[800px] mx-auto mb-6">
|
<a class="btn btn-ghost" href="#services"><span>{{ __('home.cta_services') }}</span></a>
|
||||||
{{ __('home.intro') }}
|
</div>
|
||||||
</p>
|
<div class="trust" data-reveal data-d="4">
|
||||||
|
@foreach ([1, 2, 3] as $n)
|
||||||
{{-- CTA Buttons --}}
|
<div><strong>{{ __('site.trust_'.$n.'_title') }}</strong><span>{{ __('site.trust_'.$n.'_text') }}</span></div>
|
||||||
<div class="flex flex-col sm:flex-row gap-4 justify-center">
|
@endforeach
|
||||||
<a href="{{ route('booking') }}" class="btn-primary">
|
</div>
|
||||||
{{ __('home.cta_book') }}
|
</div>
|
||||||
</a>
|
<div class="hero-art" data-reveal data-d="2">
|
||||||
<a href="#services" class="btn-secondary">
|
<figure class="frame" style="margin:0">
|
||||||
{{ __('home.cta_services') }}
|
<img src="{{ asset('images/site/olive-tree.jpg') }}" alt="{{ __('site.alt_olive_tree') }}" width="800" height="1200">
|
||||||
</a>
|
<span class="glow"></span>
|
||||||
|
<x-site.balance mode="hero" :label="__('site.balance_label')" id="scales" />
|
||||||
|
<figcaption>{{ __('site.frame_caption') }}</figcaption>
|
||||||
|
</figure>
|
||||||
|
<div class="tag"><span class="dot"></span><span>{{ __('site.frame_tag') }}</span></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
{{-- About Section --}}
|
{{-- Pillars band --}}
|
||||||
<section id="about" class="py-16 lg:py-20 bg-card">
|
<section class="band on-dark" aria-label="{{ __('site.pillars_label') }}">
|
||||||
<div class="container mx-auto px-4">
|
<div class="wrap pillars">
|
||||||
<h2 class="text-2xl lg:text-3xl font-semibold text-text text-center mb-12">
|
@foreach (['justice', 'dignity', 'advocacy'] as $i => $pillar)
|
||||||
{{ __('home.about_title') }}
|
<div class="pillar" data-reveal @if ($i) data-d="{{ $i }}" @endif>
|
||||||
</h2>
|
<div class="k"><span class="gem"></span><span>{{ __('site.pillar_'.$pillar) }}</span></div>
|
||||||
|
<p>{{ __('site.pillar_'.$pillar.'_text') }}</p>
|
||||||
<div class="flex flex-col lg:flex-row items-center gap-8 lg:gap-12 max-w-5xl mx-auto">
|
|
||||||
{{-- Photo --}}
|
|
||||||
<div class="flex-shrink-0">
|
|
||||||
<img
|
|
||||||
src="{{ asset('images/huda-armouche.jpg') }}"
|
|
||||||
alt="{{ __('home.lawyer_name') }}"
|
|
||||||
class="w-48 h-48 lg:w-64 lg:h-64 rounded-full object-cover shadow-lg"
|
|
||||||
>
|
|
||||||
</div>
|
</div>
|
||||||
|
@endforeach
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
{{-- Bio --}}
|
{{-- Founder --}}
|
||||||
<div class="text-center lg:text-start">
|
<section class="sec" id="founder">
|
||||||
<h3 class="text-xl lg:text-2xl font-bold text-text mb-1">
|
<div class="wrap founder">
|
||||||
{{ __('home.lawyer_name') }}
|
<div class="portrait" data-reveal>
|
||||||
</h3>
|
<img src="{{ asset('images/huda-armouche.jpg') }}" alt="{{ __('home.lawyer_name') }}">
|
||||||
<p class="text-cta font-medium mb-4">
|
<div class="namecard"><b>{{ __('home.lawyer_name') }}</b><span>{{ __('site.founder_role') }}</span></div>
|
||||||
{{ __('home.lawyer_title') }}
|
</div>
|
||||||
</p>
|
<div>
|
||||||
<p class="text-body leading-relaxed">
|
<span class="art-no" data-reveal>{{ __('site.art_founder') }}</span>
|
||||||
{{ __('home.lawyer_bio') }}
|
<h2 style="font-size:clamp(2rem,3.4vw,3rem);margin-top:10px" data-reveal data-d="1">{{ __('home.about_title') }}</h2>
|
||||||
</p>
|
<blockquote data-reveal data-d="2">{{ __('site.founder_quote') }}</blockquote>
|
||||||
<p class="text-body leading-relaxed mt-4">
|
<p data-reveal data-d="3">{{ __('home.lawyer_bio') }}</p>
|
||||||
{{ __('home.lawyer_bio_2') }}
|
<p data-reveal data-d="4">{{ __('home.lawyer_bio_2') }}</p>
|
||||||
</p>
|
<div class="sign" data-reveal data-d="5"><a class="btn btn-ghost" href="{{ route('about') }}" wire:navigate><span>{{ __('site.founder_cta') }}</span></a></div>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
{{-- Services Section --}}
|
{{-- Services docket --}}
|
||||||
<section id="services" class="py-16 lg:py-20 bg-background">
|
<section class="sec" id="services" style="padding-top:40px">
|
||||||
<div class="container mx-auto px-4">
|
<div class="wrap">
|
||||||
<div class="text-center mb-12">
|
<x-site.section-head :label="__('site.art_services')" :title="__('home.services_subtitle')" :lede="__('site.services_lede')" />
|
||||||
<h2 class="text-2xl lg:text-3xl font-semibold text-text mb-4">
|
<div class="docket">
|
||||||
{{ __('home.services_title') }}
|
@foreach (['consultation', 'family', 'civil', 'business'] as $i => $service)
|
||||||
</h2>
|
<a class="row" href="#book" data-reveal @if ($i) data-d="{{ $i }}" @endif>
|
||||||
<p class="text-body max-w-2xl mx-auto">
|
<span class="n">{{ sprintf('%02d', $i + 1) }}</span>
|
||||||
{{ __('home.services_subtitle') }}
|
<h3>{{ __('home.service_'.$service.'_title') }}</h3>
|
||||||
</p>
|
<div class="chips">
|
||||||
</div>
|
@foreach (__('home.service_'.$service.'_items') as $item)
|
||||||
|
<span class="chip">{{ $item }}</span>
|
||||||
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6">
|
@endforeach
|
||||||
{{-- Legal Consultations & Representation --}}
|
|
||||||
<div class="bg-card p-6 rounded-lg shadow-card text-center">
|
|
||||||
<div class="text-cta mb-4">
|
|
||||||
<flux:icon name="scale" class="w-12 h-12 mx-auto" />
|
|
||||||
</div>
|
|
||||||
<h3 class="text-lg font-bold text-text mb-4">
|
|
||||||
{{ __('home.service_consultation_title') }}
|
|
||||||
</h3>
|
|
||||||
<ul class="text-sm text-body space-y-2 text-start">
|
|
||||||
@foreach(__('home.service_consultation_items') as $item)
|
|
||||||
<li class="flex items-center gap-2">
|
|
||||||
<span class="w-1.5 h-1.5 bg-cta rounded-full flex-shrink-0"></span>
|
|
||||||
{{ $item }}
|
|
||||||
</li>
|
|
||||||
@endforeach
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{{-- Women's & Family Law --}}
|
|
||||||
<div class="bg-card p-6 rounded-lg shadow-card text-center">
|
|
||||||
<div class="text-cta mb-4">
|
|
||||||
<flux:icon name="heart" class="w-12 h-12 mx-auto" />
|
|
||||||
</div>
|
|
||||||
<h3 class="text-lg font-bold text-text mb-4">
|
|
||||||
{{ __('home.service_family_title') }}
|
|
||||||
</h3>
|
|
||||||
<ul class="text-sm text-body space-y-2 text-start">
|
|
||||||
@foreach(__('home.service_family_items') as $item)
|
|
||||||
<li class="flex items-center gap-2">
|
|
||||||
<span class="w-1.5 h-1.5 bg-cta rounded-full flex-shrink-0"></span>
|
|
||||||
{{ $item }}
|
|
||||||
</li>
|
|
||||||
@endforeach
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{{-- Civil & Commercial Disputes --}}
|
|
||||||
<div class="bg-card p-6 rounded-lg shadow-card text-center">
|
|
||||||
<div class="text-cta mb-4">
|
|
||||||
<flux:icon name="building-office" class="w-12 h-12 mx-auto" />
|
|
||||||
</div>
|
|
||||||
<h3 class="text-lg font-bold text-text mb-4">
|
|
||||||
{{ __('home.service_civil_title') }}
|
|
||||||
</h3>
|
|
||||||
<ul class="text-sm text-body space-y-2 text-start">
|
|
||||||
@foreach(__('home.service_civil_items') as $item)
|
|
||||||
<li class="flex items-center gap-2">
|
|
||||||
<span class="w-1.5 h-1.5 bg-cta rounded-full flex-shrink-0"></span>
|
|
||||||
{{ $item }}
|
|
||||||
</li>
|
|
||||||
@endforeach
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{{-- Business Legal Services --}}
|
|
||||||
<div class="bg-card p-6 rounded-lg shadow-card text-center">
|
|
||||||
<div class="text-cta mb-4">
|
|
||||||
<flux:icon name="briefcase" class="w-12 h-12 mx-auto" />
|
|
||||||
</div>
|
|
||||||
<h3 class="text-lg font-bold text-text mb-4">
|
|
||||||
{{ __('home.service_business_title') }}
|
|
||||||
</h3>
|
|
||||||
<ul class="text-sm text-body space-y-2 text-start">
|
|
||||||
@foreach(__('home.service_business_items') as $item)
|
|
||||||
<li class="flex items-center gap-2">
|
|
||||||
<span class="w-1.5 h-1.5 bg-cta rounded-full flex-shrink-0"></span>
|
|
||||||
{{ $item }}
|
|
||||||
</li>
|
|
||||||
@endforeach
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
{{-- Values Section --}}
|
|
||||||
<section id="values" class="py-16 lg:py-20 bg-card">
|
|
||||||
<div class="container mx-auto px-4">
|
|
||||||
<div class="text-center mb-12">
|
|
||||||
<h2 class="text-2xl lg:text-3xl font-semibold text-text mb-4">
|
|
||||||
{{ __('home.values_title') }}
|
|
||||||
</h2>
|
|
||||||
<p class="text-body max-w-2xl mx-auto">
|
|
||||||
{{ __('home.values_subtitle') }}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-6">
|
|
||||||
@foreach(['integrity', 'justice', 'knowledge', 'empowerment', 'professionalism', 'innovation'] as $value)
|
|
||||||
<div class="text-center group">
|
|
||||||
<div class="w-16 h-16 lg:w-20 lg:h-20 rounded-full bg-cta/10 flex items-center justify-center mx-auto mb-3 transition-colors group-hover:bg-cta/20">
|
|
||||||
<flux:icon name="{{ __('home.values.' . $value . '.icon') }}" class="w-8 h-8 lg:w-10 lg:h-10 text-cta" />
|
|
||||||
</div>
|
</div>
|
||||||
<h3 class="text-sm lg:text-base font-bold text-text">
|
<span class="go"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M19 12H5M11 6l-6 6 6 6"/></svg></span>
|
||||||
{{ __('home.values.' . $value . '.title') }}
|
</a>
|
||||||
</h3>
|
@endforeach
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
{{-- Vision --}}
|
||||||
|
<section class="sec fabric" id="mission">
|
||||||
|
<div class="wrap">
|
||||||
|
<div class="fabric-grid">
|
||||||
|
<div data-reveal>
|
||||||
|
<span class="art-no">{{ __('site.art_vision') }}</span>
|
||||||
|
<h2>{{ __('site.vision_title') }}</h2>
|
||||||
|
<p class="big">{{ __('site.vision_text') }}</p>
|
||||||
|
</div>
|
||||||
|
<div class="hoop" data-reveal data-d="2"><img src="{{ asset('images/site/embroidery-hoop.jpg') }}" alt="{{ __('site.alt_hoop') }}" width="773" height="1000"></div>
|
||||||
|
</div>
|
||||||
|
<div class="three">
|
||||||
|
<article class="card" data-reveal>
|
||||||
|
<div class="ph motif-ph"><x-site.balance mode="static" :size="150" /><span class="lbl">{{ __('site.card_institution_label') }}</span></div>
|
||||||
|
<div class="bd"><h3>{{ __('site.card_institution_title') }}</h3><p>{{ __('site.card_institution_text') }}</p></div>
|
||||||
|
</article>
|
||||||
|
<article class="card" data-reveal data-d="1">
|
||||||
|
<div class="ph"><img src="{{ asset('images/site/olives.jpg') }}" alt="{{ __('site.alt_olives') }}" width="900" height="1350"><span class="lbl">{{ __('site.card_society_label') }}</span></div>
|
||||||
|
<div class="bd"><h3>{{ __('site.card_society_title') }}</h3><p>{{ __('site.card_society_text') }}</p></div>
|
||||||
|
</article>
|
||||||
|
<article class="card" data-reveal data-d="2">
|
||||||
|
<div class="ph"><img src="{{ asset('images/site/hills.jpg') }}" alt="{{ __('site.alt_hills') }}" width="900" height="1600"><span class="lbl">{{ __('site.card_diaspora_label') }}</span></div>
|
||||||
|
<div class="bd"><h3>{{ __('site.card_diaspora_title') }}</h3><p>{{ __('site.card_diaspora_text') }}</p></div>
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
{{-- Values --}}
|
||||||
|
@php
|
||||||
|
$valueIcons = [
|
||||||
|
'<path d="M12 3l7 3v6c0 4.5-3 7.6-7 9-4-1.4-7-4.5-7-9V6z"/><path d="M9 12l2 2 4-4"/>',
|
||||||
|
'<path d="M12 4v16M8 20h8M5 7h14"/><path d="M5 7l-3 6a3 3 0 0 0 6 0zM19 7l-3 6a3 3 0 0 0 6 0z"/>',
|
||||||
|
'<path d="M2 5h6a4 4 0 0 1 4 4v11a3 3 0 0 0-3-3H2zM22 5h-6a4 4 0 0 0-4 4v11a3 3 0 0 1 3-3h7z"/>',
|
||||||
|
'<path d="M12 20s-7-4.4-7-10a4 4 0 0 1 7-2.6A4 4 0 0 1 19 10c0 5.6-7 10-7 10z"/>',
|
||||||
|
'<rect x="3" y="7.5" width="18" height="12" rx="2"/><path d="M9 7.5V5h6v2.5M3 13h18"/>',
|
||||||
|
'<path d="M9 18h6M10 21h4M12 3a6 6 0 0 0-4 10.5c.8.8 1 1.5 1 2.5h6c0-1 .2-1.7 1-2.5A6 6 0 0 0 12 3z"/>',
|
||||||
|
];
|
||||||
|
@endphp
|
||||||
|
<section class="sec" id="values">
|
||||||
|
<div class="wrap">
|
||||||
|
<x-site.section-head :label="__('site.art_values')" :title="__('home.values_title')" :lede="__('home.values_subtitle')" />
|
||||||
|
<div class="sampler">
|
||||||
|
@foreach (['integrity', 'justice', 'knowledge', 'empowerment', 'professionalism', 'innovation'] as $i => $value)
|
||||||
|
<div class="val" data-reveal @if ($i) data-d="{{ $i }}" @endif>
|
||||||
|
<span class="medal"><svg viewBox="0 0 24 24" aria-hidden="true">{!! $valueIcons[$i] !!}</svg></span>
|
||||||
|
<b>{{ __('home.values.'.$value.'.title') }}</b>
|
||||||
</div>
|
</div>
|
||||||
@endforeach
|
@endforeach
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
{{-- Latest Posts Section --}}
|
{{-- Latest articles --}}
|
||||||
@if($latestPosts->count() > 0)
|
<section class="sec" id="posts" style="padding-top:20px">
|
||||||
<section id="posts" class="py-16 lg:py-20 bg-background">
|
<div class="wrap">
|
||||||
<div class="container mx-auto px-4">
|
<x-site.section-head :label="__('site.art_articles')" :title="__('home.posts_title')">
|
||||||
<div class="text-center mb-12">
|
<a class="btn btn-ghost" href="{{ route('posts.index') }}" wire:navigate data-reveal data-d="2"><span>{{ __('home.view_all_posts') }}</span></a>
|
||||||
<h2 class="text-2xl lg:text-3xl font-semibold text-text mb-4">
|
</x-site.section-head>
|
||||||
{{ __('home.posts_title') }}
|
@if ($latestPosts->isNotEmpty())
|
||||||
</h2>
|
<div class="posts">
|
||||||
</div>
|
@foreach ($latestPosts as $post)
|
||||||
|
<x-site.post-card :post="$post" />
|
||||||
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 mb-8">
|
|
||||||
@foreach($latestPosts as $post)
|
|
||||||
<article class="bg-card p-6 rounded-lg shadow-card hover:shadow-card-hover transition-shadow">
|
|
||||||
<time class="text-xs text-body/70 mb-2 block">
|
|
||||||
{{ $post->published_at?->translatedFormat('j F Y') ?? $post->created_at->translatedFormat('j F Y') }}
|
|
||||||
</time>
|
|
||||||
<h3 class="text-lg font-bold text-text mb-3">
|
|
||||||
<a href="{{ route('posts.show', $post) }}" class="hover:text-cta transition-colors" wire:navigate>
|
|
||||||
{{ $post->getTitle() }}
|
|
||||||
</a>
|
|
||||||
</h3>
|
|
||||||
<p class="text-body text-sm mb-4 line-clamp-3">
|
|
||||||
{{ $post->getExcerpt() }}
|
|
||||||
</p>
|
|
||||||
<a href="{{ route('posts.show', $post) }}" class="text-cta font-medium text-sm hover:text-cta-hover" wire:navigate>
|
|
||||||
{{ __('home.read_more') }} →
|
|
||||||
</a>
|
|
||||||
</article>
|
|
||||||
@endforeach
|
@endforeach
|
||||||
</div>
|
</div>
|
||||||
|
@else
|
||||||
|
<p class="text-center" style="color:var(--muted)">{{ __('home.posts_empty') }}</p>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
<div class="text-center">
|
{{-- booking card: task 24-5 --}}
|
||||||
<a href="{{ route('posts.index') }}" class="btn-secondary inline-flex items-center gap-2" wire:navigate>
|
|
||||||
{{ __('home.view_all_posts') }}
|
|
||||||
<span aria-hidden="true">→</span>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
@endif
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -0,0 +1,96 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use App\Models\Post;
|
||||||
|
|
||||||
|
function homeHtml(string $locale): string
|
||||||
|
{
|
||||||
|
return test()->withSession(['locale' => $locale])->get('/')->assertOk()->getContent();
|
||||||
|
}
|
||||||
|
|
||||||
|
test('home renders the seven sections in order in both languages', function () {
|
||||||
|
foreach (['ar', 'en'] as $locale) {
|
||||||
|
$html = homeHtml($locale);
|
||||||
|
|
||||||
|
$positions = array_map(fn ($id) => strpos($html, 'id="'.$id.'"'), ['top', 'founder', 'services', 'mission', 'values', 'posts']);
|
||||||
|
$bandPos = strpos($html, 'class="band on-dark"');
|
||||||
|
|
||||||
|
foreach ($positions as $p) {
|
||||||
|
expect($p)->not->toBeFalse();
|
||||||
|
}
|
||||||
|
$sorted = $positions;
|
||||||
|
sort($sorted);
|
||||||
|
expect($positions)->toBe($sorted);
|
||||||
|
expect($bandPos)->toBeGreaterThan($positions[0])->toBeLessThan($positions[1]);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
test('home copy comes from the site and home keys', function () {
|
||||||
|
$ar = homeHtml('ar');
|
||||||
|
expect($ar)->toContain(__('site.hero_title_em', [], 'ar'))->toContain(__('site.vision_title', [], 'ar'))
|
||||||
|
->toContain(__('home.services_subtitle', [], 'ar'));
|
||||||
|
|
||||||
|
$en = homeHtml('en');
|
||||||
|
expect($en)->toContain('daily practice')->toContain('Woven from the fabric of society')->toContain('Article 04');
|
||||||
|
});
|
||||||
|
|
||||||
|
test('home has one h1 and every image has alt text', function () {
|
||||||
|
foreach (['ar', 'en'] as $locale) {
|
||||||
|
$html = homeHtml($locale);
|
||||||
|
expect(substr_count($html, '<h1'))->toBe(1);
|
||||||
|
|
||||||
|
preg_match_all('/<img\b[^>]*>/', $html, $m);
|
||||||
|
foreach ($m[0] as $img) {
|
||||||
|
expect($img)->toMatch('/\balt="[^"]+"/');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
test('site photographs exist as jpegs', function () {
|
||||||
|
foreach (['olive-tree', 'embroidery-hoop', 'olives', 'hills'] as $name) {
|
||||||
|
$path = public_path("images/site/$name.jpg");
|
||||||
|
expect(file_exists($path))->toBeTrue();
|
||||||
|
expect(bin2hex(substr(file_get_contents($path), 0, 3)))->toBe('ffd8ff');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
test('hero holds the balance and the booking placeholder anchors exist as links', function () {
|
||||||
|
$html = homeHtml('ar');
|
||||||
|
|
||||||
|
expect($html)->toContain('data-balance="hero"')->toContain('class="frame"')->toContain('data-balance="static"');
|
||||||
|
expect(substr_count($html, 'class="row"'))->toBe(4);
|
||||||
|
expect(substr_count($html, 'href="#book"'))->toBeGreaterThanOrEqual(5);
|
||||||
|
expect($html)->toContain(__('home.service_consultation_items', [], 'ar')[0]);
|
||||||
|
});
|
||||||
|
|
||||||
|
test('latest posts render as text-only cards, or the empty message', function () {
|
||||||
|
$empty = homeHtml('en');
|
||||||
|
expect($empty)->toContain(__('home.posts_empty', [], 'en'))->not->toContain('class="posts"');
|
||||||
|
|
||||||
|
$posts = Post::factory()->published()->count(3)->create();
|
||||||
|
$html = homeHtml('en');
|
||||||
|
|
||||||
|
expect($html)->toContain('class="posts"');
|
||||||
|
expect(substr_count($html, 'class="post"'))->toBe(3);
|
||||||
|
expect($html)->toContain(route('posts.show', $posts->first()))->toContain(__('home.read_more', [], 'en'));
|
||||||
|
|
||||||
|
preg_match('~<div class="posts">(.*?)</section>~s', $html, $block);
|
||||||
|
expect($block[1])->not->toContain('<img');
|
||||||
|
});
|
||||||
|
|
||||||
|
test('home has no Unsplash credit', function () {
|
||||||
|
expect(homeHtml('ar'))->not->toContain('Unsplash');
|
||||||
|
});
|
||||||
|
|
||||||
|
test('site lang keys exist in both languages for the home page', function () {
|
||||||
|
$keys = ['hero_eyebrow', 'hero_title_a', 'hero_title_em', 'hero_title_b', 'trust_1_title', 'trust_3_text', 'alt_olive_tree', 'balance_label',
|
||||||
|
'frame_caption', 'frame_tag', 'pillars_label', 'pillar_advocacy_text', 'art_founder', 'founder_role', 'founder_quote', 'founder_cta',
|
||||||
|
'art_services', 'services_lede', 'art_vision', 'vision_title', 'vision_text', 'alt_hoop', 'card_institution_label', 'card_diaspora_text',
|
||||||
|
'alt_olives', 'alt_hills', 'art_values', 'art_articles'];
|
||||||
|
foreach (['ar', 'en'] as $locale) {
|
||||||
|
$table = require base_path("lang/$locale/site.php");
|
||||||
|
foreach ($keys as $k) {
|
||||||
|
expect($table)->toHaveKey($k);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
expect(require base_path('lang/en/site.php'))->toHaveKey('hero_title_a', 'Justice is a ');
|
||||||
|
});
|
||||||
Reference in New Issue
Block a user