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