@php $locale = app()->getLocale(); $direction = \App\Support\Locales::meta($locale)['dir']; @endphp {{-- Runs before first paint. "motion-ok" switches the scroll effects on; without JS, or when the visitor prefers reduced motion, the page stays static and fully visible (docs/ANIMATIONS.md §2). Safety net: effects hide some content until the application reveals it. If the application has not started after a few seconds (script blocked, network failure) the class is taken back, so nothing stays hidden waiting for a reveal that will never come. The layout marks the start with data-site-ready (site/layouts/site-layout.tsx). --}} {{-- Matches --color-ink in resources/css/site.css: no white flash before the stylesheet loads. --}} {{-- The brand mark (public/assets/brand): 16, 32 and 48 px in the .ico; 180 px for iOS. --}} @fonts(['bricolage-grotesque', 'onest']) {{-- A server-rendered page needs no JavaScript for its first paint: its scripts are added after the first frame is on screen, so they neither share the connection with the stylesheet, the fonts and the logo nor run before anything is drawn. Without SSR markup the page is drawn by JavaScript and the scripts stay right here (App\Support\DeferredScripts, docs/PERFORMANCE.md §2). --}} @if (\App\Support\DeferredScripts::applies()) @vite(['resources/css/site.css']) {{ \App\Support\DeferredScripts::render(['resources/js/site.tsx', "resources/js/pages/{$page['component']}.tsx"]) }} @else @viteReactRefresh @vite(['resources/css/site.css', 'resources/js/site.tsx', "resources/js/pages/{$page['component']}.tsx"]) @endif {{-- SEO head (title, meta, canonical, hreflang, Open Graph, JSON-LD). With SSR it comes from the server render; without it the very same strings are printed here, so the head is complete either way (App\Seo\HeadBuilder, docs/SEO.md §4). --}} @foreach ($page['props']['head'] ?? [] as $element) {!! $element !!} @endforeach