feat: site refresh — listening tops, nav/footer, bilingual README#76
Merged
Conversation
Add last-month top-5 listening from Supabase, simplify nav to in-site routes, global footer, shared UI components, remove Substack RSS from home, and refresh homepage/about/misc copy and styling. Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Cursor <cursoragent@cursor.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
这是一次较大的站点整理与功能更新,涵盖文档、首页文案、导航结构、Listening 卡片新功能,以及多处 UI 组件抽取与 CSS 瘦身。共 2 个 commit,29 个文件,+1541 / −1474 行。
1. 文档(README 双语重写 + 配套同步)
GET /api/spotify/last-month-top、SiteFooter、精简后的导航(About · Projects · Misc)文档。2. 导航与页脚
usePathname()的高亮:accent 色文字 + 2px 下划线nav-wave-flow)site-footer.tsx,挂载于layout.tsx,全站页脚 © 20263. Listening 卡片 — 上月 Top 5
新 API:
GET /api/spotify/last-month-toplistening_history按 上自然月 UTC 范围查询revalidate = 600,Cache-Control: s-maxage=600新模块:
lib/listening-monthly-top.ts— 纯函数:getLastMonthUtcRange、pickTopFiveTrackslib/listening-monthly-top.test.ts— Vitest 覆盖lib/listening-supabase.ts— 新增getLastMonthTopFiveTracks()新 UI:
listening-track-row.tsx— 可复用曲目行(live / compact 变体)listening-last-month-top.tsx— 「last month's tops」按钮 + HoverTip 弹出 Top 5 列表listening-card.tsx— 重构为使用上述组件,状态栏右侧显示上月 Top 入口4. 首页重构
移除:
app/lib/substack.ts)及首页 Blog 卡片:Dgiggle 动画(.emote-giggle)新增/抽取组件:
home-social-links.tsx— 社交图标 + HoverTip 标签 + 「?」联系指引gwwc-badge.tsx— Giving What We Can 🔸 徽章 + 说明 tooltippinned-project-link.tsx— 首页 list / Projects 页 card 两种变体,消除重复 markuphover-tip.tsx— 通用 tooltip(支持 portal、interactive、align)文案更新:
Visiting UC Berkeley→Visiting at UC Berkeley布局:
5. Misc / About / Projects / Weather
PinnedProjectLink variant="card";移除标题下分隔线public徽章,保留 archived6. 主题与 CSS 瘦身
system主题选项,仅 light/dark;默认 light:Dgiggle、highlight.js 主题、多余 font token2px→6px(--mag-card-radius)7. 删除的文件
app/lib/substack.tslib/substack-rss.test.tsTest plan
npm run lint && npm run typecheck && npm run test && npm run build— 全部通过/misc:Watching / Remembrance / Things I Love 三卡片全宽/projects:卡片布局与 hover 正常Made with Cursor