12/21/25 V.11

This commit is contained in:
Flatlogic Bot 2025-12-21 17:25:45 +00:00
parent f800e10a76
commit 98bb56cb79

View File

@ -35,6 +35,7 @@ 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');
@ -46,6 +47,8 @@ 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>`;
}); });
@ -60,6 +63,8 @@ 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) {
@ -111,7 +116,7 @@ document.addEventListener('DOMContentLoaded', () => {
// Update content visibility // Update content visibility
whyContents.forEach(c => { whyContents.forEach(c => {
if (c.dataset.content === tabId) { if (c.id === tabId) {
c.classList.remove('hidden'); c.classList.remove('hidden');
} else { } else {
c.classList.add('hidden'); c.classList.add('hidden');