diff --git a/.github/release.md b/.github/release.md index f71d34f..65b1a64 100644 --- a/.github/release.md +++ b/.github/release.md @@ -1,5 +1 @@ -修复输入框圆角 -微调下拉菜单的选项间隔和边框阴影 -修复字体粗细生效问题 -同步 Github 仓库标题最新样式 -同步 Github 分支列表样式(超还原) \ No newline at end of file +Gitea 集成字体版本独立, 有需要下载 `theme-github-fonts.tar.gz` \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 51f26d4..0329825 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,15 +21,18 @@ 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 - uses: actions/upload-artifact@v4 with: name: theme-github - path: dist/theme-github.css + path: dist/* - name: Create release run: | export TZ=Asia/Shanghai TAG="v${{ inputs.gitea_version }}-$(date +%Y%m%d-%H%M)" - gh release create "$TAG" dist/theme-github.css --notes-file .github/release.md --draft -t $TAG + gh release create "$TAG" dist/* --notes-file .github/release.md --draft -t $TAG env: GH_TOKEN: ${{ github.token }} diff --git a/README.md b/README.md index 5859c59..1818f7d 100644 --- a/README.md +++ b/README.md @@ -34,16 +34,8 @@ THEMES = gitea-dark, github > > 页面会在加载完字体后切换字体 -下载字体文件, 放入 `gitea/public/assets/fonts` 目录下, 包含以下6个文件: - -- `MapleHand-Regular.ttf` -- `MapleHand-Bold.ttf` -- `VictorMonoNerdFont-Regular.ttf` -- `VictorMonoNerdFont-Bold.ttf` -- `VictorMonoNerdFont-Italic.ttf` -- `VictorMonoNerdFont-BoldItalic.ttf` - -清除浏览器缓存, 强制刷新浏览器查看效果 +1. 在发布页下载最新的 `theme-github-fonts.tar.gz` 解压后放入 `gitea/public/assets` 目录下 +2. 清除浏览器缓存, 强制刷新浏览器查看效果 文件位置如下: diff --git a/fonts/MapleHand-Bold.ttf b/fonts/MapleHand-Bold.ttf new file mode 100644 index 0000000..2c848f2 Binary files /dev/null and b/fonts/MapleHand-Bold.ttf differ diff --git a/fonts/MapleHand-Regular.ttf b/fonts/MapleHand-Regular.ttf new file mode 100644 index 0000000..8652b23 Binary files /dev/null and b/fonts/MapleHand-Regular.ttf differ diff --git a/fonts/VictorMonoNerdFont-Bold.ttf b/fonts/VictorMonoNerdFont-Bold.ttf new file mode 100644 index 0000000..3da6de2 Binary files /dev/null and b/fonts/VictorMonoNerdFont-Bold.ttf differ diff --git a/fonts/VictorMonoNerdFont-BoldItalic.ttf b/fonts/VictorMonoNerdFont-BoldItalic.ttf new file mode 100644 index 0000000..fe95974 Binary files /dev/null and b/fonts/VictorMonoNerdFont-BoldItalic.ttf differ diff --git a/fonts/VictorMonoNerdFont-Italic.ttf b/fonts/VictorMonoNerdFont-Italic.ttf new file mode 100644 index 0000000..0e96ae9 Binary files /dev/null and b/fonts/VictorMonoNerdFont-Italic.ttf differ diff --git a/fonts/VictorMonoNerdFont-Regular.ttf b/fonts/VictorMonoNerdFont-Regular.ttf new file mode 100644 index 0000000..ae5d05c Binary files /dev/null and b/fonts/VictorMonoNerdFont-Regular.ttf differ diff --git a/package.json b/package.json index 3440252..d2f9223 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,7 @@ "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", "watch": "npm run build -- --watch" }, "repository": { diff --git a/src/fontface.scss b/src/fontface.scss index ed5d75c..bfd5705 100644 --- a/src/fontface.scss +++ b/src/fontface.scss @@ -1,3 +1,4 @@ +// Made by Luting ^-^ @font-face { font-family: 'Maple Hand'; src: url('/assets/fonts/MapleHand-Regular.ttf') format('truetype'); diff --git a/src/theme-github-fonts.scss b/src/theme-github-fonts.scss new file mode 100644 index 0000000..d0f41ae --- /dev/null +++ b/src/theme-github-fonts.scss @@ -0,0 +1,3 @@ +/* Made by Luting ^-^ */ +@use 'fontface'; +@use 'theme-github'; \ No newline at end of file diff --git a/src/theme-github.scss b/src/theme-github.scss index 0208c05..4899cdd 100644 --- a/src/theme-github.scss +++ b/src/theme-github.scss @@ -1,5 +1,4 @@ /* Made by Luting ^-^ */ -@use 'fontface'; @use 'chroma'; @use 'codemirror'; @use 'root';