File size: 1,379 Bytes
fcd9a7d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
// Main application script
document.addEventListener('DOMContentLoaded', function() {
    // Initialize tooltips
    const tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'));
    tooltipTriggerList.map(function (tooltipTriggerEl) {
        return new bootstrap.Tooltip(tooltipTriggerEl);
    });

    // 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'
            });
        });
    });

    // Demo animation
    const demoBox = document.querySelector('.animate-pulse');
    if (demoBox) {
        setTimeout(() => {
            demoBox.innerHTML = `
                <div class="mb-4">
                    <div class="h-4 bg-gray-700 rounded mb-2 w-full"></div>
                    <div class="h-4 bg-gray-700 rounded mb-2 w-5/6"></div>
                    <div class="h-4 bg-gray-700 rounded mb-2 w-2/3"></div>
                </div>
                <div class="flex">
                    <div class="h-3 w-3 rounded-full bg-blue-500 mr-2"></div>
                    <div class="h-3 w-20 bg-gray-700 rounded"></div>
                </div>
            `;
        }, 3000);
    }
});