@php $branding = $ws->branding(); $nav = $ws->navigation(); // Determine the current page path relative to this school's site root // so stored navigation items can be highlighted as active. $slug = request()->route('schoolSlug'); $path = request()->path(); if ($path === 'school/' . $slug || $path === '' || $path === '/') { $current = 'home'; } else { $current = preg_replace('#^school/' . preg_quote((string) $slug, '#') . '/?#', '', $path); } // Resolve a stored navigation entry to a safe URL: // empty -> home; absolute -> as-is; known named route -> route(); otherwise path within this site. $navHref = function ($item) use ($websiteSchool) { $url = trim((string) ($item['url'] ?? '')); if ($url === '') { return tenant_url('public.home', $websiteSchool->slug); } if (preg_match('#^https?://#i', $url)) { return $url; } $name = 'public.' . str_replace('/', '-', $url); return \Illuminate\Support\Facades\Route::has($name) ? tenant_url($name, $websiteSchool->slug) : url($websiteSchool->slug . '/' . ltrim($url, '/')); }; $isActive = function ($item) use ($current) { $url = trim((string) ($item['url'] ?? '')); return ($url === '' ? 'home' : trim($url, '/')) === $current; }; // Every login entry points straight at THIS school's own login page — never a platform-wide picker. $loginLinks = [ ['label' => 'Admin Login', 'url' => route('school.login', $websiteSchool->id), 'desc' => 'School administrators'], ['label' => 'Staff Login', 'url' => route('school.login.staff', $websiteSchool->id), 'desc' => 'Teachers & staff'], ['label' => 'Teacher Portal', 'url' => route('portal.login', [$websiteSchool->id, 'teacher']), 'desc' => 'Dedicated teacher workspace'], ['label' => 'Parent Login', 'url' => route('portal.login', [$websiteSchool->id, 'parent']), 'desc' => 'Guardians & parents'], ['label' => 'Student Login', 'url' => route('portal.login', [$websiteSchool->id, 'student']), 'desc' => 'Students'], ]; @endphp @if ($ws->isKensol()) {{-- ===================================================================== Kensol header (reference layout) Row flow: [top contact bar] -> [branding: logo + school name] -> [main navigation + portal login] -> [search] ===================================================================== --}}
{{-- Row 1: School branding (logo + school name) --}} {{-- Row 2: Main navigation + portal login --}}
{{-- Portal login dropdown (bordered box) --}}
{{-- Apply CTA (beside Portal Login) --}} Apply {{-- Mobile toggle --}}
{{-- Row 3: Search (right aligned, below nav) --}}
{{-- Mobile menu --}}
@else
{{-- Logo --}} @if ($branding['logo']) {{ $websiteSchool->name }} logo @else {{ $websiteSchool->initials ?? substr($websiteSchool->name, 0, 2) }} @endif {{ $websiteSchool->name }} {{-- Desktop nav --}}
{{-- Login dropdown — role-specific, always scoped to this school --}}
{{-- Mobile toggle --}}
{{-- Mobile menu --}}
@endif