diff --git a/.github/release.md b/.github/release.md index 72f8899..6e33288 100644 --- a/.github/release.md +++ b/.github/release.md @@ -1,5 +1,7 @@ ## 🌈 Style +- **移除字体 (不再集成个性化字体)** + #### 更符合 GitHub 风格 - 仓库代码页侧边栏宽度优化 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0329825..969a41b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,10 +21,7 @@ jobs: - name: Build theme run: | npm install - npm run build:theme-fonts - mv dist css - npm run build:theme - tar -czf dist/theme-github-fonts.tar.gz css fonts + npm run build - uses: actions/upload-artifact@v4 with: name: theme-github diff --git a/README.md b/README.md index 17fa745..d754b30 100644 --- a/README.md +++ b/README.md @@ -7,8 +7,6 @@ 添加了短暂的过渡动画优化体验(与 GitHub Code 克隆列表动画一致) -UI 默认字体 [Maple Hand](https://github.com/subframe7536/maple-font/tree/other-resources/cn-resource/maple-hand) & [VictorMono Nerd Font](https://github.com/ryanoasis/nerd-fonts/releases/download/v3.3.0/VictorMono.zip) (优先匹配 `Maple Hand`, 需要系统包含相应字体, 否则使用默认字体) - ## 安装 1. 在发布页下载最新的 `theme-github.css` 放入 `gitea/public/assets/css` 目录下 @@ -24,23 +22,6 @@ THEMES = gitea-dark, github 详细请查看 Gitea 文档 [Gitea docs](https://docs.gitea.com/next/administration/customizing-gitea#customizing-the-look-of-gitea) -### 集成字体 - -如果不想手动在系统安装字体, 可以将字体放入 Gitea 中, 在访问时拉取字体文件 - ->[!CAUTION] -> -> 不推荐此行为, 字体文件较大, 且一些字体粗细样式可能会有缺失 -> -> 页面会在加载完字体后切换字体 - -1. 在发布页下载最新的 `theme-github-fonts.tar.gz` 解压后放入 `gitea/public/assets` 目录下 -2. 清除浏览器缓存, 强制刷新浏览器查看效果 - -文件位置如下: - -![安装](screenshots/themetree.png) - ## 截图 ![仓库](screenshots/repo.png) diff --git a/fonts/MapleHand-Bold.ttf b/fonts/MapleHand-Bold.ttf deleted file mode 100644 index 2c848f2..0000000 Binary files a/fonts/MapleHand-Bold.ttf and /dev/null differ diff --git a/fonts/MapleHand-Regular.ttf b/fonts/MapleHand-Regular.ttf deleted file mode 100644 index 8652b23..0000000 Binary files a/fonts/MapleHand-Regular.ttf and /dev/null differ diff --git a/fonts/VictorMonoNerdFont-Bold.ttf b/fonts/VictorMonoNerdFont-Bold.ttf deleted file mode 100644 index 3da6de2..0000000 Binary files a/fonts/VictorMonoNerdFont-Bold.ttf and /dev/null differ diff --git a/fonts/VictorMonoNerdFont-BoldItalic.ttf b/fonts/VictorMonoNerdFont-BoldItalic.ttf deleted file mode 100644 index fe95974..0000000 Binary files a/fonts/VictorMonoNerdFont-BoldItalic.ttf and /dev/null differ diff --git a/fonts/VictorMonoNerdFont-Italic.ttf b/fonts/VictorMonoNerdFont-Italic.ttf deleted file mode 100644 index 0e96ae9..0000000 Binary files a/fonts/VictorMonoNerdFont-Italic.ttf and /dev/null differ diff --git a/fonts/VictorMonoNerdFont-Regular.ttf b/fonts/VictorMonoNerdFont-Regular.ttf deleted file mode 100644 index ae5d05c..0000000 Binary files a/fonts/VictorMonoNerdFont-Regular.ttf and /dev/null differ diff --git a/package.json b/package.json index 8d323d4..912c4fd 100644 --- a/package.json +++ b/package.json @@ -3,11 +3,9 @@ "version": "1.0.0", "description": "尽量保持与 GitHub Dark 相同样式的 Gitea 主题", "scripts": { - "build": "sass src/theme-github.scss:dist/theme-github.css --no-source-map", - "build:theme": "npm run build -- --style=compressed", - "build:theme-fonts": "sass src/theme-github-fonts.scss:dist/theme-github.css --no-source-map --style=compressed", - "build:theme-my": "sass src/theme-github-my.scss:dist/theme-github.css --no-source-map --style=compressed", - "watch": "npm run build -- --watch" + "export": "sass src/theme-github.scss:dist/theme-github.css --no-source-map", + "build": "npm run export -- --style=compressed", + "watch": "npm run export -- --watch" }, "repository": { "type": "git", diff --git a/screenshots/themetree.png b/screenshots/themetree.png deleted file mode 100644 index 99daac3..0000000 Binary files a/screenshots/themetree.png and /dev/null differ diff --git a/src/fontface.scss b/src/fontface.scss deleted file mode 100644 index bfd5705..0000000 --- a/src/fontface.scss +++ /dev/null @@ -1,48 +0,0 @@ -// Made by Luting ^-^ -@font-face { - font-family: 'Maple Hand'; - src: url('/assets/fonts/MapleHand-Regular.ttf') format('truetype'); - font-display: swap; - font-weight: normal; - font-style: normal; -} - -@font-face { - font-family: 'Maple Hand'; - src: url('/assets/fonts/MapleHand-Bold.ttf') format('truetype'); - font-display: swap; - font-weight: bold; - font-style: normal; -} - -@font-face { - font-family: 'VictorMono NF'; - src: url('/assets/fonts/VictorMonoNerdFont-Regular.ttf') format('truetype'); - font-display: swap; - font-weight: normal; - font-style: normal; -} - -@font-face { - font-family: 'VictorMono NF'; - src: url('/assets/fonts/VictorMonoNerdFont-Italic.ttf') format('truetype'); - font-display: swap; - font-weight: normal; - font-style: italic; -} - -@font-face { - font-family: 'VictorMono NF'; - src: url('/assets/fonts/VictorMonoNerdFont-Bold.ttf') format('truetype'); - font-display: swap; - font-weight: bold; - font-style: normal; -} - -@font-face { - font-family: 'VictorMono NF'; - src: url('/assets/fonts/VictorMonoNerdFont-BoldItalic.ttf') format('truetype'); - font-display: swap; - font-weight: bold; - font-style: italic; -} diff --git a/src/root.scss b/src/root.scss index 59be5f0..5014ec9 100644 --- a/src/root.scss +++ b/src/root.scss @@ -1,21 +1,4 @@ // Made by Luting ^-^ -:root :lang(zh-CN) { - --fonts-override: 'Maple Hand', 'VictorMono NF', 'VictorMono Nerd Font'; -} - -.job-step-logs { - font-family: 'ui-monospace', 'SFMono-Regular', 'SF Mono', 'Menlo', 'Consolas', 'Liberation Mono', 'monospace', 'Maple Hand' !important; -} - -.repository { - #commits-table .text.right, - #repo-files-table .repo-file-cell.age, - #repo-files-table relative-time { - font-family: 'VictorMono NF', 'VictorMono Nerd Font', 'Maple Hand'; - font-weight: bold !important; - } -} - :root { --is-dark-theme: true; --border-radius: 6px; diff --git a/src/theme-github-fonts.scss b/src/theme-github-fonts.scss deleted file mode 100644 index d0f41ae..0000000 --- a/src/theme-github-fonts.scss +++ /dev/null @@ -1,3 +0,0 @@ -/* Made by Luting ^-^ */ -@use 'fontface'; -@use 'theme-github'; \ No newline at end of file diff --git a/src/theme-github-my.scss b/src/theme-github-my.scss deleted file mode 100644 index 9c29e21..0000000 --- a/src/theme-github-my.scss +++ /dev/null @@ -1,12 +0,0 @@ -/* Made by Luting ^-^ */ -// 独家秘制小主题 -@use 'theme-github'; - -.repository { - #commits-table .text.right, - #repo-files-table .repo-file-cell.age, - #repo-files-table relative-time { - font-family: 'Maple Mono NF', 'Maple Hand'; - font-weight: normal !important; - } -}