Add Friends page with layout and navigation; update localization for new content

This commit is contained in:
2025-10-03 15:59:25 +08:00
parent 0149a79bef
commit 1b745c7ffc
10 changed files with 440 additions and 60 deletions

35
src/components/Nav.tsx Normal file
View File

@@ -0,0 +1,35 @@
import { useTranslation } from 'react-i18next'
import { Link } from 'react-router-dom'
import LanguageSelector from './LanguageSelector'
import ThemeToggle from './ThemeToggle'
interface NavProps {
currentPage?: string
}
function Nav({ currentPage }: NavProps) {
const { t } = useTranslation()
return (
<nav className="navbar">
<div className="nav-container">
<div className="nav-logo">
<h2>🎯 {t('nav.logo')}</h2>
</div>
<div className="nav-links">
<a href="/" className={currentPage === 'home' ? 'active' : ''}>{t('nav.home')}</a>
<a href="/#servers" className={currentPage === 'servers' ? 'active' : ''}>{t('nav.servers')}</a>
<a href="/#blog" className={currentPage === 'blog' ? 'active' : ''}>{t('nav.blog')}</a>
<a href="https://git.cialloo.com" className={currentPage === 'git' ? 'active' : ''}>{t('nav.git')}</a>
<a href="/#forum" className={currentPage === 'forum' ? 'active' : ''}>{t('nav.forum')}</a>
<Link to="/friends" className={currentPage === 'friends' ? 'active' : ''}>{t('nav.friends')}</Link>
<ThemeToggle />
<LanguageSelector />
<button className="join-btn">{t('nav.joinNow')}</button>
</div>
</div>
</nav>
)
}
export default Nav