feat(admin): add initial admin dashboard structure
This commit introduces the foundational structure for the new admin dashboard. - Utilizes @nuxt/ui to build the dashboard layout, including a collapsible sidebar and navigation. - Adds initial pages for the dashboard, news, events, and hall of fame management. - Implements a composable `useDashboardSidebarLinks` for managing sidebar navigation. - Refactors the default layout by integrating the header and footer directly. - Swaps the primary and secondary theme colors across the application.
This commit is contained in:
27
app/pages/admin/contents/events/index.vue
Normal file
27
app/pages/admin/contents/events/index.vue
Normal file
@@ -0,0 +1,27 @@
|
||||
<template>
|
||||
<UDashboardPanel>
|
||||
<template #header>
|
||||
<UDashboardNavbar :title="pageTitle" toggle>
|
||||
<template #leading>
|
||||
<UDashboardSidebarCollapse />
|
||||
</template>
|
||||
</UDashboardNavbar>
|
||||
</template>
|
||||
<template #body>
|
||||
This is events page
|
||||
</template>
|
||||
</UDashboardPanel>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
const pageTitle = "活动列表"
|
||||
definePageMeta({
|
||||
layout: "admin-dashboard",
|
||||
title: pageTitle
|
||||
})
|
||||
useHead({
|
||||
title: pageTitle
|
||||
})
|
||||
</script>
|
||||
|
||||
<style></style>
|
||||
27
app/pages/admin/contents/hall-of-fames/index.vue
Normal file
27
app/pages/admin/contents/hall-of-fames/index.vue
Normal file
@@ -0,0 +1,27 @@
|
||||
<template>
|
||||
<UDashboardPanel>
|
||||
<template #header>
|
||||
<UDashboardNavbar :title="pageTitle" toggle>
|
||||
<template #leading>
|
||||
<UDashboardSidebarCollapse />
|
||||
</template>
|
||||
</UDashboardNavbar>
|
||||
</template>
|
||||
<template #body>
|
||||
This is hall of fame page
|
||||
</template>
|
||||
</UDashboardPanel>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
const pageTitle = "名人堂列表"
|
||||
definePageMeta({
|
||||
layout: "admin-dashboard",
|
||||
title: pageTitle
|
||||
})
|
||||
useHead({
|
||||
title: pageTitle
|
||||
})
|
||||
</script>
|
||||
|
||||
<style></style>
|
||||
34
app/pages/admin/contents/news/index.vue
Normal file
34
app/pages/admin/contents/news/index.vue
Normal file
@@ -0,0 +1,34 @@
|
||||
<template>
|
||||
<UDashboardPanel>
|
||||
<template #header>
|
||||
<UDashboardNavbar :title="pageTitle" toggle>
|
||||
<template #leading>
|
||||
<UDashboardSidebarCollapse />
|
||||
</template>
|
||||
<template #trailing>
|
||||
<UBadge size="md" label="4" variant="outline" color="neutral" />
|
||||
</template>
|
||||
<template #right>
|
||||
<AdminContentsNewsAddModal />
|
||||
</template>
|
||||
</UDashboardNavbar>
|
||||
</template>
|
||||
|
||||
<template #body>
|
||||
This is news page
|
||||
</template>
|
||||
</UDashboardPanel>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
const pageTitle = "新闻列表"
|
||||
definePageMeta({
|
||||
layout: "admin-dashboard",
|
||||
title: pageTitle
|
||||
})
|
||||
useHead({
|
||||
title: pageTitle
|
||||
})
|
||||
</script>
|
||||
|
||||
<style></style>
|
||||
28
app/pages/admin/dashboard/index.vue
Normal file
28
app/pages/admin/dashboard/index.vue
Normal file
@@ -0,0 +1,28 @@
|
||||
<template>
|
||||
<UDashboardPanel>
|
||||
<template #header>
|
||||
<UDashboardNavbar :title="pageTitle" toggle>
|
||||
<template #leading>
|
||||
<UDashboardSidebarCollapse />
|
||||
</template>
|
||||
</UDashboardNavbar>
|
||||
</template>
|
||||
|
||||
<template #body>
|
||||
This is home page
|
||||
</template>
|
||||
</UDashboardPanel>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
const pageTitle = "仪表盘"
|
||||
definePageMeta({
|
||||
layout: "admin-dashboard",
|
||||
title: pageTitle,
|
||||
})
|
||||
useHead({
|
||||
title: pageTitle
|
||||
})
|
||||
</script>
|
||||
|
||||
<style></style>
|
||||
15
app/pages/admin/index.vue
Normal file
15
app/pages/admin/index.vue
Normal file
@@ -0,0 +1,15 @@
|
||||
<template>
|
||||
<div>
|
||||
Login Page
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
definePageMeta({
|
||||
layout: "admin-login"
|
||||
})
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user