1- // // --- Seline Analytics ---
2- // function initSeline() {
3- // if (typeof seline !== "undefined") {
4- // seline.init({
5- // token: "091747081ed47e6",
6- // autoPageView: true
7- // });
8- // console.log("Seline initialized");
9- // } else {
10- // setTimeout(initSeline, 100);
11- // }
12- // }
13- // document.addEventListener("DOMContentLoaded", initSeline);
14-
15- // function scrollToMission() {
16- // document.getElementById('mission').scrollIntoView({
17- // behavior: 'smooth'
18- // });
19- // }
20-
211// Add some interactive animations
222document . addEventListener ( 'DOMContentLoaded' , function ( ) {
233
24-
25- // Intercept nav clicks
26- // document.querySelectorAll('a.nav-item').forEach(link => {
27- // link.addEventListener('click', async (e) => {
28- // e.preventDefault();
29-
30- // const target = link.getAttribute('href');
31-
32- // if (target === '#Home') {
33- // // Reload homepage hero (you could refactor into home.html too)
34- // window.location.href = "index.html";
35- // }
36- // else if (target === '#Mission') {
37- // const res = await fetch('pages/mission.html');
38- // const html = await res.text();
39- // document.querySelector('#content').innerHTML = html;
40- // window.history.pushState({ page: 'mission' }, "Mission", "#mission");
41- // }
42- // else if (target === '#Projects') {
43- // const res = await fetch('pages/projects.html');
44- // const html = await res.text();
45- // document.querySelector('#content').innerHTML = html;
46- // window.history.pushState({ page: 'projects' }, "Projects", "#project");
47- // }
48- // else if (target === '#Blogs') {
49- // const res = await fetch('pages/blogs.html');
50- // const html = await res.text();
51- // document.querySelector('#content').innerHTML = html;
52- // window.history.pushState({ page: 'blogs' }, "Blogs", "#blog");
53- // }
54- // });
55- // });
56-
574 // Intercept nav clicks
585 const navLinks = document . querySelectorAll ( 'a.nav-item' ) ;
596
@@ -80,37 +27,22 @@ document.addEventListener('DOMContentLoaded', function() {
8027 const html = await res . text ( ) ;
8128 document . querySelector ( '#content' ) . innerHTML = html ;
8229 window . history . pushState ( { page : 'mission' } , "Mission" , "#Mission" ) ;
83- seline . page ( ) ;
8430 }
8531 else if ( target === '#Projects' ) {
8632 const res = await fetch ( 'pages/projects.html' ) ;
8733 const html = await res . text ( ) ;
8834 document . querySelector ( '#content' ) . innerHTML = html ;
8935 window . history . pushState ( { page : 'projects' } , "Projects" , "#Projects" ) ;
90- seline . page ( ) ;
9136 }
9237 else if ( target === '#Blogs' ) {
9338 const res = await fetch ( 'pages/blogs.html' ) ;
9439 const html = await res . text ( ) ;
9540 document . querySelector ( '#content' ) . innerHTML = html ;
9641 window . history . pushState ( { page : 'blogs' } , "Blogs" , "#Blogs" ) ;
97- seline . page ( ) ;
9842 }
9943
10044 setActiveNav ( target ) ; // highlight correct nav link
10145 } ) ;
10246 } ) ;
10347
104- } ) ;
105-
106- // Add ripple animation
107- // const style = document.createElement('style');
108- // style.textContent = `
109- // @keyframes ripple {
110- // to {
111- // transform: scale(2);
112- // opacity: 0;
113- // }
114- // }
115- // `;
116- // document.head.appendChild(style);
48+ } ) ;
0 commit comments