支持克隆菜单自定义长度

This commit is contained in:
lutinglt
2025-08-05 15:55:25 +08:00
parent 4f4b99a600
commit 603d22d877
5 changed files with 56 additions and 2 deletions

View File

@@ -26,6 +26,35 @@ THEMES = gitea-dark, github-dark
详细请查看 Gitea 文档
[Gitea docs](https://docs.gitea.com/next/administration/customizing-gitea#customizing-the-look-of-gitea)
## 自定义 CSS 变量
可以根据自己的偏好自定义主题的一部分样式
### 使用方法
在主题的 CSS 文件中头部或尾部添加以下代码
```css
:root {
--custom-clone-menu-width: 150px;.
...
}
```
>[!IMPORTANT]
>
>请确保在 `:root` 选择器中添加自定义变量,否则无法生效
>
>变量之间用 `;` 分隔
>
>建议自定义变量放在单独的文件中, 通过 shell 命令等方式追加到主题文件中
### CSS 变量
| 变量名 | 描述 | Gitea (默认值) | Github | 推荐 | 最小值 | 最大值 |
| :------------------------ | :----------- | :------------- | :----- | :---- | :----- | :----- |
| --custom-clone-menu-width | 克隆菜单宽度 | 232px | 332px | 200px | 150px | 400px |
## 截图
![仓库](screenshots/repo.png)
@@ -45,3 +74,7 @@ THEMES = gitea-dark, github-dark
## 贡献
欢迎提交 Issue 或 Pull Request
```
```