@php $settings = \App\Models\Setting::getStoreSettings(); $favicon = ($settings->store_logo && Storage::disk('public')->exists($settings->store_logo)) ? Storage::url($settings->store_logo) : asset('adklogo1.png'); @endphp @php $webPushEnabled = auth()->check() && auth()->user()->role === 'admin' && ($settings->enable_admin_notifications ?? true) && ($settings->enable_admin_push ?? true) && \App\Support\WebPushSupport::isAvailable(); @endphp @vite(['resources/css/app.css', 'resources/js/app.js']) @yield('scripts') @php $settings = \App\Models\Setting::getStoreSettings(); $themeColor = $settings->theme_color ?? '#f97316'; // Orange default $secondaryColor = $settings->secondary_color ?? '#a855f7'; // Purple default // Function to adjust brightness if (!function_exists('adjustBrightness')) { function adjustBrightness($hex, $steps) { $steps = max(-255, min(255, $steps)); $hex = str_replace('#', '', $hex); if (strlen($hex) == 3) { $hex = str_repeat(substr($hex, 0, 1), 2) . str_repeat(substr($hex, 1, 1), 2) . str_repeat(substr($hex, 2, 1), 2); } $r = hexdec(substr($hex, 0, 2)); $g = hexdec(substr($hex, 2, 2)); $b = hexdec(substr($hex, 4, 2)); $r = max(0, min(255, $r + $steps)); $g = max(0, min(255, $g + $steps)); $b = max(0, min(255, $b + $steps)); return '#' . str_pad(dechex($r), 2, '0', STR_PAD_LEFT) . str_pad(dechex($g), 2, '0', STR_PAD_LEFT) . str_pad(dechex($b), 2, '0', STR_PAD_LEFT); } } @endphp
@include('layouts.sidebar')
@include('layouts.header')
@isset($slot) {{ $slot }} @else @yield('content') @endif
@stack('scripts')