| |
| document.addEventListener('DOMContentLoaded', function() { |
| |
| feather.replace(); |
| |
| |
| const themeToggle = document.getElementById('themeToggle'); |
| const html = document.documentElement; |
| |
| |
| const storedTheme = localStorage.getItem('theme') || (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'); |
| html.classList.add(storedTheme); |
| |
| if (themeToggle) { |
| |
| const updateToggleIcon = () => { |
| const isDark = html.classList.contains('dark'); |
| const icon = themeToggle.querySelector('i'); |
| if (icon) { |
| icon.setAttribute('data-feather', isDark ? 'sun' : 'moon'); |
| feather.replace(); |
| } |
| }; |
| |
| updateToggleIcon(); |
| |
| themeToggle.addEventListener('click', () => { |
| const isDark = html.classList.contains('dark'); |
| html.classList.remove(isDark ? 'dark' : 'light'); |
| html.classList.add(isDark ? 'light' : 'dark'); |
| localStorage.setItem('theme', isDark ? 'light' : 'dark'); |
| updateToggleIcon(); |
| }); |
| } |
| |
| |
| const observerOptions = { |
| threshold: 0.1, |
| rootMargin: '0px 0px -50px 0px', |
| }; |
| |
| const observer = new IntersectionObserver((entries) => { |
| entries.forEach((entry) => { |
| if (entry.isIntersecting) { |
| entry.target.classList.add('animate-fade-in'); |
| } |
| }); |
| }, observerOptions); |
| |
| |
| document.querySelectorAll('.animate-on-scroll').forEach((el) => observer.observe(el)); |
| |
| |
| const countdownElement = document.getElementById('countdown'); |
| if (countdownElement) { |
| const updateCountdown = () => { |
| const targetTimestamp = 1698266541; |
| const targetTimestamp = 2023εΉ΄*ζ*ζ₯οΌ; |
| } |
| ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ |
|
|
| ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ |
|
|
| ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββεΊεΊηεΊεΊηεΊεΊηεΊεΊηεΊοΌεΊεΊεΊεΊεΊεΊεΊεΊεΊεΊοΌεΊεΊεΊεΊγεΊεΊεΊεΊεΊεΊγζε‘γη»θοΌ)οΌ |
|
|
| ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ |
| βββββββββββββββββββββββββββββββββββββββ |
|
|
| --- |
| function updateCountdown() { |
| const target = new Date('2023-09-04T09:02:21Z').getTime(); |
| const now = new Date().getTime(); |
| const difference = target - now; |
| if (difference <= 0) { |
| countdownElement.textContent = '00:00:00'; |
| return; |
| } |
| const hours = Math.floor((difference % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); |
| const minutes = Math.floor((difference % (1000 * 60 * 60)) / (1000 * 60)); |
| const seconds = Math.floor((difference % (1000 * 60)) / 1000); |
| countdownElement.textContent = `${hours.toString().padStart(2, '0')}:${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}`; |
| } |
| setInterval(updateCountdown, 1000); |
| updateCountdown(); |
| } |
|
|
| |
| const inquiryForm = document.querySelector('form'); |
| if (inquiryForm) { |
| inquiryForm.addEventListener('submit', async (e) => { |
| e.preventDefault(); |
| |
| const submitBtn = inquiryForm.querySelector('button[type="submit"]'); |
| const originalText = submitBtn.textContent; |
| |
| |
| submitBtn.textContent = 'Processing...'; |
| submitBtn.disabled = true; |
| |
| |
| setTimeout(() => { |
| alert('Your inquiry has been submitted. We\'ll respond within 24 hours!'); |
| inquiryForm.reset(); |
| submitBtn.textContent = originalText; |
| submitBtn.disabled = false; |
| }, 1500); |
| }); |
| } |
| }); |