From 6f181d3f221ab94edb4b732618e6d70c629fe450 Mon Sep 17 00:00:00 2001 From: xiaomai Date: Wed, 8 Oct 2025 08:49:08 +0800 Subject: [PATCH] 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. --- app/assets/css/app.css | 6 -- app/assets/css/main.css | 11 +++- app/components/AppFooter.vue | 39 ------------ app/components/AppHeader.vue | 25 -------- .../admin/contents/news/AddModal.vue | 52 +++++++++++++++ app/components/index/Donate.vue | 4 +- app/components/index/Events.vue | 2 +- app/components/index/HallOfFame.vue | 2 +- app/components/index/Hero.vue | 4 +- app/components/index/News.vue | 4 +- app/composables/useDashboardSidebarLinks.ts | 56 +++++++++++++++++ app/layouts/admin-dashboard.vue | 44 +++++++++++++ app/layouts/admin-login.vue | 13 ++++ app/layouts/default.vue | 63 +++++++++++++++++-- app/pages/admin/contents/events/index.vue | 27 ++++++++ .../admin/contents/hall-of-fames/index.vue | 27 ++++++++ app/pages/admin/contents/news/index.vue | 34 ++++++++++ app/pages/admin/dashboard/index.vue | 28 +++++++++ app/pages/admin/index.vue | 15 +++++ 19 files changed, 371 insertions(+), 85 deletions(-) delete mode 100644 app/assets/css/app.css delete mode 100644 app/components/AppFooter.vue delete mode 100644 app/components/AppHeader.vue create mode 100644 app/components/admin/contents/news/AddModal.vue create mode 100644 app/composables/useDashboardSidebarLinks.ts create mode 100644 app/layouts/admin-dashboard.vue create mode 100644 app/layouts/admin-login.vue create mode 100644 app/pages/admin/contents/events/index.vue create mode 100644 app/pages/admin/contents/hall-of-fames/index.vue create mode 100644 app/pages/admin/contents/news/index.vue create mode 100644 app/pages/admin/dashboard/index.vue create mode 100644 app/pages/admin/index.vue diff --git a/app/assets/css/app.css b/app/assets/css/app.css deleted file mode 100644 index ec1a6a6..0000000 --- a/app/assets/css/app.css +++ /dev/null @@ -1,6 +0,0 @@ -@import "tailwindcss"; - -@theme { - --color-primary: #fcef91; - --color-secondary: #fb9e3a; -} diff --git a/app/assets/css/main.css b/app/assets/css/main.css index 700bf45..526efe0 100644 --- a/app/assets/css/main.css +++ b/app/assets/css/main.css @@ -1,2 +1,9 @@ -@import "./app.css"; -@import "./markdown.css"; \ No newline at end of file +@import "./markdown.css"; + +@import "tailwindcss"; +@import "@nuxt/ui"; + +@theme { + --color-primary: #fb9e3a; + --color-secondary: #fcef91; +} diff --git a/app/components/AppFooter.vue b/app/components/AppFooter.vue deleted file mode 100644 index 427a5ce..0000000 --- a/app/components/AppFooter.vue +++ /dev/null @@ -1,39 +0,0 @@ - - - - - diff --git a/app/components/AppHeader.vue b/app/components/AppHeader.vue deleted file mode 100644 index 0316fcf..0000000 --- a/app/components/AppHeader.vue +++ /dev/null @@ -1,25 +0,0 @@ - \ No newline at end of file diff --git a/app/components/admin/contents/news/AddModal.vue b/app/components/admin/contents/news/AddModal.vue new file mode 100644 index 0000000..88a8fb9 --- /dev/null +++ b/app/components/admin/contents/news/AddModal.vue @@ -0,0 +1,52 @@ + + + + + \ No newline at end of file diff --git a/app/components/index/Donate.vue b/app/components/index/Donate.vue index 0c71a78..d90b41a 100644 --- a/app/components/index/Donate.vue +++ b/app/components/index/Donate.vue @@ -1,10 +1,10 @@ diff --git a/app/components/index/Events.vue b/app/components/index/Events.vue index 21b7394..c06caea 100644 --- a/app/components/index/Events.vue +++ b/app/components/index/Events.vue @@ -11,7 +11,7 @@

{{ event.title }}

日期:{{ useChineseDateFormat(event.date) }}

地点:{{ event.location }}

- 阅读详情 + 阅读详情 diff --git a/app/components/index/HallOfFame.vue b/app/components/index/HallOfFame.vue index 304460a..f9f2b6b 100644 --- a/app/components/index/HallOfFame.vue +++ b/app/components/index/HallOfFame.vue @@ -5,7 +5,7 @@

名人堂

- +

{{ person.name }}

{{ person.title }}

diff --git a/app/components/index/Hero.vue b/app/components/index/Hero.vue index 8c5a6f4..8b8e996 100644 --- a/app/components/index/Hero.vue +++ b/app/components/index/Hero.vue @@ -1,7 +1,7 @@ @@ -10,6 +65,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/app/pages/admin/contents/events/index.vue b/app/pages/admin/contents/events/index.vue new file mode 100644 index 0000000..95d3050 --- /dev/null +++ b/app/pages/admin/contents/events/index.vue @@ -0,0 +1,27 @@ + + + + + \ No newline at end of file diff --git a/app/pages/admin/contents/hall-of-fames/index.vue b/app/pages/admin/contents/hall-of-fames/index.vue new file mode 100644 index 0000000..fd641b3 --- /dev/null +++ b/app/pages/admin/contents/hall-of-fames/index.vue @@ -0,0 +1,27 @@ + + + + + \ No newline at end of file diff --git a/app/pages/admin/contents/news/index.vue b/app/pages/admin/contents/news/index.vue new file mode 100644 index 0000000..a691d7b --- /dev/null +++ b/app/pages/admin/contents/news/index.vue @@ -0,0 +1,34 @@ + + + + + \ No newline at end of file diff --git a/app/pages/admin/dashboard/index.vue b/app/pages/admin/dashboard/index.vue new file mode 100644 index 0000000..ccf7032 --- /dev/null +++ b/app/pages/admin/dashboard/index.vue @@ -0,0 +1,28 @@ + + + + + \ No newline at end of file diff --git a/app/pages/admin/index.vue b/app/pages/admin/index.vue new file mode 100644 index 0000000..c2cd61e --- /dev/null +++ b/app/pages/admin/index.vue @@ -0,0 +1,15 @@ + + + + + \ No newline at end of file