12/21/25 V.11
This commit is contained in:
parent
f800e10a76
commit
98bb56cb79
@ -35,6 +35,7 @@ function openPage(pageId) {
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
const isStandalonePage = !document.getElementById('page-home');
|
||||
const navLinksContainer = document.getElementById('nav-links');
|
||||
const mobileMenuContainer = document.getElementById('mobile-menu');
|
||||
const footerLinksContainer = document.getElementById('footer-links');
|
||||
@ -46,6 +47,8 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
let link = `#${page}`;
|
||||
if (page === 'faq' || page === 'trust' || page === 'apply') { // these are standalone pages
|
||||
link = `/${page}.php`;
|
||||
} else if (isStandalonePage) {
|
||||
link = `/index.php#${page}`;
|
||||
}
|
||||
navHTML += `<a href="${link}" class="navlink px-3 py-2 rounded-full hover:bg-gray-100" data-page="${page}">${page.charAt(0).toUpperCase() + page.slice(1)}</a>`;
|
||||
});
|
||||
@ -60,6 +63,8 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
let link = `#${page}`;
|
||||
if (page === 'faq' || page === 'trust' || page === 'apply') { // these are standalone pages
|
||||
link = `/${page}.php`;
|
||||
} else if (isStandalonePage) {
|
||||
link = `/index.php#${page}`;
|
||||
}
|
||||
footerHTML += `<a href="${link}" class="underline navlink" data-page="${page}">${page.charAt(0).toUpperCase() + page.slice(1)}</a>`;
|
||||
if (index < footerPages.length - 1) {
|
||||
@ -111,7 +116,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
|
||||
// Update content visibility
|
||||
whyContents.forEach(c => {
|
||||
if (c.dataset.content === tabId) {
|
||||
if (c.id === tabId) {
|
||||
c.classList.remove('hidden');
|
||||
} else {
|
||||
c.classList.add('hidden');
|
||||
@ -120,4 +125,4 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
Loading…
x
Reference in New Issue
Block a user