@php $rf_rotation_month = strtolower(date('F')); $rf_rotation_prefix = "device_rotation_warnings/{$rf_rotation_month}"; $rf_rotation_files = collect(\Illuminate\Support\Facades\Storage::disk('public')->files($rf_rotation_prefix)) ->filter(fn($f) => preg_match('/\.(webp|png|jpg|jpeg|gif)$/i', $f)) ->values() ->all(); $rf_rotation_urls = array_map(fn($f) => '/storage/' . $f, $rf_rotation_files); $rf_rotation_image = count($rf_rotation_urls) > 0 ? $rf_rotation_urls[array_rand($rf_rotation_urls)] : null; @endphp {{ config('app.name', 'Laravel') }} @routes @viteReactRefresh @vite(['resources/js/app.tsx']) @inertiaHead {{-- Admin CSS Override (platform-wide) --}} @php // Read the first available styling override (platform-wide) try { $rf_css_override = \App\Models\AdminSettings::query()->orderBy('id')->value('styling'); } catch (\Throwable $e) { $rf_css_override = null; } @endphp @if (!empty($rf_css_override)) @endif {{-- Server-rendered rotation overlay: visible immediately on portrait touch devices --}} @if ($rf_rotation_image) @endif {{-- Server-rendered rotation overlay: shows before React hydrates --}} @inertia