@php $currentUser = auth()->user() ?: (auth('staff')->user() ?: auth('student')->user()); $isGuestPage = !$currentUser || request()->routeIs('login') || request()->routeIs('staff.login') || request()->routeIs('student.login') || request()->is('/') || request()->routeIs('demo'); $collegeName = \App\Models\Setting::get('college_name', 'College Portal'); $collegeLogo = \App\Models\Setting::get('college_logo'); $themePrimary = \App\Models\Setting::get('theme_primary_color', '#4f46e5'); $themeSecondary = \App\Models\Setting::get('theme_secondary_color', '#ec4899'); $themePreset = \App\Models\Setting::get('theme_preset', 'modern'); @endphp {{ $collegeName ?? config('app.name', 'College Portal') }} @vite(['resources/css/app.css','resources/js/app.js']) @php // Card Colors (for stat cards) $cardBlue = \App\Models\Setting::get('card_blue', '#3b82f6'); $cardGreen = \App\Models\Setting::get('card_green', '#10b981'); $cardOrange = \App\Models\Setting::get('card_orange', '#f97316'); $cardPink = \App\Models\Setting::get('card_pink', '#ec4899'); // Font Settings $fontFamily = \App\Models\Setting::get('font_family', 'Plus Jakarta Sans'); $headingWeight = \App\Models\Setting::get('heading_weight', '800'); $fontSize = \App\Models\Setting::get('font_size', '16'); $lineHeight = \App\Models\Setting::get('line_height', '1.6'); // Helper to lighten hex color (very simple implementation) function lightenColor($hex, $percent) { $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 = min(255, $r + (255 - $r) * ($percent / 100)); $g = min(255, $g + (255 - $g) * ($percent / 100)); $b = min(255, $b + (255 - $b) * ($percent / 100)); return sprintf("#%02x%02x%02x", $r, $g, $b); } $themePrimaryLight = lightenColor($themePrimary, 90); $themeSecondaryLight = lightenColor($themeSecondary, 90); $cardBlueLight = lightenColor($cardBlue, 90); $cardGreenLight = lightenColor($cardGreen, 90); $cardOrangeLight = lightenColor($cardOrange, 90); $cardPinkLight = lightenColor($cardPink, 90); @endphp {{-- Dynamic Font Loading --}} @if($fontFamily && $fontFamily !== 'Plus Jakarta Sans') @php $fontFamilyForUrl = str_replace(' ', '+', $fontFamily); @endphp @endif @if(!$isGuestPage)
@if($collegeLogo)
Logo
@else
school
@endif
@if($currentUser)
@endif
{{ strtoupper(substr($currentUser->name ?? 'G',0,1)) }}
@endif
@if(!$isGuestPage) @endif
@yield('content')