Compare commits

...

36 Commits

Author SHA1 Message Date
lutinglt
d7722cde2f update md 2025-08-13 22:33:53 +08:00
lutinglt
e3366a8406 filetree 默认高度 2025-08-13 22:32:47 +08:00
lutinglt
f6fc6a9702 🎉 release 2025-08-13 22:17:12 +08:00
lutinglt
12d5636fb7 同步查看代码文件页面样式 2025-08-13 22:03:41 +08:00
lutinglt
10c06dad60 仪表板时间 2025-08-13 19:53:27 +08:00
lutinglt
c80dd09828 时间追踪 2025-08-13 18:09:27 +08:00
lutinglt
8f2f45406a 同步 Issue/PR 列表样式 2025-08-13 16:45:53 +08:00
lutinglt
c46d9333ff fix org 2025-08-13 12:13:18 +08:00
lutinglt
7039041d9d 同步编辑器字体大小 2025-08-13 11:34:48 +08:00
lutinglt
9949bdc7bd 优化仪表板样式 & 同步代码编辑器背景色 2025-08-13 11:20:01 +08:00
lutinglt
1b81b6ad93 优化仪表板仓库/组织列表样式, 好看多了, 愿称之为神之一手 2025-08-12 22:32:31 +08:00
lutinglt
62bc2afa2a 同步 Issue/PR 详细页面侧边栏样式 2025-08-12 20:57:03 +08:00
lutinglt
60e873b0e0 同步用户点星仓库列表样式 2025-08-12 16:05:38 +08:00
lutinglt
00737f5203 优化标签样式 2025-08-12 15:34:53 +08:00
lutinglt
a90b72896b 优化热力图和动态样式 2025-08-12 14:43:05 +08:00
lutinglt
f90c488d45 优化消息右上角小图标样式 2025-08-12 11:06:32 +08:00
lutinglt
56c284aec2 同步登录/注册页面样式 2025-08-12 10:29:32 +08:00
lutinglt
0df107a166 优化创建仓库/迁移仓库/创建组织页面的样式与设置页面的样式一致 2025-08-12 09:47:43 +08:00
lutinglt
c5c1ca4a6b fix height 2025-08-12 00:27:23 +08:00
lutinglt
6bbc304a7c 激活字体颜色白色 2025-08-12 00:20:47 +08:00
lutinglt
5c95add059 同步分页菜单样式 2025-08-12 00:16:38 +08:00
lutinglt
2efaeead6b 同步仓库代码文件页 README 导航栏样式 2025-08-11 23:29:48 +08:00
lutinglt
29122e946c 修复顶部导航栏工单管理/请求合并页面搜索框旁的选择下拉框按钮内容过窄 2025-08-11 22:55:05 +08:00
lutinglt
81be016be3 略微增加仓库代码文件列表的单行高度 2025-08-11 22:41:24 +08:00
lutinglt
2ffdf501b3 修复用户公开活动页动态布局问题 2025-08-11 18:12:51 +08:00
lutinglt
9f2e5df49c 代码整理 2025-08-11 17:56:39 +08:00
lutinglt
00eda68f00 修复 Action 作业步骤页面标题选中时滚动固定的高度问题 2025-08-11 17:39:58 +08:00
lutinglt
fc4e6f43bb todo 2025-08-11 09:55:30 +08:00
lutinglt
1f01495a10 update 2025-08-11 09:52:43 +08:00
lutinglt
eae2961989 update contributing 2025-08-11 09:52:18 +08:00
lutinglt
563c20f2cc update todo 2025-08-11 09:45:32 +08:00
lutinglt
058e1b89ee update todo 2025-08-11 09:44:31 +08:00
lutinglt
c431fbadb4 update todo 2025-08-11 09:42:24 +08:00
lutinglt
74254a3f80 update readme 2025-08-11 09:31:57 +08:00
lutinglt
8118706706 update readme 2025-08-11 09:30:01 +08:00
lutinglt
ffbfccd7dc update md 2025-08-11 09:26:10 +08:00
36 changed files with 890 additions and 384 deletions

View File

@@ -1,3 +1,5 @@
## 🎉
## ✨ Feature
#### CSS 变量
@@ -6,6 +8,4 @@
#### 更符合 GitHub 风格
## 🎈 Perf
## 🐞 Fix

39
.github/release.md vendored
View File

@@ -1,21 +1,36 @@
## ✨ Feature
## 🎉 项目已毕业! (这是最后一版开发版本)
- 支持自动颜色主题 (跟随系统)
- 支持亮色主题
- 支持柔和的暗色主题 (dark-dimmed)
目前项目的主要功能开发已全部完成, 进入维护阶段.
维护阶段项目发版频率与 Gitea 发版频率保持一致, 版本号将与 Gitea 保持一致(不再附带时间戳).
每逢 Gitea 大版本更新时, 项目中间如有修复, 会发布当前版本的最后一个 `.latest` 版本. 之后会发布适配第一个大版本的 `.rc`
预发布版本, 问题不多时会发布正式版本, 正式版本之后的修复会等 Gitea 发布下一个小版本时再发布.
## 🌈 Style
- 优化创建仓库/派生仓库/迁移仓库/创建组织页面的样式与设置页面的样式一致
- 优化消息右上角小图标样式
- 优化组织页面下的 RSS 订阅按钮样式
#### 更符合 GitHub 风格
- 同步查看文件内容时的代码高亮色 (由于词法分析器的差异和解析问题, 只能实现大概相似, 目前观察到在 TypeScript 下词法分析器表现非常糟糕)
## 🎈 Perf
- 优化差异对比的代码折叠/展开按钮的高度和动画效果
- 同步代码编辑器背景色和字体大小 (修复亮色模式下编辑器背景色问题) #12
- 同步查看代码文件内容页面/文件树样式 (包括滚动时固定的导航栏, 尽量与 GitHub 一致)
- 同步分页菜单样式
- 同步登录/注册页面样式
- 同步 Issue/PR 列表样式
- 同步 Issue/PR 详细页面侧边栏样式
- 同步仓库代码文件页 README 导航栏样式
- 同步用户点星仓库列表样式
- 优化私有标签样式
- 优化热力图和动态样式
- 优化仪表板仓库/组织列表样式
- 略微增加仓库代码文件列表的单行高度
## 🐞 Fix
- 修复仓库页面与探索页面下仓库主题标签字重不一致的问题
- 修复发布页面下的分支按钮点击时高度变化问题
- 修复首页/登录页/注册页下导航栏右侧按钮样式问题 #10
- Action 作业步骤页面标题选中时滚动固定的高度
- 用户公开活动页动态布局
- 顶部导航栏工单管理/请求合并页面搜索框旁的选择下拉框按钮内容过窄
- 手机页面下注册/登录页导航栏注册按钮换行

