打包字体

This commit is contained in:
lutinglt
2024-12-28 00:07:35 +08:00
parent 70e65ec687
commit 605a9e0d65
13 changed files with 13 additions and 18 deletions

6
.github/release.md vendored
View File

@@ -1,5 +1 @@
修复输入框圆角 Gitea 集成字体版本独立, 有需要下载 `theme-github-fonts.tar.gz`
微调下拉菜单的选项间隔和边框阴影
修复字体粗细生效问题
同步 Github 仓库标题最新样式
同步 Github 分支列表样式(超还原)

View File

@@ -21,15 +21,18 @@ jobs:
- name: Build theme - name: Build theme
run: | run: |
npm install npm install
npm run build:theme-fonts
mv dist css
npm run build:theme npm run build:theme
tar -czf dist/theme-github-fonts.tar.gz css fonts
- uses: actions/upload-artifact@v4 - uses: actions/upload-artifact@v4
with: with:
name: theme-github name: theme-github
path: dist/theme-github.css path: dist/*
- name: Create release - name: Create release
run: | run: |
export TZ=Asia/Shanghai export TZ=Asia/Shanghai
TAG="v${{ inputs.gitea_version }}-$(date +%Y%m%d-%H%M)" 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: env:
GH_TOKEN: ${{ github.token }} GH_TOKEN: ${{ github.token }}

View File

@@ -34,16 +34,8 @@ THEMES = gitea-dark, github
> >
> 页面会在加载完字体后切换字体 > 页面会在加载完字体后切换字体
下载字体文件, 放入 `gitea/public/assets/fonts` 目录下, 包含以下6个文件: 1. 在发布页下载最新的 `theme-github-fonts.tar.gz` 解压后放入 `gitea/public/assets` 目录下
2. 清除浏览器缓存, 强制刷新浏览器查看效果
- `MapleHand-Regular.ttf`
- `MapleHand-Bold.ttf`
- `VictorMonoNerdFont-Regular.ttf`
- `VictorMonoNerdFont-Bold.ttf`
- `VictorMonoNerdFont-Italic.ttf`
- `VictorMonoNerdFont-BoldItalic.ttf`
清除浏览器缓存, 强制刷新浏览器查看效果
文件位置如下: 文件位置如下:

BIN
fonts/MapleHand-Bold.ttf Normal file

Binary file not shown.

BIN
fonts/MapleHand-Regular.ttf Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -5,6 +5,7 @@
"scripts": { "scripts": {
"build": "sass src/theme-github.scss:dist/theme-github.css --no-source-map", "build": "sass src/theme-github.scss:dist/theme-github.css --no-source-map",
"build:theme": "npm run build -- --style=compressed", "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" "watch": "npm run build -- --watch"
}, },
"repository": { "repository": {

View File

@@ -1,3 +1,4 @@
// Made by Luting ^-^
@font-face { @font-face {
font-family: 'Maple Hand'; font-family: 'Maple Hand';
src: url('/assets/fonts/MapleHand-Regular.ttf') format('truetype'); src: url('/assets/fonts/MapleHand-Regular.ttf') format('truetype');

View File

@@ -0,0 +1,3 @@
/* Made by Luting ^-^ */
@use 'fontface';
@use 'theme-github';

View File

@@ -1,5 +1,4 @@
/* Made by Luting ^-^ */ /* Made by Luting ^-^ */
@use 'fontface';
@use 'chroma'; @use 'chroma';
@use 'codemirror'; @use 'codemirror';
@use 'root'; @use 'root';