File size: 2,698 Bytes
3736783
6a32373
 
 
3736783
6a32373
 
 
3736783
6a32373
3736783
6a32373
 
 
 
3736783
6a32373
 
 
 
 
 
 
 
 
 
 
 
 
 
 
c209365
 
6a32373
 
 
 
 
c209365
4c7fe36
 
 
 
 
 
 
 
6a32373
 
 
 
 
4c7fe36
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3736783
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
63
64
65
66
67
68
69
70
71
72
73
document.addEventListener('DOMContentLoaded', function() {
    // Mobile menu toggle
    const mobileMenuBtn = document.querySelector('.mobile-menu-btn');
    const navLinks = document.querySelector('.nav-links');
    
    if (mobileMenuBtn) {
        mobileMenuBtn.addEventListener('click', function() {
            navLinks.style.display = navLinks.style.display === 'flex' ? 'none' : 'flex';
        });
    }
    
    // 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'
                });
                
                // Close mobile menu if open
                if (navLinks && navLinks.style.display === 'flex') {
                    navLinks.style.display = 'none';
                }
            }
        });
    });
    // Form submission
    const contactForm = document.querySelector('.contact-form');
    if (contactForm) {
        contactForm.addEventListener('submit', function(e) {
            e.preventDefault();
            
            // Track form submission in Google Analytics (if implemented)
            if (typeof gtag !== 'undefined') {
                gtag('event', 'form_submission', {
                    'event_category': 'contact',
                    'event_label': 'Contact Form Submitted'
                });
            }
            
            // In a real implementation, you would send the form data to a server
            alert('Thank you for your message! We will get back to you soon.');
            this.reset();
        });
    }

    // Structured data for organization
    const structuredData = {
        "@context": "https://schema.org",
        "@type": "Organization",
        "name": "HayShape",
        "url": "https://www.hayshape.com",
        "logo": "https://www.hayshape.com/images/logo.png",
        "description": "Professional web design and development agency",
        "sameAs": [
            "https://www.facebook.com/hayshape",
            "https://www.twitter.com/hayshape",
            "https://www.linkedin.com/company/hayshape"
        ]
    };

    const script = document.createElement('script');
    script.type = "application/ld+json";
    script.text = JSON.stringify(structuredData);
    document.head.appendChild(script);
});