feat(app): restructure to multi-page layout and add content pages
Converts the website from a single-page design with anchor links to a full multi-page application. This change improves site organization, navigation, and scalability. - Adds new top-level pages: `/news`, `/events`, and `/about`. - Introduces a new section for the 40th Anniversary at `/40th-anniversary`, including a proposal sub-page. - Updates the default layout with a new navigation menu, a promotional banner, social links, and page transitions.
This commit is contained in:
30
app/pages/news/index.vue
Normal file
30
app/pages/news/index.vue
Normal file
@@ -0,0 +1,30 @@
|
||||
<template>
|
||||
<UPage>
|
||||
<UPageBody>
|
||||
<UContainer>
|
||||
<UChangelogVersions :versions="newsPost" />
|
||||
</UContainer>
|
||||
</UPageBody>
|
||||
</UPage>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import type { ChangelogVersionProps } from "@nuxt/ui";
|
||||
|
||||
const { data: news } = await useAsyncData("news", () =>
|
||||
queryCollection("news").order("date", "DESC").all()
|
||||
);
|
||||
|
||||
// 将 news 数据转换成 UBlogPosts 可用格式
|
||||
const newsPost = computed<ChangelogVersionProps[]>(() =>
|
||||
(news.value || []).map((n: any) => ({
|
||||
title: n.title,
|
||||
description: n.description,
|
||||
image: n.cover,
|
||||
date: n.date,
|
||||
to: n.path, // ✅ 建议加路由跳转
|
||||
}))
|
||||
);
|
||||
</script>
|
||||
|
||||
<style></style>
|
||||
Reference in New Issue
Block a user