--- import MainLayout from '../layouts/MainLayout.astro'; import { SERVICE_TIMES } from '../lib/constants.js'; import { getChurchName, getMissionStatement, fetchFeaturedEventsJson, fetchSermonsJson, fetchRandomBibleVerseJson, fetchBibleVerseJson, getStreamLiveStatus } from '../lib/bindings.js'; let churchName = 'Welcome to Our Church'; let missionStatement = 'Proclaiming the Three Angels\' Message with love and truth'; let featuredEvents = []; let latestSermons = []; let dailyVerse = null; let isLiveStreamActive = false; let threeAngelsVerses = { first: null, second: null, third: null }; try { churchName = getChurchName(); missionStatement = getMissionStatement(); // Get featured events const eventsJson = fetchFeaturedEventsJson(); const parsedEvents = JSON.parse(eventsJson); featuredEvents = (Array.isArray(parsedEvents) ? parsedEvents : (parsedEvents.items || [])).slice(0, 3); // Get latest sermons const sermonsJson = fetchSermonsJson(); const parsedSermons = JSON.parse(sermonsJson); latestSermons = (Array.isArray(parsedSermons) ? parsedSermons : (parsedSermons.items || [])).slice(0, 3); // Get daily verse const verseJson = fetchRandomBibleVerseJson(); dailyVerse = JSON.parse(verseJson); // Check live stream status isLiveStreamActive = getStreamLiveStatus(); // Get Three Angels verses const firstAngelJson = fetchBibleVerseJson('Revelation 14:7'); threeAngelsVerses.first = JSON.parse(firstAngelJson)[0]; const secondAngelJson = fetchBibleVerseJson('Revelation 14:8'); threeAngelsVerses.second = JSON.parse(secondAngelJson)[0]; const thirdAngelJson = fetchBibleVerseJson('Revelation 14:9-10'); threeAngelsVerses.third = JSON.parse(thirdAngelJson)[0]; } catch (e) { console.error('Failed to load home page data:', e); featuredEvents = []; latestSermons = []; dailyVerse = null; } ---
Seventh-day Adventist Church

{churchName}

{missionStatement}

1 2 3 Three Angels' Message
Sabbath School: {SERVICE_TIMES.SABBATH_SCHOOL}
Divine Service: {SERVICE_TIMES.DIVINE_SERVICE}
LIVE NOW

The Three Angels' Message

From Revelation 14, these three angels proclaim God's final message to the world before Jesus returns.

1

Fear God & Give Glory

{threeAngelsVerses.first ? `"${threeAngelsVerses.first.text}"` : '"Fear God and give glory to Him, for the hour of His judgment has come; and worship Him who made heaven and earth, the sea and springs of water."'}

{threeAngelsVerses.first?.reference || 'Revelation 14:7'}

2

Babylon is Fallen

{threeAngelsVerses.second ? `"${threeAngelsVerses.second.text}"` : '"Babylon is fallen, is fallen, that great city, because she has made all nations drink of the wine of the wrath of her fornication."'}

{threeAngelsVerses.second?.reference || 'Revelation 14:8'}

3

Avoid the Mark

{threeAngelsVerses.third ? `"${threeAngelsVerses.third.text}"` : '"If anyone worships the beast and his image, and receives his mark on his forehead or on his hand, he himself shall also drink of the wine of the wrath of God."'}

{threeAngelsVerses.third?.reference || 'Revelation 14:9-10'}

{dailyVerse && (

Today's Scripture

"{dailyVerse.text}"

— {dailyVerse.reference}

)} {featuredEvents.length > 0 && (

Upcoming Events

Join us for fellowship, worship, and spiritual growth

{featuredEvents.map(event => (
{event.image && (
{event.title}
)}

{event.title}

{event.formatted_date}
{event.description && (

{event.description}

)} Learn More
))}
)} {latestSermons.length > 0 && (

Recent Sermons

Be inspired by God's Word through our recent messages

{latestSermons.map(sermon => (

{sermon.title}

{sermon.speaker}
{sermon.date || 'Recent'}
{sermon.description && (

{sermon.description}

)} {sermon.videoUrl ? 'Watch Now' : 'View Details'}
))}
)}

Faith in Your Pocket

Access sermons, events, and stay connected with our church family through our mobile app designed for spiritual growth.

Live Streaming

Watch our Sabbath services and special events live from anywhere

Sermons & Studies

Access our complete library of sermons and Bible study materials

Events & Bulletins

Stay updated with church events and read the latest bulletins

Download Our Mobile App

Stay connected with sermons, events, and church activities wherever you go. Our app makes it easy to access spiritual content and stay engaged with our community.

Download on the App Store
Available on both iOS and Android platforms. Download today to access sermons, events, and stay connected with our church community.

Visit Us This Sabbath

Experience the joy of Sabbath worship and discover the peace that comes from fellowship with God and His people