@php
$metaTitle = trim($__env->yieldContent('title')) ?: ___('frontend.default_meta_title');
$metaDesc = trim($__env->yieldContent('meta')) ?: ___('frontend.default_meta_description');
$ogImage = trim($__env->yieldContent('og_image')) ?: asset('backend/assets/img/logo/travelio-logo.png');
$canonical = trim($__env->yieldContent('canonical')) ?: url()->current();
$metaTitle = trim($__env->yieldContent('title')) ?: (settings('seo_meta_title') ?: $metaTitle);
$metaDesc = trim($__env->yieldContent('meta')) ?: (settings('seo_meta_description') ?: $metaDesc);
$ogImage = trim($__env->yieldContent('og_image')) ?: (settings('og_image') ? logo(settings('og_image')) : $ogImage);
$metaKeywords = settings('seo_meta_keywords');
$googleAnalyticsId = trim((string) settings('google_analytics_id'));
@endphp
@php
$look = \App\Support\Appearance::frontend();
$siteTemplate = \App\Support\SiteTemplate::active();
$forcedMode = \App\Support\SiteTemplate::forcedMode($siteTemplate);
@endphp
{{-- Preload the faces every page paints above the fold with (Settings →
Appearance), so the browser fetches them before it parses fonts.css --}}
@foreach(array_unique([\Illuminate\Support\Str::slug($look['font']) . '-400', \Illuminate\Support\Str::slug($look['heading_font']) . '-700']) as $face)
@if(is_file(public_path('fonts/files/' . $face . '-latin.woff2')))
@endif
@endforeach
{{-- Primary SEO --}}
{{ $metaTitle }}
@if($metaKeywords)
@endif
{{-- Open Graph --}}
{{-- Twitter Card --}}
{{-- Favicon — from backend settings, falls back to the bundled svg --}}
@if($googleAnalyticsId)
@endif
@php $siteFavicon = settings('favicon') ? favicon(settings('favicon')) : asset('backend/assets/img/logo/travelio-favicon.png'); @endphp
{{-- Fonts (self-hosted in public/fonts, no external requests) --}}
{{-- Vendor CSS --}}
{{-- Searchable selects (From/To, country, nationality…). A newer version
than the admin panel's bundled copy — the Bootstrap 5 theme needs
4.0.13+ to render correctly, so this pair lives in select2-4.1/
rather than reusing backend/libs/select2. --}}
{{-- Travelio design system --}}
{{-- Settings → Appearance: the website template's own stylesheet --}}
@if($templateCss = \App\Support\SiteTemplate::stylesheet($siteTemplate))
@endif
{{-- Settings → Appearance: colours, fonts, text size and corners --}}
@if(\App\Support\Appearance::switcherEnabled())
@include('partials.style-switcher-head', ['panel' => 'frontend'])
@endif
@stack('styles')
{{-- Organization schema — every value comes from Settings, nothing hardcoded --}}
@php
$schema = array_filter([
'@context' => 'https://schema.org',
'@type' => 'TravelAgency',
'name' => settings('name') ?: config('app.name'),
'url' => url('/'),
'logo' => settings('light_theme_logo') ? logo(settings('light_theme_logo')) : asset('backend/assets/img/logo/travelio-logo.png'),
'description' => $metaDesc,
'address' => settings('address') ? ['@type' => 'PostalAddress', 'streetAddress' => settings('address')] : null,
'telephone' => settings('phone') ?: null,
'email' => settings('email') ?: null,
'sameAs' => \App\Models\SocialLink::active()->ordered()->pluck('url')->values()->all() ?: null,
]);
@endphp
@stack('schema')
@include('frontend.partials.header')
@yield('content')
@include('frontend.partials.footer')
{{-- Floating actions. The WhatsApp and Messenger bubbles only appear once
a number / page is configured in Settings → General; live chat once
it is switched on in Settings → Live chat. --}}
@php
$waNumber = preg_replace('/\D/', '', (string) (settings('whatsapp') ?: settings('phone')));
$messengerUrl = messenger_url();
@endphp
@if($waNumber)
@endif
@if($messengerUrl)
@endif
@include('frontend.partials.live-chat')
{{-- Vendor JS --}}
{{-- Travelio scripts --}}
@stack('scripts')
@if(\App\Support\Appearance::switcherEnabled())
@include('partials.style-switcher', ['panel' => 'frontend'])
@endif
@include('partials.template-preview-bar')