@php $seo = app(\App\Services\Seo::class); $ads = app(\App\Services\AdManager::class); $color = fn ($key) => preg_match('/^#[0-9a-fA-F]{3,8}$/', (string) $site->brand($key)) ? $site->brand($key) : \App\Models\Site::DEFAULT_BRANDING[$key]; $bodyFont = \App\Support\Fonts::stack($site->brand('font')); // Heading font: the theme's own unless the site sets one. $headingFont = \App\Support\Fonts::exists($site->brand('heading_font')) ? \App\Support\Fonts::stack($site->brand('heading_font')) : null; $fontScale = ['sm' => '93.75%', 'md' => '100%', 'lg' => '106.25%'][$site->brand('font_scale')] ?? '100%'; // Content sections render before the layout, so fonts chosen in blocks are already registered. $fontCss = \App\Support\Fonts::stylesheet(); // Custom code of the site (Paramètres → Code personnalisé), trusted: only site managers can edit it. $customCode = $site->setting('code.enabled', true) ? (array) $site->setting('code', []) : []; $ga4 = $site->seoSetting('ga4_id'); $ga4 = $ga4 && preg_match('/^G-[A-Z0-9]+$/', $ga4) ? $ga4 : null; @endphp {{ $seo->title ?? $site->name }} @if ($seo->description)@endif @if ($seo->canonical)@endif @if ($seo->description)@endif @if ($seo->canonical)@endif @if ($seo->image)@else@endif @if (count($seo->alternates) > 1) @foreach ($seo->alternates as $code => $href) @endforeach @endif @if ($code = $site->seoSetting('gsc_verification'))@endif @if ($site->hasModule('rss') && $site->hasModule('blog'))@endif @if ($favicon = $site->brand('favicon_path'))@endif @if ($fontCss) @endif {{-- Google Consent Mode v2: everything denied until the CMP records a choice. --}} {{ $ads->head() }} @if ($ga4 && app()->isProduction() && $site->isPublic()) @endif @if (in_array($site->theme, ['files', 'cinema'], true)) {{-- Remembered colour scheme, applied before rendering (no flash). --}} @endif {{-- Interface strings for tools and games (resources/js/i18n.js). --}} @vite(['resources/css/site.css', 'resources/js/site.js']) @foreach ($seo->jsonLd() as $schema) @endforeach @if (filled($customCode['css'] ?? null)) @endif @if (filled($customCode['head'] ?? null)) {!! $customCode['head'] !!} @endif @if (filled($customCode['body_start'] ?? null)) {!! $customCode['body_start'] !!} @endif {{ __('site.skip_to_content') }} @include($site->themeView('partials.header')) @if ($site->hasModule('shop')) @endif @if (! $site->isPublic())
{{ __('site.dev_banner') }}
@endif @if (count($seo->alternates) > 1) {{-- Shown by site.js only when the visitor prefers another available language. --}} @endif @if ($seo->machineTranslated)
{{ __('site.machine_translation') }}
@endif {{-- Not on home pages: the hero / scoreboard must be the first thing visitors see. --}} @unless (request()->getPathInfo() === lpath('/'))
{{ $ads->slot('header') }}
@endunless
@yield('content')
@stack('credits')
{{ $ads->slot('before_footer') }}
@include($site->themeView('partials.footer')) @if (filled($customCode['footer'] ?? null)) {!! $customCode['footer'] !!} @endif