@php $siteName = $generalSettings['site_name'] ?? config('app.name', 'OpenClassify'); $siteDescription = $generalSettings['site_description'] ?? 'The marketplace for buying and selling everything.'; $siteLogoUrl = $generalSettings['site_logo_url'] ?? null; $linkedinUrl = $generalSettings['linkedin_url'] ?? null; $instagramUrl = $generalSettings['instagram_url'] ?? null; $whatsappNumber = $generalSettings['whatsapp'] ?? null; $whatsappDigits = preg_replace('/\D+/', '', (string) $whatsappNumber); $whatsappUrl = $whatsappDigits !== '' ? 'https://wa.me/' . $whatsappDigits : null; $loginRoute = route('login'); $registerRoute = route('register'); $logoutRoute = route('logout'); $panelCreateRoute = auth()->check() ? route('panel.listings.create') : $loginRoute; $panelListingsRoute = auth()->check() ? route('panel.listings.index') : $loginRoute; $inboxRoute = auth()->check() ? route('panel.inbox.index') : $loginRoute; $favoritesRoute = auth()->check() ? route('favorites.index') : $loginRoute; $demoEnabled = (bool) config('demo.enabled'); $hasDemoSession = (bool) session('is_demo_session') || filled(session('demo_uuid')); $demoLandingMode = $demoEnabled && request()->routeIs('home') && !auth()->check() && !$hasDemoSession; $demoExpiresAt = session('demo_expires_at'); $demoExpiresAt = filled($demoExpiresAt) ? \Illuminate\Support\Carbon::parse($demoExpiresAt) : null; $demoRemainingLabel = null; if ($demoExpiresAt?->isFuture()) { $remainingMinutes = now()->diffInMinutes($demoExpiresAt, false); $remainingHours = intdiv($remainingMinutes, 60); $remainingRemainderMinutes = $remainingMinutes % 60; $remainingParts = []; if ($remainingHours > 0) { $remainingParts[] = $remainingHours.' '.\Illuminate\Support\Str::plural('hour', $remainingHours); } if ($remainingRemainderMinutes > 0) { $remainingParts[] = $remainingRemainderMinutes.' '.\Illuminate\Support\Str::plural('minute', $remainingRemainderMinutes); } $demoRemainingLabel = $remainingParts !== [] ? implode(' ', $remainingParts) : 'less than a minute'; } $availableLocales = config('app.available_locales', ['en']); $localeLabels = [ 'en' => 'English', 'tr' => 'Türkçe', 'ar' => 'العربية', 'zh' => '中文', 'es' => 'Español', 'fr' => 'Français', 'de' => 'Deutsch', 'pt' => 'Português', 'ru' => 'Русский', 'ja' => '日本語', ]; $headerCategories = collect($headerNavCategories ?? [])->values(); $menuBrowseLinks = collect([ ['label' => 'Home', 'url' => route('home')], ['label' => 'All Listings', 'url' => route('listings.index')], ['label' => 'Categories', 'url' => route('categories.index')], ]); $locationCountries = collect($headerLocationCountries ?? [])->values(); $defaultCountryIso2 = strtoupper((string) config('app.default_country_iso2', 'TR')); $citiesRouteTemplate = \Illuminate\Support\Facades\Route::has('locations.cities') ? route('locations.cities', ['country' => '__COUNTRY__'], false) : ''; @endphp {{ $siteName }} @hasSection('title') - @yield('title') @endif @vite(['resources/css/app.css', 'resources/js/app.js']) @livewireStyles $demoLandingMode, ])> @unless($demoLandingMode) @endunless @if(!$demoLandingMode && $demoRemainingLabel)
Demo auto deletes in {{ $demoRemainingLabel }}
@endif @unless($demoLandingMode) @if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif @endunless
$demoLandingMode, ])>@yield('content')
@unless($demoLandingMode) @endunless @livewireScripts