From 6b16ac2bf9fd9b87c4e7b8a5fcd426982f380823 Mon Sep 17 00:00:00 2001 From: cialloo Date: Sat, 4 Oct 2025 09:09:16 +0800 Subject: [PATCH] Add Friends feature with routing and localization; update styles for feature cards --- src/App.css | 1 + src/App.tsx | 15 +++++++++++---- src/locales/en.json | 7 ++++++- src/locales/zh.json | 7 ++++++- 4 files changed, 24 insertions(+), 6 deletions(-) diff --git a/src/App.css b/src/App.css index da5fd18..b5dab76 100644 --- a/src/App.css +++ b/src/App.css @@ -257,6 +257,7 @@ display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; + justify-items: center; } .feature-card { diff --git a/src/App.tsx b/src/App.tsx index bcb1544..8006cd7 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,4 +1,5 @@ import { useTranslation } from 'react-i18next' +import { Link } from 'react-router-dom' import Layout from './components/Layout' import './App.css' @@ -86,25 +87,31 @@ function App() {
🖥️

{t('features.serverBrowser.title')}

{t('features.serverBrowser.description')}

- + {t('features.browseServers')}
📝

{t('features.blog.title')}

{t('features.blog.description')}

- + {t('features.readBlog')}
📦

{t('features.git.title')}

{t('features.git.description')}

- {t('features.viewGitHub')} + {t('features.viewGitHub')}
💬

{t('features.forum.title')}

{t('features.forum.description')}

- + {t('features.joinForum')} +
+
+
🔗
+

{t('features.friends.title')}

+

{t('features.friends.description')}

+ {t('features.viewFriends')}
diff --git a/src/locales/en.json b/src/locales/en.json index dcd5bbd..ea05a9e 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -41,10 +41,15 @@ "title": "Discussion Forum", "description": "Join discussions about strategies, share your experiences, and connect with fellow gamers." }, + "friends": { + "title": "Friend Links", + "description": "Discover amazing communities and resources from our partner websites and fellow gamers." + }, "browseServers": "Browse Servers", "readBlog": "Read Blog", "viewGitHub": "View Git", - "joinForum": "Join Forum" + "joinForum": "Join Forum", + "viewFriends": "View Friends" }, "activity": { "title": "Recent Activity", diff --git a/src/locales/zh.json b/src/locales/zh.json index b74217d..4fce58c 100644 --- a/src/locales/zh.json +++ b/src/locales/zh.json @@ -41,10 +41,15 @@ "title": "讨论论坛", "description": "加入关于策略的讨论,分享您的经验,与其他玩家交流。" }, + "friends": { + "title": "友情链接", + "description": "发现来自我们合作伙伴网站和游戏伙伴的精彩社区和资源。" + }, "browseServers": "浏览服务器", "readBlog": "阅读博客", "viewGitHub": "查看 Git", - "joinForum": "加入论坛" + "joinForum": "加入论坛", + "viewFriends": "查看友链" }, "activity": { "title": "最近活动",