From 2f20d4909126cbba07131c9edac9a08d0d007c06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B3=E5=85=83=E7=9A=93?= Date: Tue, 6 May 2025 19:31:53 +0800 Subject: [PATCH] feat: integrate animate.css for animations, enhance layout, and improve localization files --- app.vue | 4 +- bun.lock | 3 + components/footer.vue | 10 +- components/navigation.vue | 123 ++++++++++++++--------- i18n/i18n.config.ts | 4 + i18n/locales/de.json | 6 +- i18n/locales/en.json | 21 ++-- i18n/locales/i18n.config.ts | 4 - i18n/locales/zh-tw.json | 21 ++-- layouts/default.vue | 22 ++-- layouts/newsorg.vue | 22 ++-- nuxt.config.ts | 43 ++++---- package.json | 3 +- pages/home.vue | 10 +- pages/newsOrgAbout/[slug].vue | 56 +++++++---- server/api/getData/fetchNewsOrgInfo.ts | 27 +++-- server/api/objectstorage/files/[slug].ts | 10 +- server/components/s3.ts | 2 +- server/routes/feed.json.ts | 4 +- styles/main.css | 14 +-- tailwind.config.js | 15 ++- 21 files changed, 252 insertions(+), 172 deletions(-) create mode 100644 i18n/i18n.config.ts delete mode 100644 i18n/locales/i18n.config.ts diff --git a/app.vue b/app.vue index 1bce92f..75c910a 100644 --- a/app.vue +++ b/app.vue @@ -1,11 +1,11 @@ diff --git a/bun.lock b/bun.lock index e0dcac5..cff7a70 100644 --- a/bun.lock +++ b/bun.lock @@ -12,6 +12,7 @@ "@nuxtjs/tailwindcss": "6.14.0", "@tailwindcss/vite": "^4.1.5", "@uploadthing/nuxt": "^7.1.7", + "animate.css": "^4.1.1", "bootstrap-icons": "^1.12.1", "gsap": "^3.13.0", "nuxt": "^3.17.2", @@ -605,6 +606,8 @@ "ajv": ["ajv@6.12.6", "", { "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", "json-schema-traverse": "^0.4.1", "uri-js": "^4.2.2" } }, "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g=="], + "animate.css": ["animate.css@4.1.1", "", {}, "sha512-+mRmCTv6SbCmtYJCN4faJMNFVNN5EuCTTprDTAo7YzIGji2KADmakjVA3+8mVDkZ2Bf09vayB35lSQIex2+QaQ=="], + "ansi-regex": ["ansi-regex@6.1.0", "", {}, "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA=="], "ansi-styles": ["ansi-styles@4.3.0", "", { "dependencies": { "color-convert": "^2.0.1" } }, "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg=="], diff --git a/components/footer.vue b/components/footer.vue index 27e0f69..68a8ed0 100644 --- a/components/footer.vue +++ b/components/footer.vue @@ -1,3 +1,9 @@ \ No newline at end of file +
+ {{ new Date().getFullYear() }} © 吳元皓 +
+ diff --git a/components/navigation.vue b/components/navigation.vue index 1077dfb..c0be7e6 100644 --- a/components/navigation.vue +++ b/components/navigation.vue @@ -1,62 +1,91 @@ \ No newline at end of file +
+ {{ t("nav.home") }} +   + {{ t("nav.dailybriefing") }} +
+
+ + + + + +
+ + diff --git a/i18n/i18n.config.ts b/i18n/i18n.config.ts new file mode 100644 index 0000000..26ca22f --- /dev/null +++ b/i18n/i18n.config.ts @@ -0,0 +1,4 @@ +export default defineI18nConfig(() => ({ + legacy: false, + locale: "en", +})); diff --git a/i18n/locales/de.json b/i18n/locales/de.json index 205fd3d..baafd17 100644 --- a/i18n/locales/de.json +++ b/i18n/locales/de.json @@ -1,4 +1,4 @@ { - "dailybriefing": "", - "Welcome": "" -} \ No newline at end of file + "dailybriefing": "", + "Welcome": "" +} diff --git a/i18n/locales/en.json b/i18n/locales/en.json index 7969a9a..17981df 100644 --- a/i18n/locales/en.json +++ b/i18n/locales/en.json @@ -1,11 +1,12 @@ { - "core": { - "sitename": "BlindSpec" - }, - "nav": { - "home": "Home" - }, - "dailybriefing": "Daily Briefing", - "Welcome": "Welcome", - "loading": "Loading..." -} \ No newline at end of file + "core": { + "sitename": "BlindSpec" + }, + "nav": { + "home": "Home", + "dailybriefing": "Daily Briefing" + }, + "dailybriefing": "Daily Briefing", + "Welcome": "Welcome", + "loading": "Loading..." +} diff --git a/i18n/locales/i18n.config.ts b/i18n/locales/i18n.config.ts deleted file mode 100644 index 7d8fbf9..0000000 --- a/i18n/locales/i18n.config.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default defineI18nConfig(() => ({ - legacy: false, - locale: 'en', - })) \ No newline at end of file diff --git a/i18n/locales/zh-tw.json b/i18n/locales/zh-tw.json index 9b49287..c0aaf52 100644 --- a/i18n/locales/zh-tw.json +++ b/i18n/locales/zh-tw.json @@ -1,11 +1,12 @@ { - "core": { - "sitename": "新聞盲點平台" - }, - "nav": { - "home": "首頁" - }, - "dailybriefing": "今日報導", - "Welcome": "歡迎", - "loading": "載入中..." -} \ No newline at end of file + "core": { + "sitename": "新聞盲點平台" + }, + "nav": { + "home": "首頁", + "dailybriefing": "今日報導" + }, + "dailybriefing": "今日報導", + "Welcome": "歡迎", + "loading": "載入中..." +} diff --git a/layouts/default.vue b/layouts/default.vue index 0d2fa0e..3be07b1 100644 --- a/layouts/default.vue +++ b/layouts/default.vue @@ -1,15 +1,15 @@ \ No newline at end of file + +
+ +
+