File size: 2,045 Bytes
784ce08
036c2df
 
 
 
 
 
 
 
 
 
 
 
051dccb
784ce08
 
 
 
 
 
 
 
 
 
 
 
051dccb
784ce08
051dccb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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

// Contact form submission
document.addEventListener('DOMContentLoaded', function() {
    const contactForm = document.querySelector('form');
    if (contactForm) {
        contactForm.addEventListener('submit', function(e) {
            e.preventDefault();
            alert('๋ฌธ์˜๊ฐ€ ์„ฑ๊ณต์ ์œผ๋กœ ์ „์†ก๋˜์—ˆ์Šต๋‹ˆ๋‹ค. ๋น ๋ฅธ ์‹œ์ผ ๋‚ด์—  ๋‹ต๋ณ€๋“œ๋ฆฌ๊ฒ ์Šต๋‹ˆ๋‹ค.');
            this.reset();
        });
    }

    // Initialize animations and gallery when page loads
document.addEventListener('DOMContentLoaded', function() {
    // Initialize gallery masonry layout
    if (document.querySelector('.gallery-grid')) {
        const galleryGrid = document.querySelector('.gallery-grid');
        const galleryItems = document.querySelectorAll('.gallery-item');
        
        // Set random heights for masonry effect
        galleryItems.forEach(item => {
            const randomHeight = Math.floor(Math.random() * 100) + 200;
            item.style.height = `${randomHeight}px`;
        });
    }

    // Add water drop animation to all glass buttons
const glassButtons = document.querySelectorAll('.glass-btn');
    glassButtons.forEach(button => {
        button.addEventListener('mouseenter', function() {
            this.classList.add('animate-water-drop');
        });
        
        button.addEventListener('mouseleave', function() {
            this.classList.remove('animate-water-drop');
        });
    });
    
    // Smooth scrolling for anchor links
    document.querySelectorAll('a[href^="#"]').forEach(anchor => {
        anchor.addEventListener('click', function(e) {
            e.preventDefault();
            
            const targetId = this.getAttribute('href');
            if (targetId === '#') return;
            
            const targetElement = document.querySelector(targetId);
            if (targetElement) {
                window.scrollTo({
                    top: targetElement.offsetTop - 80,
                    behavior: 'smooth'
                });
            }
        });
    });
});