feat: 完成社区首页功能迭代,新增首页聚合与工作台组件
本次提交实现了完整的社区首页功能: 1. 新增首页聚合接口与服务,包含社区统计、热门帖、活跃用户与板块数据 2. 实现帖子推荐排序、SSR缓存与点赞态同步逻辑 3. 重构导航与布局系统,新增工作台侧边栏与移动端适配 4. 优化主题色与UI样式,统一设计系统风格 5. 修复登录注册页自动跳转与组件状态同步问题
This commit is contained in:
@@ -1,34 +1,20 @@
|
||||
import Link from "next/link";
|
||||
import pkg from "../package.json";
|
||||
import FooterTiming from "./FooterTiming";
|
||||
|
||||
// 仅把明确发布过的版本视为"真实版本";脚手架默认号视为未设计,传空显示占位
|
||||
function realVersion(v: string): string {
|
||||
return !v || v === "0.0.0" || v === "0.1.0" ? "" : v;
|
||||
}
|
||||
|
||||
// 极简页脚:版权 + 实时性能指标(版本 / 页面加载 / 模板生成)
|
||||
export default function Footer() {
|
||||
const year = new Date().getFullYear();
|
||||
|
||||
return (
|
||||
<footer className="mt-14" style={{ borderTop: "1px solid var(--line)" }}>
|
||||
<div className="max-w-6xl mx-auto px-4 sm:px-6 py-8 flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4">
|
||||
<div className="flex items-center gap-2.5">
|
||||
<span
|
||||
className="w-7 h-7 rounded-lg flex items-center justify-center"
|
||||
style={{ background: "var(--accent)", color: "var(--accent-on)" }}
|
||||
>
|
||||
<svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.2" strokeLinecap="round" strokeLinejoin="round">
|
||||
<path d="M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z" />
|
||||
</svg>
|
||||
</span>
|
||||
<span className="text-[13.5px] font-bold" style={{ color: "var(--ink)" }}>
|
||||
姜十三社区
|
||||
</span>
|
||||
</div>
|
||||
<nav className="flex items-center gap-5 text-[13px]" style={{ color: "var(--ink-2)" }}>
|
||||
<Link href="/" className="hover:text-[var(--accent)] transition-colors">
|
||||
首页
|
||||
</Link>
|
||||
<Link href="/board/1" className="hover:text-[var(--accent)] transition-colors">
|
||||
板块
|
||||
</Link>
|
||||
<span className="meta">Go × Next.js</span>
|
||||
</nav>
|
||||
<span className="meta text-[12.5px]">
|
||||
© 2026 姜十三
|
||||
</span>
|
||||
<div className="max-w-[1440px] mx-auto px-4 sm:px-6 py-4 flex items-center justify-between gap-4">
|
||||
<span className="meta text-[12px] whitespace-nowrap">© {year} 姜十三社区</span>
|
||||
<FooterTiming version={realVersion(pkg.version)} />
|
||||
</div>
|
||||
</footer>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user