Files
tootaio.com/app/composables/NavLinks.ts
xiaomai 8cc04b7f59 feat(pages): add web development services page
This commit introduces a new page at `/webDev` to display web development services and pricing plans.

To support this, a new reusable composable `useLocalizedCollection` has been created to simplify fetching localized content from Nuxt
Content. The index page has been refactored to use this new composable.

- Adds `webDev.vue` page and corresponding `webDev.yml` content files for EN and ZH.
- Defines a Zod schema in `content.config.ts` for the new content type.
- Updates the navigation link to point to the new page.
2025-11-06 09:02:50 +08:00

87 lines
2.6 KiB
TypeScript

// composables/useNavLinks.ts
import type { NavigationMenuItem } from "@nuxt/ui";
export const useNavLinks = () => {
const { t } = useI18n();
const navLinks = computed<NavigationMenuItem[]>(() => [
{
label: t("common.header.services.label"),
icon: "mdi:briefcase-outline",
children: [
{
label: t("common.header.services.children.webDev.label"),
description: t("common.header.services.children.webDev.description"),
icon: "mdi:web",
to: "/webDev"
},
{
label: t("common.header.services.children.softwareDev.label"),
description: t(
"common.header.services.children.softwareDev.description"
),
icon: "mdi:tools",
},
{
label: t("common.header.services.children.eventVisual.label"),
description: t(
"common.header.services.children.eventVisual.description"
),
icon: "mdi:monitor-dashboard",
},
{
label: t("common.header.services.children.lab.label"),
description: t("common.header.services.children.lab.description"),
icon: "mdi:test-tube-off",
},
],
},
{
label: t("common.header.projects.label"),
icon: "mdi:lightbulb-group-outline",
children: [
{
label: t("common.header.projects.children.commercialWebsite.label"),
description: t(
"common.header.projects.children.commercialWebsite.description"
),
icon: "mdi:web",
},
{
label: t("common.header.projects.children.gameDev.label"),
description: t("common.header.projects.children.gameDev.description"),
icon: "mdi:gamepad-variant-outline",
},
{
label: t("common.header.projects.children.tools.label"),
description: t("common.header.projects.children.tools.description"),
icon: "mdi:tools",
},
{
label: t("common.header.projects.children.special.label"),
description: t("common.header.projects.children.special.description"),
icon: "mdi:star",
},
],
},
{
label: t("common.header.insights.label"),
icon: "mdi:brain",
children: [
{
label: t("common.header.insights.children.xiaomaiBlog.label"),
description: t(
"common.header.insights.children.xiaomaiBlog.description"
),
icon: "mdi:pencil-outline",
to: "https://xiaomai.tootaio.com/",
type: "link",
target: "_blank",
},
],
},
]);
return navLinks;
};