• Mahmoud Aglan's avatar
    fix(website): make the v3 block builder actually render, and add the capabilities it was missing · 0c9d0eec
    Mahmoud Aglan authored
    The page + block builder shipped in 39f468a9 could not render a single page.
    Two independent faults, both fatal:
    
    1. `website/page.blade.php` passes no `$sections`, but `layout.blade.php`
       includes `navbar.blade.php` and `footer.blade.php`, which both dereference
       it. Every builder page died with "Undefined variable $sections" before the
       first block was rendered. `$sections` belongs to the legacy section site;
       both dispatchers now default it and prefer the authored menu tree, so one
       navbar and one footer serve both worlds and existing tenants keep the
       navigation they have.
    
    2. The `ec-*` class layer every block partial styles itself through
       (ec-heading, ec-muted, ec-surface, ec-btn, ec-eyebrow, ec-prose, ec-marquee,
       ec-block) was used in 25+ views and defined in no stylesheet. Even past the
       crash, a rendered page had no colours, no cards, no buttons. The layer is
       now written against the --site-* variables the layout already emits, so a
       theme change repaints the whole site.
    
    Alongside the fix, the capabilities a data-driven marketing site needs:
    
    - Per-language URLs. `/en/...` and `/ar/...` address the same page, SetLocale
      reads the prefix ahead of the session, and the layout emits lang, dir,
      canonical and hreflang alternates from the active locale instead of a
      hardcoded rtl. A shared link now opens in the language it names. `en` and
      `ar` are reserved slugs so a page cannot hide behind a locale prefix.
    - One section-header contract: eyebrow, heading, accent rule, subtitle, shared
      by 21 block types through `_header`, with `{braced}` fragments of a heading
      rendered in the accent colour.
    - New variants: glass navbar, `overlay_split` profile card, `focus_carousel`
      logo strip, `season_cards` branches. Ambient motion (float/glow/pulse/
      shimmer) exposed in the motion panel; showcase motion on the hero image.
    - A footer "powered by" accent band, and footer columns driven by a menu so
      they cannot drift from the navbar.
    - Branches gain photo_path and a season window; the block dims a branch that
      is out of season. A branch with no window is open all year, so nothing
      changes for existing data.
    
    Also fixed while in here: `getBranches()` bypasses Eloquent and never checked
    `deleted_at`, so a branch deleted in the ERP kept appearing on the public site.
    
    Verified on a local Postgres replica: all 136 block/variant combinations render
    with no logged failures, the locale routes answer 200 and reserved paths still
    404, migrations apply and roll back cleanly on both an existing tenant and a
    from-scratch install + seed, and the suite passes (140 tests, 483 assertions).
    Co-Authored-By: 's avatarClaude Opus 5 (1M context) <noreply@anthropic.com>
    0c9d0eec
Name
Last commit
Last update
..
Branch.php Loading commit data...
BranchSetting.php Loading commit data...
Guardian.php Loading commit data...
LoginHistory.php Loading commit data...
Permission.php Loading commit data...
Person.php Loading commit data...
PortalInvitation.php Loading commit data...
Role.php Loading commit data...