View File

@@ -15,7 +15,7 @@
## 贡献说明
本主题不推荐样式贡献, 因为 Gitea 主题最终是由单个 CSS 文件提供, 所以会有先后顺序覆盖, 样式影响广泛等问题.
不推荐主题样式贡献, 因为 Gitea 主题最终是由单个 CSS 文件提供, 所以会有先后顺序覆盖, 样式影响广泛等问题.
开发者每个人的思路不一样, 审核很难看出这些问题, 会极大增加维护难度.
@@ -29,7 +29,7 @@
## 开发环境
主题仅依赖于 Node.js 环境, 请确保你的环境中已经安装了 Node.js, 推荐使用 Node.js 20 或以上版本.
主题仅依赖于 Node.js 环境, 请确保你的环境中已经安装了 Node.js, 推荐使用 Node.js 20 或以上版本.
请使用 VSCode 开发, 并安装仓库中推荐的插件.
@@ -98,6 +98,8 @@ npm run commit
推荐使用 `import { defineTheme } from "src"` 导入主题生成框架, 然后使用 `defineTheme` 函数生成主题,
defineTheme 中设置了一些经过计算得到的 Gitea 变量可以减少工作量, 具体请查看函数说明.
颜色计算函数可以从 `src/functions` 导入, 例如 `import { scaleColorLight } from "src/functions"`, 或者使用 `polished` 库.
例: `themes/主题名称-dark.css.ts`
```ts
@@ -119,7 +121,7 @@ export default defineTheme({
如果不需要自定义代码高亮色, 则不传递 chroma 参数, 框架会自动根据主题的暗色或亮色生成代码高亮色.
如果需要完全自定义每个 Gitea 变量, 请导入 `import { Theme } from "src/theme"`
如果需要完全自定义每个 Gitea 变量, 请导入 `import type { Theme } from "src"`
例: `themes/主题名称-dark.css.ts`
@@ -128,7 +130,7 @@ export default defineTheme({
* @author 你的名字
* @description 主题描述
*/
import { Theme } from "src";
import type { Theme } from "src";
export default theme: Theme = {
...
};
@@ -141,16 +143,16 @@ export default theme: Theme = {
## 主题样式贡献
主题样式使用 TypeScript 的 css 模板字符串开发, 该模板字符串会经过 sass 预处理器处理, 支持 SCSS 语法并且主题只接受 SCSS 嵌套语法, 请不要使用 CSS 语法, 如果一定要用请说明原因.
主题样式使用 TypeScript 的 css 模板字符串开发, 该模板字符串会经过 sass 预处理器处理, 支持 SCSS 语法并且主题只接受 SCSS 嵌套语法, 请不要使用 CSS 语法, 如果一定要用请说明原因.
请尽量不要使用 SCSS 的函数, `vscode-styled-components` 插件会报错, 请使用 TypeScript 相关库处理, 比如主题自带的
请尽量不要使用 SCSS 的函数, `vscode-styled-components` 插件会报错, 请使用 TypeScript 相关库处理, 比如主题自带的
`polished` 库.
推荐需要使用复杂处理时, 提取逻辑到 `src/functions` 目录下的函数中, 然后在 `src/styles` 目录下的样式文件中使用.
主题样式中使用到的所有颜色必须使用颜色变量, 颜色变量导入 `import { themeVars } from "src/types"`
主题样式中使用到的所有颜色必须使用颜色变量, 颜色变量导入 `import { themeVars } from "src/types/vars"`
涉及到主题的颜色变量 `${themeVars.github.xxx}`, 在使用时请将使用的文件和变量添加到对应变量的注释中
涉及到主题自己的颜色变量 `${themeVars.github.xxx}`, 在使用时请将使用的文件和变量添加到对应变量的注释中
`src/types/color/github`
小型圆角(6px)请使用全局圆角变量, 圆角变量导入 `import { otherThemeVars } from "src/types/vars"`

View File

@@ -9,15 +9,17 @@
## 版本号说明
主题版本号格式: `Gitea 版本号.时间戳`
主题版本号Gitea 版本号保持一致
Gitea 版本号格式: `1.大版本号.小版本号`
Gitea 理论上小版本号变更不会修改前端布局, 所以主题的小版本号适用于所有 Gitea 大版本号相同的 Gitea 版本.
Gitea 理论上小版本号变更不会修改前端布局, 所以主题的小版本号适用于所有 Gitea 大版本号相同的 Gitea 版本.
比如: 主题版本 `1.24.4` 适用于 Gitea 版本 `>=1.24.0` ~ `<1.25.0`
比如: 主题版本 `1.24.4` 适用于 Gitea 版本 `>=1.24.0` ~ `<1.25.0`
本主题仅维护本主题发布中的最新的 Gitea 版本, 其他旧版本主题不接受 Issue 和 PR.
仅维护项目发布中的最新的 Gitea 版本, 其他旧版本主题不接受 Issue 和 PR.
> 开发阶段的主题版本号格式: `1.大版本号.小版本号.时间戳`
## 安装
@@ -42,6 +44,23 @@ THEMES = gitea-auto, gitea-light, gitea-dark, github-auto, github-light, github-
详细请查看 Gitea 文档
[Gitea docs](https://docs.gitea.com/next/administration/customizing-gitea#customizing-the-look-of-gitea)
## 截图
<details open>
<summary>GitHub</summary>
<h4>theme-github-light.css</h4>
<img src="screenshots/light.png"/>
<h4>theme-github-dark.css</h4>
<img src="screenshots/dark.png"/>
<h4>theme-github-soft-dark.css</h4>
<img src="screenshots/soft-dark.png"/>
</details>
<details>
<summary>其他主题</summary>
等待贡献者ing...
</details>
## 自定义 CSS 变量
可以根据自己的偏好自定义主题的一部分样式
@@ -67,31 +86,14 @@ THEMES = gitea-auto, gitea-light, gitea-dark, github-auto, github-light, github-
### CSS 变量
| 变量名 | 描述 | 默认 | Github | 推荐 | 最小 | 最大 |
| :-------------------------------- | :-------------------------- | :----- | :----- | :---- | :----- | :----- |
| --custom-clone-menu-width | 克隆菜单宽度 | Gitea | 332px | 200px | 150px | 400px |
| --custom-explore-repolist-columns | 探索页面的仓库列表列数 | 2 | 2 | 2 | | |
| --custom-explore-userlist-columns | 探索页面的用户/组织列表列数 | 3 | 1 | 2/3 | | |
| --custom-user-repolist-columns | 用户页面的仓库列表列数 | 2 | 2 | 1/2 | | |
| --custom-org-repolist-columns | 组织页面的仓库列表列数 | 1 | 1 | 1/2 | | |
| --custom-org-userlist-columns | 组织页面的用户列表列数 | 2 | 1 | 1/2 | | |
## 截图
<details open>
<summary>GitHub</summary>
<h4>theme-github-light.css</h4>
<img src="screenshots/light.png"/>
<h4>theme-github-dark.css</h4>
<img src="screenshots/dark.png"/>
<h4>theme-github-soft-dark.css</h4>
<img src="screenshots/soft-dark.png"/>
</details>
<details>
<summary>其他主题</summary>
等待贡献者ing...
</details>
| 变量名 | 描述 | 默认 | Github | 推荐 | 最小 | 最大 |
| :-------------------------------- | :-------------------------- | :---- | :----- | :---- | :---- | :---- |
| --custom-clone-menu-width | 克隆菜单宽度 | Gitea | 332px | 200px | 150px | 400px |
| --custom-explore-repolist-columns | 探索页面的仓库列表列数 | 2 | 2 | 2 | | |
| --custom-explore-userlist-columns | 探索页面的用户/组织列表列数 | 3 | 1 | 2/3 | | |
| --custom-user-repolist-columns | 用户页面的仓库列表列数 | 2 | 2 | 1/2 | | |
| --custom-org-repolist-columns | 组织页面的仓库列表列数 | 1 | 1 | 1/2 | | |
| --custom-org-userlist-columns | 组织页面的用户列表列数 | 2 | 1 | 1/2 | | |
## 使用开发中的主题

View File

@@ -1,4 +0,0 @@
### 重大
- gitea issue 默认标签颜色匹配使用 github 样式
- issue/PR 列表样式 github 布局

View File

@@ -59,7 +59,7 @@ type ThemeColor = {
/** 定义颜色, 用于生成颜色主题
* @example
* 文件名: "dark.css.ts"
* import type { Console, Diff, Other } from "src/types";
* import type { Console, Diff, Other, Github } from "src/types";
* import { defineTheme, themeVars } from "src";
*
* const console: Console = {
@@ -78,6 +78,7 @@ type ThemeColor = {
* console,
* diff,
* other,
* github,
* })
*/
export function defineTheme(themeColor: ThemeColor, chroma: Chroma | null = null): Theme {

View File

@@ -39,107 +39,40 @@ export type GithubColor = {
muted: string;
};
bgColor: {
accent: {
emphasis: string;
muted: string;
};
attention: {
muted: string;
};
success: {
emphasis: string;
muted: string;
};
danger: {
muted: string;
};
done: {
emphasis: string;
};
accent: { emphasis: string; muted: string };
attention: { muted: string };
success: { emphasis: string; muted: string };
danger: { muted: string };
done: { emphasis: string };
default: string;
inset: string;
muted: string;
neutral: {
muted: string;
};
neutral: { muted: string };
};
borderColor: {
accent: {
emphasis: string;
};
attention: {
emphasis: string;
};
accent: { emphasis: string };
attention: { emphasis: string };
default: string;
success: {
emphasis: string;
};
done: {
emphasis: string;
};
success: { emphasis: string };
done: { emphasis: string };
muted: string;
translucent: string;
};
button: {
primary: {
fgColor: {
rest: string;
};
bgColor: {
hover: string;
};
};
danger: {
fgColor: {
rest: string;
hover: string;
};
bgColor: {
hover: string;
};
};
primary: { fgColor: { rest: string }; bgColor: { hover: string } };
danger: { fgColor: { rest: string; hover: string }; bgColor: { hover: string } };
};
control: {
bgColor: {
active: string;
hover: string;
rest: string;
};
transparent: {
bgColor: {
active: string;
hover: string;
selected: string;
};
};
};
shadow: {
floating: {
small: string;
};
};
overlay: {
backdrop: {
bgColor: string;
};
};
underlineNav: {
borderColor: {
active: string;
};
bgColor: { active: string; hover: string; rest: string };
transparent: { bgColor: { active: string; hover: string; selected: string } };
};
shadow: { floating: { small: string } };
overlay: { backdrop: { bgColor: string } };
underlineNav: { borderColor: { active: string } };
contribution: {
default: {
bgColor: {
num0: string;
num1: string;
num2: string;
num3: string;
num4: string;
};
borderColor: {
num0: string;
};
bgColor: { num0: string; num1: string; num2: string; num3: string; num4: string };
borderColor: { num0: string };
};
};
};

View File

@@ -2,47 +2,22 @@ import type { Chroma } from "src/types";
export type prettylightsColor = {
syntax: {
brackethighlighter: {
angle: string;
unmatched: string;
};
carriage: {
return: {
bg: string;
text: string;
};
};
brackethighlighter: { angle: string; unmatched: string };
carriage: { return: { bg: string; text: string } };
comment: string;
constant: string;
constantOtherReferenceLink: string;
entity: string;
entityTag: string;
invalid: {
illegal: {
bg: string;
text: string;
};
};
invalid: { illegal: { bg: string; text: string } };
keyword: string;
markup: {
bold: string;
changed: {
bg: string;
text: string;
};
deleted: {
bg: string;
text: string;
};
changed: { bg: string; text: string };
deleted: { bg: string; text: string };
heading: string;
ignored: {
bg: string;
text: string;
};
inserted: {
bg: string;
text: string;
};
ignored: { bg: string; text: string };
inserted: { bg: string; text: string };
italic: string;
list: string;
};

View File

@@ -39,9 +39,7 @@ export function createTheme(theme: Theme): void {
}
createGlobalTheme(":root", themeVars, theme);
createGlobalTheme(":root", otherThemeVars, {
border: {
radius: "6px",
},
border: { radius: "6px" },
color: {
git: "#f05133",
light: {

View File

@@ -1,6 +1,12 @@
import type { CSSVarFunction } from "src/core/types";
type CSSFallbackVar = `var(--${string}, ${string})`;
/**
* 设置 CSS 变量的回退值
* @param cssvar `var(--${string})`
* @param fallback
* @returns `var(--${string}, fallback)`
*/
export function fallbackVar(cssvar: CSSVarFunction, fallback: string): CSSFallbackVar {
const var_name = cssvar.replace("var(--", "").replace(")", "");
return `var(--${var_name}, ${fallback})`;

View File

@@ -1,3 +1,4 @@
export { defineTheme } from "./core/color";
export type { Chroma, Console, Diff, Other } from "./types";
export { themeVars } from "./types/vars";
export type { Theme } from "./core/theme";
export type { Chroma, Console, Diff, Github, Other } from "./types";
export { otherThemeVars, themeVars } from "./types/vars";

View File

@@ -29,6 +29,7 @@ export const github = {
* @release `releaseTagMenu` 顶部栏左侧按钮激活背景色
* @navbar `navbarRight` 头像管理员标识背景颜色
* @dropdown `dropdown` emoji 的悬停背景色
* @menu `paginationMenu` 分页菜单的激活背景色
*/
emphasis: null,
/** 暗淡的背景颜色
@@ -175,6 +176,10 @@ export const github = {
* @menu `menu` 菜单项的悬停背景颜色
* @repo `repoHeader` 仓库标题的悬停背景颜色
* @commit `commit` 提交信息的 Action 按钮的悬停背景颜色
* @filelist `repoFiles` README 栏的按钮的悬停背景颜色
* @issue `issueSidebar` 操作按钮的悬停背景颜色
* @issue `issueList` 头部菜单左侧开启关闭菜单的悬停背景颜色
* @dashboard `dashboard` 仓库列表项目的悬停背景颜色
*/
hover: null,
},
@@ -194,6 +199,7 @@ export const github = {
/** 下划线导航栏的边框颜色
* @clone `clone` 按钮组的按钮下划线颜色
* @menu `secondaryMenu` 二级菜单按钮的下划线颜色
* @filelist `repoFiles` README 栏的左边按钮下划线颜色
*/
active: null,
},
@@ -201,17 +207,17 @@ export const github = {
/** 热力图 */
contribution: {
default: {
/** 热力图方块的颜色 */
bgColor: {
num0: null,
num1: null,
num2: null,
num3: null,
num4: null,
/** github 无此颜色需自行计算
* @example 可参考这个颜色 `--color-prettylights-syntax-string-regexp`
*/
/** github 无此颜色需自行计算 */
num5: null,
},
/** 热力图方块的内边框颜色 */
borderColor: {
num0: null,
num1: null,

View File

@@ -1,12 +1,4 @@
const num = {
num1: null,
num2: null,
num3: null,
num4: null,
num5: null,
num6: null,
num7: null,
};
const num = { num1: null, num2: null, num3: null, num4: null, num5: null, num6: null, num7: null };
const alpha = {
num10: null,
@@ -20,33 +12,12 @@ const alpha = {
num90: null,
};
export const primary = {
self: null,
contrast: null,
dark: num,
light: num,
alpha: alpha,
hover: null,
active: null,
};
export const primary = { self: null, contrast: null, dark: num, light: num, alpha: alpha, hover: null, active: null };
export const secondary = {
self: null,
dark: {
num8: null,
num9: null,
num10: null,
num11: null,
num12: null,
num13: null,
...num,
},
light: {
num1: null,
num2: null,
num3: null,
num4: null,
},
dark: { num8: null, num9: null, num10: null, num11: null, num12: null, num13: null, ...num },
light: { num1: null, num2: null, num3: null, num4: null },
alpha: alpha,
button: null,
hover: null,

View File

@@ -1,32 +1,8 @@
const msg = {
bg: null,
border: null,
text: null,
};
const msg = { bg: null, border: null, text: null };
const error = {
...msg,
bg: {
self: null,
active: null,
hover: null,
},
};
const error = { ...msg, bg: { self: null, active: null, hover: null } };
const success = { ...msg };
const warning = { ...msg };
const info = { ...msg };
const success = {
...msg,
};
const warning = {
...msg,
};
const info = {
...msg,
};
export const message = {
error,
success,
warning,
info,
};
export const message = { error, success, warning, info };

View File

@@ -1,11 +1,4 @@
const baseColor = {
self: null,
light: null,
dark: {
num1: null,
num2: null,
},
};
const baseColor = { self: null, light: null, dark: { num1: null, num2: null } };
const commitColor = {
/** 提交哈希值颜色 */
@@ -23,26 +16,14 @@ const commitColor = {
export const named = {
/** 红色/提交警告签名颜色 */
red: {
...commitColor,
...baseColor,
},
red: { ...commitColor, ...baseColor },
/** 橙色/提交未匹配签名颜色 */
orange: {
...commitColor,
...baseColor,
},
orange: { ...commitColor, ...baseColor },
/** 黄色/提交未信任签名颜色 */
yellow: {
...commitColor,
...baseColor,
},
yellow: { ...commitColor, ...baseColor },
olive: baseColor,
/** 绿色/提交信任签名颜色 */
green: {
...commitColor,
...baseColor,
},
green: { ...commitColor, ...baseColor },
teal: baseColor,
blue: baseColor,
violet: baseColor,
@@ -50,10 +31,7 @@ export const named = {
pink: baseColor,
brown: baseColor,
black: baseColor,
grey: {
self: null,
light: null,
},
grey: { self: null, light: null },
gold: null,
white: null,
};

View File

@@ -8,9 +8,7 @@ function varMapper(prefix: string | null = null) {
path = path.map(item => item.replace(/^num/, ""));
value = path.join("-");
}
if (prefix) {
value = `${prefix}-${value}`;
}
if (prefix) value = `${prefix}-${value}`;
return value;
};
}
@@ -32,26 +30,13 @@ const vars = {
github: color.github,
};
const otherVars = {
border: {
radius: null,
},
color: {
...color.otherAuto,
},
};
const otherVars = { border: { radius: null }, color: { ...color.otherAuto } };
const customVars = {
cloneMenuWidth: "clone-menu-width",
explore: {
repolistColumns: "explore-repolist-columns",
userlistColumns: "explore-userlist-columns",
},
explore: { repolistColumns: "explore-repolist-columns", userlistColumns: "explore-userlist-columns" },
userRepolistColumns: "user-repolist-columns",
org: {
repolistColumns: "org-repolist-columns",
userlistColumns: "org-userlist-columns",
},
org: { repolistColumns: "org-repolist-columns", userlistColumns: "org-userlist-columns" },
};
export const themeVars = createGlobalThemeContract(vars, varMapper());

View File

@@ -203,7 +203,7 @@ export const actionViewRight = css`
.job-info-header {
padding: 16px 12px 16px 24px;
height: auto;
height: 80px;
.job-info-header-title {
color: ${themeVars.github.fgColor.accent};
@@ -220,6 +220,11 @@ export const actionViewRight = css`
color: ${themeVars.color.console.fg.subtle};
padding: 8px 10px;
&.selected {
// 滚动时固定在顶部的高度与 job-info-header 高度相同
top: 80px;
}
&.step-expandable:hover {
color: ${themeVars.color.console.fg.subtle};
}

View File

@@ -1,15 +1,66 @@
import { css } from "src/types/vars";
import { css, otherThemeVars, themeVars } from "src/types/vars";
export const dashboard = css`
.page-content.dashboard {
// 动态的右侧 svg 图标
.flex-item .flex-item-trailing svg {
height: 20px;
width: 20px;
}
// 仓库列表的仓库/组织切换按钮
.ui.two.item.menu {
background-color: unset;
box-shadow: ${themeVars.github.shadow.floating.small};
border: unset;
border-radius: 12px;
margin-bottom: 8px;
> .item {
&:first-child {
border-radius: 12px 0 0 12px;
}
&:last-child {
border-radius: 0 12px 12px 0;
}
}
}
// 仓库/组织列表标题
.ui.top.attached.header {
border: 0;
font-size: 20px;
font-weight: 400;
background-color: unset !important;
margin-bottom: 0.25rem;
}
// 仓库/组织列表
.ui.attached.segment {
background-color: ${themeVars.color.menu};
border: unset !important;
box-shadow: ${themeVars.github.shadow.floating.small};
&.repos-search {
border-top-left-radius: 12px;
border-top-right-radius: 12px;
}
&.table {
&:last-child {
border-bottom-left-radius: 12px !important;
border-bottom-right-radius: 12px !important;
}
ul {
padding: 8px;
li {
border-radius: ${otherThemeVars.border.radius};
&:not(:last-child) {
border-bottom: 0;
}
&:hover {
background: ${themeVars.github.control.transparent.bgColor.hover};
}
a.muted:hover {
color: inherit;
text-decoration-line: none;
}
}
}
}
}
// 组织列表
.ui.tab.dashboard-orgs .ui.attached.segment.table {
border-top-left-radius: 12px;
border-top-right-radius: 12px;
}
}
`;

View File

@@ -0,0 +1,20 @@
import { css, themeVars } from "src/types/vars";
export const monaco = css`
.monaco-editor {
--vscode-editor-background: ${themeVars.color.body} !important;
--vscode-editorGutter-background: ${themeVars.color.body} !important;
.monaco-mouse-cursor-text {
font-size: 12px !important;
}
// 滚动时固定在顶部的行
.sticky-widget {
background: ${themeVars.color.body} !important;
box-shadow: 0 1px 0 ${themeVars.color.secondary.self} !important;
width: 100% !important;
.sticky-line-content {
font-size: 12px !important;
}
}
}
`;

View File

@@ -13,7 +13,8 @@ export const repoList = css`
.page-content.user.profile > .ui.container > .ui.stackable > .ui.twelve,
// 探索
.page-content.explore.repositories > .ui.container {
> .flex-list {
// 排除用户的公开活动页
> .flex-list:not(#activity-feed) {
display: grid;
> .flex-item {
border: 1px solid ${themeVars.color.light.border};
@@ -37,10 +38,6 @@ export const repoList = css`
&:not(a) {
color: ${themeVars.color.text.light.num1};
}
// 仓库类型和状态标签
> .label-list .label {
padding: 3px 6px;
}
}
// 仓库语言, 星标
> .flex-item-trailing {
@@ -77,7 +74,8 @@ export const repoList = css`
gap: min(${orgRepoVar} * 8px, 16px);
}
// 用户
.page-content.user.profile > .ui.container > .ui.stackable > .ui.twelve > .flex-list {
// 排除用户的公开活动页
.page-content.user.profile > .ui.container > .ui.stackable > .ui.twelve > .flex-list:not(#activity-feed) {
grid-template-columns: repeat(${userRepoVar}, 1fr);
gap: min(${userRepoVar} * 8px, 16px);
}
@@ -111,7 +109,6 @@ export const userList = css`
// 用户标签
> .label {
font-size: 12px;
padding: 3px 6px;
}
}
// 用户描述
@@ -152,7 +149,8 @@ export const mobileList = css`
.page-content.organization.members >.ui.container,
// 探索的用户和组织列表
.page-content.explore.users >.ui.container {
> .flex-list {
// 排除用户的公开活动页
> .flex-list:not(#activity-feed) {
grid-template-columns: 1fr;
gap: 8px;
}

View File

@@ -1,4 +1,4 @@
import { css, themeVars } from "src/types/vars";
import { css, otherThemeVars, themeVars } from "src/types/vars";
// 文件列表页面下的分支按钮
export const branchButton = css`
@@ -75,6 +75,7 @@ export const repoFiles = css`
// 文件列表
.repo-file-item {
.repo-file-cell {
height: 40px;
&.name {
display: flex;
align-items: center;
@@ -87,6 +88,39 @@ export const repoFiles = css`
}
}
}
#readme {
.file-header {
background: ${themeVars.color.body};
svg {
color: ${themeVars.color.text.light.num1};
}
.file-header-left {
padding: 6px 8px !important;
&:hover {
background: ${themeVars.github.control.transparent.bgColor.hover};
border-radius: ${otherThemeVars.border.radius};
}
&:after {
content: "";
background: ${themeVars.github.underlineNav.borderColor.active};
border-radius: ${otherThemeVars.border.radius};
bottom: 0;
height: 2px;
position: absolute;
left: 12px;
width: 113px;
}
a.muted:hover {
color: inherit;
text-decoration-line: none;
}
}
.file-header-right:hover {
background: ${themeVars.github.control.transparent.bgColor.hover};
border-radius: ${otherThemeVars.border.radius};
}
}
}
}
`;
@@ -113,12 +147,66 @@ export const repoFilesMobile = css`
// 仓库打开文件时的视图
export const repoFileView = css`
.page-content.repository.file.list {
> .ui.container.fluid {
max-width: calc(100% - calc(2 * 16px));
}
.repo-view-container {
// 左侧文件树
.repo-view-file-tree-container {
height: 100vh;
position: sticky;
top: 0;
&:after {
content: "";
position: absolute;
top: -14px;
right: 0;
width: 1px;
height: calc(100% + 14px);
background: ${themeVars.color.secondary.self};
}
> .repo-button-row {
height: 32px;
margin: 16px 0;
&:after {
content: "";
position: absolute;
top: 32px + 32px;
left: -16px;
width: calc(100% + 16px);
height: 1px;
background: ${themeVars.color.secondary.self};
}
}
}
// 右侧文件视图内容
.repo-view-content {
.repo-button-row {
align-items: center;
background: ${themeVars.color.box.header};
border: 1px solid ${themeVars.color.secondary.self};
border-radius: ${otherThemeVars.border.radius};
height: 46px;
min-height: 46px;
padding: 8px;
position: sticky;
top: 0;
z-index: 1;
}
.non-diff-file-content {
// 避免分支菜单遮挡
position: relative;
z-index: 0;
h4.file-header {
position: sticky;
top: 46px;
z-index: 1;
}
}
// 头部提交信息
#repo-file-commit-box {
.ui.segment#repo-file-commit-box {
padding: 8px 12px;
margin-bottom: 8px !important;
> .latest-commit {
gap: 8px;
}
@@ -133,6 +221,24 @@ export const repoFileView = css`
}
`;
// 避免手机/平板下路径容器过长导致换行, 取消固定
export const repoFileViewMobile = css`
@media (max-width: 1023.98px) {
.page-content.repository.file.list .repo-view-container .repo-view-content {
.repo-button-row {
height: auto;
position: static;
z-index: 0;
}
.non-diff-file-content {
h4.file-header {
top: 0;
}
}
}
}
`;
// 仓库代码布局调整, 侧边栏宽度调整
export const repoGrid = css`
.repo-grid-filelist-sidebar {

View File

@@ -1,50 +1,88 @@
import { css, themeVars } from "src/types/vars";
import { css, otherThemeVars, themeVars } from "src/types/vars";
export const heatmap = css`
.vch__container {
// 覆盖热力图和图例的背景色
.vch__day__square,
.vch__legend__wrapper rect {
// 圆角
rx: 2.5px;
ry: 2.5px;
// hover 时的圆角
border-radius: 0.75px;
// 宽度和高度可以用来控制间隔
width: 9px;
height: 9px;
// 边框
outline: 0.5px solid ${themeVars.github.contribution.default.borderColor.num0};
// 边框向内偏移
outline-offset: -0.5px;
#user-heatmap {
.total-contributions {
left: 25px + 20px;
bottom: 0 + 12px;
}
.total-contributions,
.vch__legend-right {
color: ${themeVars.color.text.light.num1};
}
.vch__container {
padding: 12px 20px;
border: 1px solid ${themeVars.color.secondary.self};
border-radius: ${otherThemeVars.border.radius};
// 覆盖热力图和图例的背景色
.vch__day__square,
.vch__legend__wrapper rect {
// 圆角
rx: 2.5px;
ry: 2.5px;
// hover 时的圆角
border-radius: 0.75px;
// 宽度和高度可以用来控制间隔
width: 9px;
height: 9px;
// 边框
outline: 0.5px solid ${themeVars.github.contribution.default.borderColor.num0};
// 边框向内偏移
outline-offset: -0.5px;
&[style="fill: var(--color-secondary-alpha-60);"] {
fill: ${themeVars.github.contribution.default.bgColor.num0} !important;
}
&[style="fill: var(--color-secondary-alpha-60);"] {
fill: ${themeVars.github.contribution.default.bgColor.num0} !important;
}
&[style="fill: var(--color-primary-light-4);"] {
fill: ${themeVars.github.contribution.default.bgColor.num1} !important;
outline-color: ${themeVars.github.contribution.default.borderColor.num1};
}
&[style="fill: var(--color-primary-light-4);"] {
fill: ${themeVars.github.contribution.default.bgColor.num1} !important;
outline-color: ${themeVars.github.contribution.default.borderColor.num1};
}
&[style="fill: var(--color-primary-light-2);"] {
fill: ${themeVars.github.contribution.default.bgColor.num2} !important;
outline-color: ${themeVars.github.contribution.default.borderColor.num2};
}
&[style="fill: var(--color-primary-light-2);"] {
fill: ${themeVars.github.contribution.default.bgColor.num2} !important;
outline-color: ${themeVars.github.contribution.default.borderColor.num2};
}
&[style="fill: var(--color-primary);"] {
fill: ${themeVars.github.contribution.default.bgColor.num3} !important;
outline-color: ${themeVars.github.contribution.default.borderColor.num3};
}
&[style="fill: var(--color-primary);"] {
fill: ${themeVars.github.contribution.default.bgColor.num3} !important;
outline-color: ${themeVars.github.contribution.default.borderColor.num3};
}
&[style="fill: var(--color-primary-dark-2);"] {
fill: ${themeVars.github.contribution.default.bgColor.num4} !important;
outline-color: ${themeVars.github.contribution.default.borderColor.num4};
}
&[style="fill: var(--color-primary-dark-2);"] {
fill: ${themeVars.github.contribution.default.bgColor.num4} !important;
outline-color: ${themeVars.github.contribution.default.borderColor.num4};
}
&[style="fill: var(--color-primary-dark-4);"] {
fill: ${themeVars.github.contribution.default.bgColor.num5} !important;
outline-color: ${themeVars.github.contribution.default.borderColor.num5};
&[style="fill: var(--color-primary-dark-4);"] {
fill: ${themeVars.github.contribution.default.bgColor.num5} !important;
outline-color: ${themeVars.github.contribution.default.borderColor.num5};
}
}
}
}
`;
// 动态
export const activity = css`
#activity-feed {
.flex-item {
gap: 12px;
padding: 16px 0;
&:first-child {
padding-top: 6px;
}
> .flex-item-main {
gap: 8px !important;
relative-time {
color: ${themeVars.color.text.light.num1};
}
}
// 动态的右侧 svg 图标
.flex-item-trailing svg {
height: 20px;
width: 20px;
}
}
}

View File

@@ -8,6 +8,11 @@ import "./filelist";
import "./heatmap";
import "./issue";
import "./newrepo";
import "./org";
import "./release";
import "./repo";
import "./setting";
import "./signin";
import "./user";
import "./chroma";
import "./editor"

View File

@@ -1,6 +1,115 @@
import { css, otherThemeVars, themeVars } from "src/types/vars";
import { activeItemAfterStyle } from "styles/public/menu";
// 工单&PR 列表
export const issueList = css`
.page-content.repository.issue-list {
// 头部筛选菜单栏
.issue-list-toolbar {
align-items: center;
align-content: center;
background-color: ${themeVars.color.box.header};
border: 1px solid ${themeVars.color.light.border};
border-bottom: 0;
border-top-left-radius: ${otherThemeVars.border.radius};
border-top-right-radius: ${otherThemeVars.border.radius};
height: 48px;
padding: 8px;
.issue-list-toolbar-left {
// 复选框
input {
margin: 0 8px !important;
}
> .ui.compact.menu {
align-items: center;
border: 0;
> .item {
background: unset !important;
border-radius: ${otherThemeVars.border.radius};
color: ${themeVars.color.text.light.num1};
padding: 0px 8px;
height: 30px;
&:before {
display: none;
}
&:hover {
background: ${themeVars.github.control.transparent.bgColor.hover} !important;
}
&.active {
color: ${themeVars.color.text.self};
font-weight: 700;
}
}
}
}
.issue-list-toolbar-right > .ui.menu {
align-items: center;
> .item {
color: ${themeVars.color.text.light.num1};
}
> .ui.button {
padding: 0 12px;
height: 32px;
}
}
}
// Issue 列表
.flex-list#issue-list {
border: 1px solid ${themeVars.color.light.border};
border-bottom-left-radius: ${otherThemeVars.border.radius};
border-bottom-right-radius: ${otherThemeVars.border.radius};
> .flex-item {
align-items: center;
padding: 0;
&:last-child {
border-bottom-left-radius: ${otherThemeVars.border.radius};
border-bottom-right-radius: ${otherThemeVars.border.radius};
}
&:hover {
background-color: ${themeVars.color.hover.opaque};
}
> .flex-item-icon {
display: flex;
gap: 4px;
margin-left: 8px;
// 复选框
input {
background: unset;
margin-top: 14px;
margin-left: 8px;
margin-right: 8px !important;
}
svg {
margin-top: 14px;
}
}
> .flex-item-main {
gap: 4px;
.flex-item-header {
padding-top: 8px;
}
.flex-item-body {
font-size: 12px;
padding-bottom: 8px;
}
}
> .flex-item-trailing {
margin-right: 32px;
}
}
}
}
`;
// 避免手机/平板下菜单错位
export const issueListMobile = css`
@media (max-width: 1023.98px) {
.page-content.repository.issue-list .issue-list-toolbar {
height: auto;
}
}
`;
export const button = css`
.issue-content-left .field.footer {
// 关闭工单按钮
@@ -18,6 +127,11 @@ export const button = css`
color: ${themeVars.github.fgColor.success};
}
}
// 工单&PR标题右侧按钮
.repository.view.issue .issue-title-buttons > .ui.button {
padding: 0 12px;
height: 32px;
}
`;
export const babel = css`
@@ -103,6 +217,7 @@ export const comment = css`
}
.comment-header {
padding: 4px 4px 4px 16px;
min-height: 38px;
}
.comment-header-right {
> .item,
@@ -330,3 +445,111 @@ export const timeline = css`
}
}
`;
const sidebarPadding = {
padding: "4px 8px",
};
// 侧边栏
export const issueSidebar = css`
.issue-content {
gap: 24px;
.issue-content-right {
border: 0;
font-size: 12px;
padding: 0;
.ui.button {
font-size: 12px;
}
.ui.form,
a.fixed-text.muted,
span.text,
// 列表项为空时的文字
span.item.empty-list,
p {
color: ${themeVars.color.text.light.num1};
font-size: 12px;
}
.ui.dropdown.select-branch,
.ui.form,
a.fixed-text.muted,
span.text,
.ui.watching > div,
.ui.depending > div,
.flex-text-block,
.ui.list,
p {
${sidebarPadding};
}
.issue-sidebar-combo {
.ui.dropdown > a.fixed-text.muted {
align-items: center;
border-radius: ${otherThemeVars.border.radius};
text-decoration-line: none;
height: 28px;
&:hover {
background: ${themeVars.github.control.transparent.bgColor.hover};
}
}
.ui.list {
margin-top: 0 !important;
margin-bottom: 0 !important;
}
}
// 时间追踪
> div:not([class]):not([id]) > .ui.dropdown.jump > a.fixed-text.muted {
align-items: center;
border-radius: ${otherThemeVars.border.radius};
text-decoration-line: none;
height: 28px;
&:hover {
background: ${themeVars.github.control.transparent.bgColor.hover};
}
}
// 选中日期颜色
.ui.form .due-date {
color: ${themeVars.color.text.self};
}
.divider {
margin: 12px 0 12px 8px;
width: calc(100% - 16px);
}
// 订阅按钮
.ui.watching .ui.button {
padding: 0px 8px;
height: 28px;
svg {
margin: 0 !important;
}
}
// PIN 按钮
.form-fetch-action.single-button-form .ui.button,
// 底部操作按钮
.ui.show-modal.button {
border: 0;
background: unset;
font-weight: 400;
${sidebarPadding};
// 好像是浏览器 BUG, 最后不生效, 必须 !important
margin: 0 !important;
justify-content: left;
&:hover {
background: ${themeVars.github.control.transparent.bgColor.hover};
}
}
.ui.show-modal.button[data-modal="#sidebar-delete-issue"] {
color: ${themeVars.color.red.self};
svg {
color: ${themeVars.color.red.self};
}
&:hover {
background-color: ${themeVars.color.red.badge.bg};
color: ${themeVars.color.red.light};
svg {
color: ${themeVars.color.red.light};
}
}
}
}
}
`;

21
styles/components/org.ts Normal file
View File

@@ -0,0 +1,21 @@
import { css, themeVars } from "src/types/vars";
export const org = css`
.page-content.organization {
#org-info {
.ui.header {
// 组织页面的 RSS 订阅按钮
.ui.label.button {
padding: 4px 16px;
.svg {
width: 20px;
min-width: 20px;
}
&:hover {
border-color: ${themeVars.color.light.border};
}
}
}
}
}
`;

View File

@@ -76,33 +76,3 @@ export const label = css`
}
}
`;
// 设置右面板的内容
export const content = css`
.user-main-content,
.repo-setting-content,
.user-setting-content,
.org-setting-content,
.admin-setting-content {
.ui.top.attached.header {
border: 0;
font-size: 1.5rem;
font-weight: 400;
background-color: unset !important;
margin-bottom: 0.25rem;
}
.ui.attached.segment {
background-color: unset;
border-radius: 0.5rem !important;
}
.ui.attached.segment:not(.error) {
border: 1px solid ${themeVars.color.light.border} !important;
}
.ui.attached.segment.error {
border: 1px solid ${themeVars.color.error.border} !important;
}
}
`;

View File

@@ -0,0 +1,49 @@
import { css } from "src/types/vars";
// 注册/登录界面
export const signIn = css`
.page-content.user.signin {
.ui.grid > .column {
width: 384px;
padding: 16px;
> .ui.container {
max-width: unset;
}
}
.ui.top.attached.header {
border: 0;
font-size: 20px;
font-weight: 600;
background-color: unset !important;
padding: 16px;
}
.ui.attached.segment {
border: 0;
padding: 16px 0 0 0;
.field:not(.inline) {
label {
font-size: 14px;
font-weight: 600;
}
input {
background: unset;
padding: 5px 12px;
height: 40px;
font-size: 16px;
}
}
.button {
height: 40px;
}
}
.ui.top.attached.header.segment {
font-size: 14px;
font-weight: 400;
gap: 16px;
.signin-passkey {
font-weight: 500;
}
}
}
`;

62
styles/components/user.ts Normal file
View File

@@ -0,0 +1,62 @@
import { css, themeVars } from "src/types/vars";
// 用户点星仓库列表
export const stars = css`
.page-content.user.profile {
.stars {
> .flex-list {
> .flex-item {
padding: 24px 0;
&:first-child {
padding-top: 14px;
}
// 仓库头像
> .flex-item-leading {
img,
svg {
color: ${themeVars.color.text.light.num1};
}
}
// 仓库信息
> .flex-item-main {
// 仓库标题
> .flex-item-header {
// 仓库名称
> .flex-item-title {
font-size: 20px;
gap: 8px;
// 仓库中间的间隔线
&:not(a) {
color: ${themeVars.color.primary.self};
}
}
// 仓库语言, 星标
> .flex-item-trailing {
color: ${themeVars.color.text.light.num1};
gap: 16px;
font-size: 12px;
> .flex-text-inline .color-icon {
width: 12px;
height: 12px;
margin-right: 0 !important;
}
}
}
// 描述和更新时间
> .flex-item-body {
margin-top: 10px;
// 更新时间
&:last-child {
font-size: 12px;
}
}
// 主题标签
> .label-list {
margin-top: 10px;
}
}
}
}
}
}
`;

36
styles/public/attached.ts Normal file
View File

@@ -0,0 +1,36 @@
import { css, themeVars, otherThemeVars } from "src/types/vars";
export const attached = css`
// 设置右面板的内容
.user-main-content,
.repo-setting-content,
.user-setting-content,
.org-setting-content,
.admin-setting-content,
// 新建页面内容
.page-content.repository.new-repo,
.page-content.repository.new.migrate,
.page-content.repository.new.fork,
.page-content.organization.new.org {
.ui.top.attached.header {
border: 0;
font-size: 20px;
font-weight: 400;
background-color: unset !important;
margin-bottom: 0.25rem;
}
.ui.attached.segment {
background-color: unset;
border-radius: ${otherThemeVars.border.radius} !important;
}
.ui.attached.segment:not(.error) {
border: 1px solid ${themeVars.color.light.border} !important;
}
.ui.attached.segment.error {
border: 1px solid ${themeVars.color.error.border} !important;
}
}
`;

View File

@@ -120,6 +120,10 @@ export const selectionDropdown = css`
${activeItemAfterStyle};
}
}
// 修复顶部导航栏工单管理/请求合并页面搜索框旁的选择下拉框按钮内容过窄
.list-header-search .ui.action.input > .dropdown.small {
padding: 8px 40px 8px 16px;
}
// 发布版本页面的分支按钮, 覆盖 Gitea 的样式, 避免按钮元素高度不一致
.repository.new.release .target .selection.dropdown {
padding-top: 8px;

View File

@@ -5,7 +5,6 @@ import "./radius"; // 圆角, 此样式为基础样式, 确保在其他样式之
import "./transition"; // 过渡效果
import "./text"; // 文本或 SVG 的基本颜色
import "./button"; // 按钮
import "./chroma"; // 代码高亮
import "./dropdown"; // 下拉框
import "./input"; // 输入框
import "./label"; // 标签
@@ -13,3 +12,4 @@ import "./menu"; // 菜单
import "./modal"; // 弹窗
import "./tippy"; // 提示框
import "./navbar"; // 导航栏
import "./attached"; // 附加样式

View File

@@ -166,12 +166,19 @@ export const taskStatusLabel = css`
// 仓库标签 (私有/公开/内部)
export const repoLabel = css`
span,
// 用户切换面板的标签
.org-visibility div {
&.ui.basic.label {
background-color: unset;
color: ${themeVars.color.text.light.num1};
font-size: 12px;
font-weight: 500;
padding: 3px 6px;
}
}
.org-visibility span.ui.basic.label {
font-size: 14px;
}
`;
// 软件包列表

View File

@@ -193,3 +193,46 @@ export const secondaryMenu = css`
}
}
`;
// 分页菜单
export const paginationMenu = css`
.ui.borderless.pagination.menu {
align-items: center;
background-color: unset;
border: 0;
gap: 4px;
.item {
border-radius: ${otherThemeVars.border.radius};
min-width: 32px;
min-height: 32px;
height: 32px;
justify-content: center;
// 避免一些 hover 效果调整内容
padding: 5px 10px !important;
&.active {
background: ${themeVars.github.bgColor.accent.emphasis};
color: ${themeVars.color.white};
}
// 设置透明边框线避免 hover 时元素大小变化
&:not(.active) {
border: 1px solid #ffffff00;
&:hover {
background: unset;
border-color: ${themeVars.color.secondary.self};
}
}
&.navigation {
&:not(.disabled) {
span,
svg {
color: ${themeVars.color.primary.self};
}
}
// 对齐文字
svg {
margin-top: 2px;
}
}
}
}
`;

View File

@@ -77,14 +77,27 @@ export const navbarRight = css`
left: 22px;
}
}
// 通知和计时器的圆点
a.item {
.notification_count,
.header-stopwatch-dot {
background-color: ${themeVars.github.bgColor.accent.emphasis};
border-radius: 25px;
color: ${themeVars.color.white};
font-size: 8px;
font-weight: 600;
top: -14px;
left: 12px;
}
}
}
}
// 手机下的创建菜单按钮
@media (max-width: 767.98px) {
#navbar .navbar-right > .item:not(:last-child) {
#navbar .navbar-right:has(.user-menu) > .item:not(:last-child) {
display: none;
}
#navbar.navbar-menu-open .navbar-right > .item:not(:last-child) {
#navbar.navbar-menu-open .navbar-right:has(.user-menu) > .item:not(:last-child) {
display: grid;
}
}

View File

@@ -2,6 +2,18 @@ import { css } from "src/types/vars";
// 简单的渐变过渡
export const transition = css`
// 差异对比的代码折叠按钮
.code-expander-button,
// 仓库 README 头部的按钮
.file-header-left,
.file-header-right,
// 仪表板仓库列表
.ui.attached.segment.table ul li,
// Issue 列表
.issue-list-toolbar .item,
.flex-list#issue-list > .flex-item,
// 分页菜单
.ui.borderless.pagination.menu .item,
// 迁移的元素
#navbar .item,
.header-wrapper .ui.tabular.menu .item,
@@ -9,8 +21,6 @@ export const transition = css`
.job-step-logs,
.job-brief-item,
.repo-file-cell,
// 差异对比的代码折叠按钮
.code-expander-button,
.tippy-box .flex-items-block .item,
.clone-panel-tab .item,
.ui.form select,