與去年同期比較
diff --git a/src/pages/socialWorker/index.vue b/src/pages/socialWorker/index.vue
deleted file mode 100644
index 586e9f5..0000000
--- a/src/pages/socialWorker/index.vue
+++ /dev/null
@@ -1,382 +0,0 @@
-
-
-
-
-
diff --git a/src/router/index.js b/src/router/index.js
index 88c6dc6..91b0f70 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -1,21 +1,58 @@
import { createRouter, createWebHistory } from "vue-router";
-// 匯入各 page
-import HomePage from "@/pages/home/index.vue";
-import OperationPage from "@/pages/operation/index.vue";
-import NursingPage from "@/pages/nursing/index.vue";
-import SocialWorkerPage from "@/pages/socialWorker/index.vue";
-import NutritionPage from "@/pages/nutrition/index.vue";
+// Lazy-loaded pages
+const HomePage = () => import("@/pages/home/index.vue");
+const OperationPage = () => import("@/pages/operation/index.vue");
+const NursingPage = () => import("@/pages/nursing/index.vue");
const routes = [
- { path: "/", name: "Home", component: HomePage },
- { path: "/operation", name: "Operation", component: OperationPage },
- { path: "/nursing", name: "Nursing", component: NursingPage },
- { path: "/social-worker", name: "SocialWorker", component: SocialWorkerPage },
- { path: "/nutrition", name: "Nutrition", component: NutritionPage },
+ // 首頁 → 使用 HeadquarterLayout(無 Forge)
+ {
+ path: "/",
+ name: "Home",
+ component: HomePage,
+ meta: {
+ layout: "headquarter",
+ title: "Home",
+ keepAlive: true, // 可選:若要保留捲動/表單狀態
+ },
+ },
+
+ // 其他頁 → 預設使用 MapLayout(有地圖)
+ {
+ path: "/operation",
+ name: "Operation",
+ component: OperationPage,
+ meta: { layout: "map", title: "Operation" },
+ },
+ {
+ path: "/nursing",
+ name: "Nursing",
+ component: NursingPage,
+ meta: { layout: "map", title: "Nursing" },
+ },
+
+ // 404
+ // {
+ // path: "/:pathMatch(.*)*",
+ // name: "NotFound",
+ // component: () => import("@/pages/_errors/NotFound.vue"),
+ // meta: { layout: "headquarter", title: "404 Not Found" },
+ // },
];
-export default createRouter({
- history: createWebHistory(),
+const router = createRouter({
+ history: createWebHistory(import.meta.env.BASE_URL),
routes,
+ // 回上一頁可保留位置,否則回到頂端
+ scrollBehavior(to, from, saved) {
+ return saved || { top: 0 };
+ },
});
+
+router.afterEach((to) => {
+ const base = "UARK";
+ document.title = to.meta?.title ? `${to.meta.title}|${base}` : base;
+});
+
+export default router;
diff --git a/src/style.css b/src/style.css
index 3481671..eab2a1a 100644
--- a/src/style.css
+++ b/src/style.css
@@ -132,7 +132,7 @@
/* ========== 卡片/區塊:品牌一致性 ========== */
@layer components {
.card-brand {
- @apply rounded-xl shadow-sm border border-gray-100 bg-white;
+ @apply rounded-md shadow-sm border border-gray-100 bg-white;
}
.chip-brand {
@apply inline-flex items-center gap-2 rounded-full px-3 py-1 text-sm bg-brand-green-light text-brand-black;
@@ -146,7 +146,14 @@
}
}
-/* 設定全域字體 */
+html,
+body,
+#app {
+ height: 100%;
+}
body {
+ margin: 0;
+ width: 100%; /* 別用 100vw */
+ overflow-x: hidden; /* 防止偶發橫向卷軸 */
font-family: "Noto Sans TC", sans-serif;
}
diff --git a/src/styles/palette.js b/src/styles/palette.js
index 89ba61b..4668272 100644
--- a/src/styles/palette.js
+++ b/src/styles/palette.js
@@ -9,5 +9,6 @@ export const brand = {
purpleDark: "#7089CA",
yellow: "#E1F391",
black: "#424242",
- neutral: "#F0F0F0",
-};
\ No newline at end of file
+ gray: "#828282",
+ grayLight: "#F0F0F0",
+};
diff --git a/tailwind.config.js b/tailwind.config.js
index dcb7490..56a1270 100644
--- a/tailwind.config.js
+++ b/tailwind.config.js
@@ -52,8 +52,10 @@ module.exports = {
dark: "#C4E920",
},
black: "#424242",
- neutral: {
- DEFAULT: "#F0F0F0",
+ gray: {
+ light: "#F0F0F0",
+ deepLight:"#D2D2D2",
+ DEFAULT: "#828282",
},
},
},
@@ -67,7 +69,7 @@ module.exports = {
primary: "#34D5C8",
secondary: "#C4FBE5",
accent: "#A5BEFF",
- neutral: "#424242",
+ neutral: "#828282",
"base-100": "#ffffff",
warning: "FF8678",
},