File size: 1,123 Bytes
d9a3004
19197f8
d9a3004
 
19197f8
 
d9a3004
 
 
19197f8
 
 
 
 
 
 
 
 
458a0f1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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

// Initialize sidebar to be visible by default on desktop
document.addEventListener('DOMContentLoaded', () => {
  const sidebar = document.querySelector('custom-sidebar');
  if (window.innerWidth > 768) {
    sidebar.classList.add('open');
  }
});

// Toggle sidebar on mobile
window.addEventListener('resize', () => {
  const sidebar = document.querySelector('custom-sidebar');
  if (window.innerWidth > 768) {
    sidebar.classList.add('open');
  } else {
    sidebar.classList.remove('open');
  }
});
// 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'
        });
    });
});

// Form submission handler
document.querySelector('#register form')?.addEventListener('submit', function(e) {
    e.preventDefault();
    alert('Thank you for your registration! We will contact you shortly.');
    this.reset();
});

// Mobile menu functionality would go here
// (Handled by navbar component)