2024-12-27 23:05:05 +08:00
2024-12-27 14:20:43 +08:00
2024-12-19 00:20:25 +08:00
2024-12-19 00:20:25 +08:00
2024-12-19 00:20:25 +08:00
2024-07-09 12:07:34 +08:00
2024-12-19 00:20:25 +08:00
2024-12-27 14:27:09 +08:00

gitea-github-theme

尽量保持与 GitHub Dark 相同样式的 Gitea 主题

字体说明:

  • UI 默认字体 Maple Hand & VictorMono Nerd Font (优先匹配 Maple Hand, 需要系统包含相应字体)
  • Actions 日志默认字体 VictorMono 优先

Victor Mono 相比其他等宽字体更为紧凑, 可以减少换行

安装

  1. 在发布页下载最新的 theme-github.css 放入 gitea/public/assets/css 目录下
  2. 修改 gitea/conf/app.ini,并将 , github 附加到 [ui] 下的 THEMES 末尾
  3. 重启 Gitea
  4. 在设置中查看主题

gitea/conf/app.ini 例:

[ui]
THEMES = gitea-dark, github

详细请查看 Gitea 文档 Gitea docs

集成字体

如果不想手动在系统安装字体, 可以将字体放入 Gitea 中, 在访问时拉取字体文件

Caution

不推荐此行为, 字体文件较大, 且一些字体粗细样式可能会有缺失

页面会在加载完字体后切换字体

下载字体文件, 放入 gitea/public/assets/fonts 目录下, 包含以下6个文件:

  • MapleHand-Regular.ttf
  • MapleHand-Bold.ttf
  • VictorMonoNerdFont-Regular.ttf
  • VictorMonoNerdFont-Bold.ttf
  • VictorMonoNerdFont-Italic.ttf
  • VictorMonoNerdFont-BoldItalic.ttf

清除浏览器缓存, 强制刷新浏览器查看效果

文件位置如下:

安装

截图

仓库

仓库文件列表

仓库发布

仓库提交

Actions

Actions Step

构建

需要 nodejs 和 npm

git clone https://github.com/lutinglt/gitea-github-theme.git
cd gitea-github-theme
npm install
npm run build:theme

查看用于 Gitea 的主题文件: ./dist/theme-github.css

在开发过程中实时构建主题文件

npm run watch

贡献

欢迎提交 Issue 或 Pull Request

Description
模仿 GitHub Dark 的 Gitea 主题 ( A dark theme to make Gitea look and feel like GitHub )
Readme Apache-2.0 36 MiB
Languages
TypeScript 100%