Spaces:
Running
Running
File size: 2,255 Bytes
a3201e1 83b858a a3201e1 83b858a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
// Main JavaScript file
document.addEventListener('DOMContentLoaded', function() {
// Create stars
function createStars() {
const count = 100;
const container = document.body;
for (let i = 0; i < count; i++) {
const star = document.createElement('div');
star.className = 'star';
const size = Math.random() * 3;
star.style.width = `${size}px`;
star.style.height = `${size}px`;
star.style.left = `${Math.random() * 100}%`;
star.style.top = `${Math.random() * 100}%`;
star.style.animationDelay = `${Math.random() * 5}s`;
container.appendChild(star);
}
}
createStars();
// Initialize tooltips
const tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'));
tooltipTriggerList.map(function (tooltipTriggerEl) {
return new bootstrap.Tooltip(tooltipTriggerEl);
});
// Current date in footer
const currentYear = new Date().getFullYear();
document.getElementById('current-year').textContent = currentYear;
// Smooth scrolling for anchor links
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
anchor.addEventListener('click', function (e) {
e.preventDefault();
document.querySelector(this.getAttribute('href')).scrollIntoView({
behavior: 'smooth'
});
});
});
// Schedule filter functionality
const scheduleFilter = document.getElementById('schedule-filter');
if (scheduleFilter) {
scheduleFilter.addEventListener('change', function() {
const selectedDay = this.value;
// Here you would filter the schedule table based on the selected day
console.log('Filtering schedule for:', selectedDay);
});
}
});
// Function to show donation modal
function showDonationModal() {
// In a real implementation, this would show a modal with donation options
alert('Спасибо за желание поддержать нас! Скоро здесь появится форма для пожертвований.');
} |