Skip to content

style: unified light/dark design tokens, home template, CJK summary fix - #8

Open
shiptux wants to merge 2 commits into
hellollvm:masterfrom
shiptux:style/unified-redesign
Open

shiptux wants to merge 2 commits into
hellollvm:masterfrom
shiptux:style/unified-redesign

Conversation

@shiptux

@shiptux shiptux commented Oct 14, 2026

Copy link
Copy Markdown

概要 / Summary

重做站点样式与首页布局,对齐 OSDT / RISC-V 中国社区几个站点共用的设计语言:浅色为底、跟随系统深色模式、系统字体栈、卡片与圆角按钮。Hugo 与内容不变。

Restyle the site and home page with the design language shared by the sibling OSDT / RISC-V China community sites: light base that follows the system dark mode, system font stack, cards and pill buttons. Hugo and content are unchanged.

改动 / Changes

  • assets/css/main.css 全部重写为 CSS 自定义属性 token(无外部字体 / CDN)
  • header / footer 拆成 partial;新增内联 SVG 图标与 GitHub 链接;导航高亮当前栏目
  • 新增 layouts/index.html:hero、栏目入口卡片、跨栏目「最新动态」
  • list.html / single.html:日期、栏目标签、返回链接
  • hugo.toml:hasCJKLanguage = true(之前 summaryLength 按英文单词数计,整段中文被当作一个词,导致「历史存档」把整页正文泄漏进首页卡片);repoURL;页脚 friendLinks(不想要可整段删除)
  • content/archives.md 补 date 与 description(之前显示 0001-01-01);content/announcements/_index.md 给公告栏目一个中文标题

验证 / Verification

  • hugo --gc --minify 本地构建无错误(0.148.2,与 CI 一致)
  • 1280 / 390 宽度、浅色 / 深色截图检查首页、列表页、文章页;改前/改后截图随后作为评论附上

🤖 Generated with Claude Code

- Rewrite main.css around CSS custom properties (system font stack,
  light base with prefers-color-scheme dark, cards, buttons, hero)
- Split header/footer into partials, add inline SVG icons and a
  GitHub link instead of any external icon font or CDN
- Add a dedicated home template: hero, section entry cards and a
  cross-section "latest" grid
- Tidy list/single templates (date meta, section tag, back link)
- Enable hasCJKLanguage so summaryLength counts characters; the
  archive page previously leaked its whole body into the home card
- Give the archive page a date and description (was 0001-01-01)
- Add a titled _index for the announcements section
- Add repoURL and optional footer friend links to params
@lazyparser

Copy link
Copy Markdown
Member

Thanks. Let's try it!

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants