@extends('components.public-layout') @section('title', $organizationSettings['name'] . ' - Programs & Events') @section('content')

Programs & Events

Discover transformative spiritual programs, community events, and fellowship opportunities that strengthen faith and build lasting connections. Open to all members and visitors of the Presbyterian Church of Ghana.

{{ $programs->count() }}
Active Programs
{{ \App\Models\Family::count() }}
Families
{{ \App\Models\Member::count() }}
Church Members
{{ \App\Models\Event::where('start_datetime', '>=', now())->count() }}
Upcoming Events

Church Announcements

Stay informed with the latest news, updates, and important announcements from our church community

@php $featuredAnnouncements = \App\Models\Announcement::where('status', 'published') ->where('publish_date', '<=', now()) ->where(function($query) { $query->whereNull('expire_date') ->orWhere('expire_date', '>', now()); }) ->where('display_on_website', true) ->orderBy('priority', 'desc') ->orderBy('publish_date', 'desc') ->take(6) ->get(); @endphp @if($featuredAnnouncements->count() > 0)
@foreach($featuredAnnouncements as $announcement)
@if($announcement->image_path)
{{ $announcement->title }}
@if($announcement->priority === 'urgent')
URGENT
@elseif($announcement->priority === 'high')
HIGH
@endif
@else
@if($announcement->priority === 'urgent')
URGENT
@elseif($announcement->priority === 'high')
HIGH
@endif
@endif @php $headerColors = [ 'urgent' => 'from-red-800 via-red-600 to-red-400', 'event' => 'from-blue-700 via-blue-500 to-blue-300', 'prayer_request' => 'from-purple-800 via-purple-600 to-purple-400', 'celebration' => 'from-pink-700 via-pink-500 to-pink-300', 'ministry' => 'from-indigo-800 via-indigo-600 to-indigo-400', 'general' => 'from-blue-600 via-blue-500 to-blue-400' ]; $headerColor = $headerColors[$announcement->type] ?? $headerColors['general']; @endphp
{{ ucfirst(str_replace('_', ' ', $announcement->type)) }}
{{ $announcement->publish_date->format('M j') }}

{{ $announcement->title }}

{{ Str::limit($announcement->content, 150) }}

Published {{ $announcement->publish_date->format('M j, Y') }}
@if($announcement->expire_date)
Expires {{ $announcement->expire_date->format('M j, Y') }}
@endif @if($announcement->target_audience && count($announcement->target_audience) > 0)
For {{ implode(', ', array_map('ucfirst', array_slice($announcement->target_audience, 0, 2))) }}{{ count($announcement->target_audience) > 2 ? ' +' . (count($announcement->target_audience) - 2) . ' more' : '' }}
@endif
@if($announcement->attachment_path)
Attachment Available
@endif
@endforeach
@else

No Announcements Available

We currently don't have any active announcements to display. Check back soon for the latest updates and news from our church community.

@endif

Upcoming Events

Stay connected with our vibrant church community through exciting events, fellowship activities, and spiritual gatherings

@php $upcomingEvents = \App\Models\Event::where('start_datetime', '>=', now())->orderBy('start_datetime')->take(6)->get(); @endphp @forelse($upcomingEvents as $event)

{{ $event->title }}

{{ $event->start_datetime->format('M j, Y') }} at {{ $event->start_datetime->format('g:i A') }}

{{ Str::limit($event->description, 120) }}

{{ $event->location ?? 'Church Premises' }}
@empty

No Upcoming Events

Check back soon for exciting church events and activities.

@endforelse

Our Church Family

Meet some of our dedicated church members and leaders

@if(request('search') || request('age_group')) @endif
@if($isFiltered)

Showing {{ $featuredMembers->total() }} member(s) matching your search criteria

@endif
@forelse($featuredMembers as $member)
@if($member->photo_path) {{ $member->first_name }} @else
@endif

{{ $member->full_name }}

{{ ucfirst($member->membership_type) }} Member

@if($member->occupation)

{{ Str::limit($member->occupation, 30) }}

@endif
@empty

@if($isFiltered) No Members Found @else Growing Church Family @endif

@if($isFiltered) No members match your search criteria. Try adjusting your filters. @else Our church community is growing. Join us in fellowship and worship. @endif

@endforelse
@if($isFiltered && $featuredMembers->hasPages())
{{ $featuredMembers->links() }}
@endif
@push('scripts') @endpush @endsection