@php $socials = array_filter([ 'facebook' => $site('social_facebook'), 'instagram' => $site('social_instagram'), 'youtube' => $site('social_youtube'), 'x' => $site('social_x'), ]); $tel = $site('phone') ? '+'.\App\Support\Fmt::digits($site('phone')) : null; // Login button: donors go to their account, admins to the admin panel, everyone else to sign in. $me = auth()->user(); [$accountUrl, $accountLabel] = match (true) { $me && $me->role === 'donor' => [route('donor.dashboard'), 'My account'], $me && $me->canAccessAdmin() => [route('admin.dashboard'), 'Admin'], default => [route('donor.login'), 'Login'], }; @endphp {{-- Mobile menu: a donate card, the account link, the main pages as tiles, causes to browse, ways to get involved and quick ways to reach us. --}} @php $accountNote = match (true) { $me && $me->role === 'donor' => 'Your donations and receipts', $me && $me->canAccessAdmin() => 'Go to the admin panel', default => 'Track donations and download receipts', }; $involved = [ ['Volunteer with us', 'volunteer', 'users', 'Give your time and skills'], ['Partner with us (CSR)', 'partner', 'gift', 'For companies and groups'], ['Start a campaign', 'campaign.start', 'plus', 'Raise support for a cause you know'], ]; $more = [ ['Reports', 'transparency', 'shield'], ['Gallery', 'gallery', 'camera'], ['FAQ', 'faq', 'info'], ]; @endphp