@if (!empty($data['page_init']['setting']['logo']['header']))
WBU Logo
@endif
@if (!empty($data['page_init']['setting']['header_title']))

{{ $data['page_init']['setting']['header_title'] }}

@endif @if (!empty($data['page_init']['setting']['header_desc']))

{{ $data['page_init']['setting']['header_desc'] }}

@endif
@php $currentPath = trim(request()->path(), '/'); $currentUrl = rtrim(request()->url(), '/'); $urlMatches = function ($link) use ($currentPath, $currentUrl) { if (empty($link) || $link === '#') { return false; } $full = str_starts_with($link, 'http') ? rtrim($link, '/') : rtrim(url($link), '/'); $linkPath = trim(parse_url($full, PHP_URL_PATH) ?: '/', '/'); $isRootLink = $linkPath === '' || $linkPath === app()->getLocale(); if ($isRootLink) { return $currentPath === $linkPath || ($currentPath === '' && $linkPath === ''); } return $currentPath === $linkPath || str_starts_with($currentPath . '/', $linkPath . '/'); }; @endphp @foreach ($data['page_init']['menu'] as $item) @php $itemLink = $item['href'] ?? ($item['url'] ?? '#'); $isActive = $urlMatches($itemLink); @endphp @if ($item['id'] == 6) @php $isAllActive = $isActive; $hasActiveSubmenu = false; foreach ($data['page_init']['activity_category']['list'] ?? [] as $subitem) { if ($urlMatches($subitem['url'] ?? '#')) { $hasActiveSubmenu = true; break; } } $isActive = $isActive || $hasActiveSubmenu; @endphp
{{ $item['name'] }}
{{ __('frontend::common.all') }} @foreach ($data['page_init']['activity_category']['list'] ?? [] as $subitem) @php $isSubActive = $urlMatches($subitem['url'] ?? '#'); @endphp {{ $subitem['name'] ?? '' }} @endforeach
@else {{ $item['name'] }} @endif @endforeach
@foreach (languages() as $code => $language) @if ($code == app()->getLocale()) {{ strtoupper($code) }} @else {{ strtoupper($code) }} @endif @endforeach
@if (!empty($data['page_init']['setting']['logo']['header']))
WBU Logo
@endif WBU
@php $currentPathMobile = trim(request()->path(), '/'); $currentUrlMobile = rtrim(request()->url(), '/'); $urlMatchesMobile = function ($link) use ($currentPathMobile, $currentUrlMobile) { if (empty($link) || $link === '#') { return false; } $full = str_starts_with($link, 'http') ? rtrim($link, '/') : rtrim(url($link), '/'); $linkPath = trim(parse_url($full, PHP_URL_PATH) ?: '/', '/'); $isRootLink = $linkPath === '' || $linkPath === app()->getLocale(); if ($isRootLink) { return $currentPathMobile === $linkPath || ($currentPathMobile === '' && $linkPath === ''); } return $currentPathMobile === $linkPath || str_starts_with($currentPathMobile . '/', $linkPath . '/'); }; @endphp @foreach ($data['page_init']['menu'] as $index => $item) @php $itemLinkMobile = $item['href'] ?? ($item['url'] ?? '#'); $isActive = $urlMatchesMobile($itemLinkMobile); @endphp @if ($item['id'] == 6) @php $isAllActive = $isActive; $hasActiveSubmenu = false; foreach ($data['page_init']['activity_category']['list'] ?? [] as $subitem) { if ($urlMatchesMobile($subitem['url'] ?? '#')) { $hasActiveSubmenu = true; break; } } $isActive = $isActive || $hasActiveSubmenu; @endphp
{{ $item['name'] }}
{{ __('frontend::common.all') }} @foreach ($data['page_init']['activity_category']['list'] ?? [] as $subitem) @php $isSubActive = $urlMatchesMobile($subitem['url'] ?? '#'); @endphp {{ $subitem['name'] ?? '' }} @endforeach
@else {{ $item['name'] }} @endif @endforeach
@foreach (languages() as $code => $language) @if ($code == app()->getLocale()) {{ strtoupper($code) }} @else {{ strtoupper($code) }} @endif @endforeach