feat(ui): implement dynamic dropdown navigation and refactor project cards
Replaced the static navigation with a dynamic, internationalized dropdown menu powered by a new `useNavLinks` composable. The navigation items are now sourced from i18n files. The featured project cards on the homepage have been refactored to use the `<UPageCard>` component, and the content schema is updated with `spotlight` and `highlight` options for enhanced display.
This commit is contained in:
@@ -1,86 +1,56 @@
|
||||
import { defineContentConfig, defineCollection, z } from "@nuxt/content";
|
||||
|
||||
const defineIndexSchema = () =>
|
||||
z.object({
|
||||
capabilities: z.object({
|
||||
title: z.string(),
|
||||
features: z.array(
|
||||
z.object({
|
||||
title: z.string(),
|
||||
description: z.string(),
|
||||
icon: z.string(),
|
||||
})
|
||||
),
|
||||
}),
|
||||
featuredProjects: z.object({
|
||||
title: z.string(),
|
||||
projects: z.array(
|
||||
z.object({
|
||||
title: z.string(),
|
||||
description: z.string(),
|
||||
image: z.string(),
|
||||
demoLink: z.string(),
|
||||
highlight: z.boolean(),
|
||||
spotlight: z.boolean(),
|
||||
})
|
||||
),
|
||||
}),
|
||||
techStack: z.object({
|
||||
title: z.string(),
|
||||
}),
|
||||
whyChooseUs: z.object({
|
||||
title: z.string(),
|
||||
features: z.array(
|
||||
z.object({
|
||||
title: z.string(),
|
||||
description: z.string(),
|
||||
icon: z.string(),
|
||||
})
|
||||
),
|
||||
}),
|
||||
});
|
||||
|
||||
export default defineContentConfig({
|
||||
collections: {
|
||||
index_en: defineCollection({
|
||||
type: "page",
|
||||
source: "en-US/index.yml",
|
||||
schema: z.object({
|
||||
capabilities: z.object({
|
||||
title: z.string(),
|
||||
features: z.array(
|
||||
z.object({
|
||||
title: z.string(),
|
||||
description: z.string(),
|
||||
icon: z.string(),
|
||||
})
|
||||
),
|
||||
}),
|
||||
featuredProjects: z.object({
|
||||
title: z.string(),
|
||||
projects: z.array(
|
||||
z.object({
|
||||
title: z.string(),
|
||||
description: z.string(),
|
||||
image: z.string(),
|
||||
demoLink: z.string(),
|
||||
})
|
||||
),
|
||||
}),
|
||||
techStack: z.object({
|
||||
title: z.string(),
|
||||
}),
|
||||
whyChooseUs: z.object({
|
||||
title: z.string(),
|
||||
features: z.array(
|
||||
z.object({
|
||||
title: z.string(),
|
||||
description: z.string(),
|
||||
icon: z.string(),
|
||||
})
|
||||
),
|
||||
}),
|
||||
}),
|
||||
schema: defineIndexSchema(),
|
||||
}),
|
||||
index_zh: defineCollection({
|
||||
type: "page",
|
||||
source: "zh-CN/index.yml",
|
||||
schema: z.object({
|
||||
capabilities: z.object({
|
||||
title: z.string(),
|
||||
features: z.array(
|
||||
z.object({
|
||||
title: z.string(),
|
||||
description: z.string(),
|
||||
icon: z.string(),
|
||||
})
|
||||
),
|
||||
}),
|
||||
featuredProjects: z.object({
|
||||
title: z.string(),
|
||||
projects: z.array(
|
||||
z.object({
|
||||
title: z.string(),
|
||||
description: z.string(),
|
||||
image: z.string(),
|
||||
demoLink: z.string(),
|
||||
})
|
||||
),
|
||||
}),
|
||||
techStack: z.object({
|
||||
title: z.string(),
|
||||
}),
|
||||
whyChooseUs: z.object({
|
||||
title: z.string(),
|
||||
features: z.array(
|
||||
z.object({
|
||||
title: z.string(),
|
||||
description: z.string(),
|
||||
icon: z.string(),
|
||||
})
|
||||
),
|
||||
}),
|
||||
}),
|
||||
schema: defineIndexSchema(),
|
||||
}),
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user