const navItems = [ { href: "/index.html", label: "Home", match: ["/index.html", "/"] }, { href: "/about.html", label: "About Us", match: ["/about.html", "/the-founders.html", "/about-us-organizations.html"], children: [ { href: "/the-founders.html", label: "The Founders" }, { href: "/about-us-organizations.html", label: "Organizations" }, ], }, { href: "/videos.html", label: "Videos", match: ["/videos.html"] }, { href: "/events.html", label: "Events", match: ["/events.html", "/services.html"], children: [{ href: "/services.html", label: "Sunday Services" }], }, { href: "/speeches/", label: "Speeches", match: ["/speeches/"] }, { href: "/contact.html", label: "Contact", match: ["/contact.html"] }, ]; const sidebarItems = [ { href: "/the-founders.html", label: "The Founders" }, { href: "/services.html", label: "Sunday Services" }, { href: "/contact.html", label: "Contact" }, { href: "/speeches/", label: "Speeches" }, ]; function isCurrent(pathname, item) { return item.match.some((match) => { if (match.endsWith("/")) { if (match === "/") { return pathname === "/"; } return pathname.startsWith(match); } return pathname === match; }); } function renderNavItem(item, index, pathname) { const current = isCurrent(pathname, item); const classes = [ "menu-item", item.children ? "menu-item-has-children" : "", current ? "current-menu-item current_page_item" : "", `menu-item-${index + 1}`, ] .filter(Boolean) .join(" "); const aria = current ? ' aria-current="page"' : ""; const children = item.children ? ` ` : ""; return `
  • ${item.label}${children}
  • `; } export function renderPrimaryNav(pathname) { return ``; } export function renderSidebar() { return ``; } export function renderFooter() { return ``; }