Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions components/app/hamburger-menu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,19 @@ function transformNavigation(navItems: any[], isChild = false): MenuItem[] {
})
}

// A `link` in the folder's .navigation.yml overrides the generated path (e.g. an anchor on another page)
if (isChild && item.link) {
return {
label: item.title,
path: item.link,
children: null,
onClick: () => {
router.push(item.link)
isOpen.value = false
}
}
}

return {
label: item.title,
path: item.path,
Expand Down
10 changes: 9 additions & 1 deletion components/app/menus.vue
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,18 @@ const filteredNavigation = computed(() =>
interface MenuItem {
label: string
path?: string
link?: string
children?: MenuItem[] | null
}

const processNavigationItem = (navItem: any, isRoot = true): MenuItem => {
// A `link` in the folder's .navigation.yml overrides the generated path (e.g. an anchor on another page)
if (navItem.link) {
return {
label: navItem.title,
path: navItem.link
};
}
if (navItem.children?.length === 1) {
const singleChild = navItem.children[0];
return {
Expand All @@ -200,7 +208,7 @@ const menuData = computed(() => ({

// Helper: Check if a menu item (or one of its children) is active
const isActive = (item: MenuItem): boolean => {
if (item.path && item.path === route.path) {
if (item.path && item.path.split('#')[0] === route.path && (!item.path.includes('#') || item.path === route.fullPath)) {
return true
}
if (item.children && item.children.length > 0) {
Expand Down
239 changes: 212 additions & 27 deletions content/80.about/8005.index.md

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion content/80.about/8040.faq/.navigation.yml
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
title: FAQ
title: FAQ
link: /about#frequently-asked-questions
Binary file added public/images/about_4/about_4-part-1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/about_4/about_4-part-2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/about_4/about_4-part-3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/about_4/about_4-part-4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading