Compare commits
	
		
			31 Commits
		
	
	
		
			v1.24.4.25
			...
			1b81b6ad93
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|   | 1b81b6ad93 | ||
|   | 62bc2afa2a | ||
|   | 60e873b0e0 | ||
|   | 00737f5203 | ||
|   | a90b72896b | ||
|   | f90c488d45 | ||
|   | 56c284aec2 | ||
|   | 0df107a166 | ||
|   | c5c1ca4a6b | ||
|   | 6bbc304a7c | ||
|   | 5c95add059 | ||
|   | 2efaeead6b | ||
|   | 29122e946c | ||
|   | 81be016be3 | ||
|   | 2ffdf501b3 | ||
|   | 9f2e5df49c | ||
|   | 00eda68f00 | ||
|   | fc4e6f43bb | ||
|   | 1f01495a10 | ||
|   | eae2961989 | ||
|   | 563c20f2cc | ||
|   | 058e1b89ee | ||
|   | c431fbadb4 | ||
|   | 74254a3f80 | ||
|   | 8118706706 | ||
|   | ffbfccd7dc | ||
|   | 1d8dfdb82b | ||
|   | 11422f3b05 | ||
|   | cca5e4e435 | ||
|   | 780c72919d | ||
|   | dc4eff2bd7 | 
| @@ -1,4 +1,8 @@ | ||||
| # 开发模式下编译的主题 (开发模式仅编译单个主题) | ||||
| DEV_THEME=dark | ||||
| # 把编译后的主题上传到服务器的服务器名称, 通过 SCP 上传 | ||||
| SSH_SERVER=localhost | ||||
| # 上传到服务器的用户名称, 不支持密码, 请确保有 SSH 免密登录权限 | ||||
| SSH_USER=root | ||||
| # 上传到服务器的主题路径, 请使用绝对路径 | ||||
| GITEA_THEME_PATH=/data/gitea/public/assets/css/ | ||||
							
								
								
									
										24
									
								
								.github/release.md
									
									
									
									
										vendored
									
									
								
							
							
						
						| @@ -1,21 +1,27 @@ | ||||
| ## ✨ Feature | ||||
|  | ||||
| - 支持自动颜色主题 (跟随系统) | ||||
| - 支持亮色主题 | ||||
| - 支持柔和的暗色主题 (dark-dimmed) | ||||
|  | ||||
| ## 🌈 Style | ||||
|  | ||||
| #### 更符合 GitHub 风格 | ||||
|  | ||||
| - 同步查看文件内容时的代码高亮色 (由于词法分析器的差异和解析问题, 只能实现大概相似, 目前观察到在 TypeScript 下词法分析器表现非常糟糕) | ||||
| - 同步仓库代码文件页 README 导航栏样式 | ||||
| - 同步分页菜单样式 | ||||
| - 同步登录/注册页面样式 | ||||
| - 优化热力图和动态样式 | ||||
| - 优化仪表板仓库/组织列表样式 | ||||
| - 优化私有标签样式, 组织页面下的 RSS 订阅按钮样式 | ||||
| - 同步用户点星仓库列表样式 | ||||
| - 同步 Issue/PR 详细页面侧边栏样式 | ||||
|  | ||||
| ## 🎈 Perf | ||||
|  | ||||
| - 优化差异对比的代码折叠/展开按钮的高度和动画效果 | ||||
| - 略微增加仓库代码文件列表的单行高度与 GitHub 一致 | ||||
| - 优化创建仓库/派生仓库/迁移仓库/创建组织页面的样式与设置页面的样式一致 | ||||
| - 优化消息右上角小图标样式 | ||||
|  | ||||
| ## 🐞 Fix | ||||
|  | ||||
| - 修复仓库页面与探索页面下仓库主题标签字重不一致的问题 | ||||
| - 修复发布页面下的分支按钮点击时高度变化问题 | ||||
| - 修复首页/登录页/注册页下导航栏右侧按钮样式问题 #10 | ||||
| - 修复 Action 作业步骤页面标题选中时滚动固定的高度问题 | ||||
| - 修复用户公开活动页动态布局问题 | ||||
| - 修复顶部导航栏工单管理/请求合并页面搜索框旁的选择下拉框按钮内容过窄 | ||||
| - 修复手机页面下注册/登录页导航栏注册按钮换行的问题 | ||||
|   | ||||
							
								
								
									
										160
									
								
								CONTRIBUTING.md
									
									
									
									
									
								
							
							
						
						| @@ -1,7 +1,159 @@ | ||||
| # 贡献指南 | ||||
|  | ||||
| ## 目录结构 | ||||
|  | ||||
| | 目录              | 说明                         | | ||||
| | ----------------- | ---------------------------- | | ||||
| | styles            | 元素 GitHub 风格             | | ||||
| | styles/components | 具体页面的元素单独风格       | | ||||
| | styles/public     | 适用大部分页面的元素默认风格 | | ||||
| | src               | 主题生成框架与辅助工具的包   | | ||||
| | src/core          | 主题生成框架                 | | ||||
| | src/functions     | 主题辅助工具                 | | ||||
| | src/types         | 主题的颜色变量定义           | | ||||
| | styles            | 主题样式                     | | ||||
| | styles/components | 具体页面的元素的样式         | | ||||
| | styles/public     | 基础元素或跨页面的元素的样式 | | ||||
| | themes            | 颜色主题                     | | ||||
| | themes/\<theme>   | 具体颜色主题自己的颜色或风格 | | ||||
|  | ||||
| ## 贡献说明 | ||||
|  | ||||
| 不推荐主题样式贡献, 因为 Gitea 主题最终是由单个 CSS 文件提供, 所以会有先后顺序覆盖, 样式影响广泛等问题. | ||||
|  | ||||
| 开发者每个人的思路不一样, 审核很难看出这些问题, 会极大增加维护难度. | ||||
|  | ||||
| 如果确定理解了 Gitea 的样式布局和我的思路, 请先提交 Issue 确认工作量和预期效果, 然后再开发提交 PR. | ||||
|  | ||||
| 如果认为有更好的思路, 欢迎提交 Issue. | ||||
|  | ||||
| > [!IMPORTANT] | ||||
| > | ||||
| > 提交 PR 时, 请执行 `npm run commit` | ||||
|  | ||||
| ## 开发环境 | ||||
|  | ||||
| 主题仅依赖于 Node.js 环境, 请确保你的环境中已经安装了 Node.js, 推荐使用 Node.js 20 或以上版本. | ||||
|  | ||||
| 请使用 VSCode 开发, 并安装仓库中推荐的插件. | ||||
|  | ||||
| 如果不喜欢多余的插件, 请务必安装 `vscode-styled-components` 插件, 此插件用于渲染和检查 TypeScript 中的 CSS 模板字符串. | ||||
|  | ||||
| 推荐使用 VSCode 1.102.0 版本以上开发, 此版本以上提供 TypeScript 代码中 16 进制颜色的支持. | ||||
|  | ||||
| ## 开发流程 | ||||
|  | ||||
| ### 安装依赖 | ||||
|  | ||||
| ```bash | ||||
| npm install | ||||
| ``` | ||||
|  | ||||
| ### 设置环境变量 | ||||
|  | ||||
| 在项目根目录下创建 `.env` 文件, 变量参考 `.env.example` 文件. | ||||
|  | ||||
| 环境变量用于发送编译后的主题到服务器上, 快速预览主题. | ||||
|  | ||||
| ### 编译主题 | ||||
|  | ||||
| 编译开发中的主题 | ||||
|  | ||||
| ```bash | ||||
| npm run dev | ||||
| ``` | ||||
|  | ||||
| 编译所有主题 | ||||
|  | ||||
| ```bash | ||||
| npm run build | ||||
| ``` | ||||
|  | ||||
| 格式化项目中的代码 | ||||
|  | ||||
| ```bash | ||||
| npm run format | ||||
| ``` | ||||
|  | ||||
| 用于 PR, 检查并编译项目中的所有代码并进行格式化 | ||||
|  | ||||
| ```bash | ||||
| npm run commit | ||||
| ``` | ||||
|  | ||||
| ## 开发规范 | ||||
|  | ||||
| `src`, `styles`, `themes` 为项目的主目录, 主目录下的第一个目录为模块. | ||||
|  | ||||
| 主目录或主目录下模块互相引用时, 请使用绝对路径, 例如 `import { defineTheme } from "src"` | ||||
|  | ||||
| 模块下的文件互相引用时, 请使用相对路径, 例如 `import { defineTheme } from "./theme"` | ||||
|  | ||||
| ## 颜色主题贡献 | ||||
|  | ||||
| 颜色主题名称格式: `主题名称-dark.css.ts` 或 `主题名称-light.css.ts`, 分别表示深色和亮色主题. | ||||
|  | ||||
| 如果主题有深色和亮色模式, 会自动生成自动颜色主题, 不需要手动添加. | ||||
|  | ||||
| 项目接受自定义主题并会附加到发布的版本中, 但项目所有者不参与维护和审核. | ||||
|  | ||||
| 请在颜色主题文件头部附加自己的作者信息, 方便 Issue 提问者找到你 `@`. | ||||
|  | ||||
| 推荐使用 `import { defineTheme } from "src"` 导入主题生成框架, 然后使用 `defineTheme` 函数生成主题, | ||||
| defineTheme 中设置了一些经过计算得到的 Gitea 变量可以减少工作量, 具体请查看函数说明. | ||||
|  | ||||
| 颜色计算函数可以从 `src/functions` 导入, 例如 `import { scaleColorLight } from "src/functions"`, 或者使用 `polished` 库. | ||||
|  | ||||
| 例: `themes/主题名称-dark.css.ts` | ||||
|  | ||||
| ```ts | ||||
| /** | ||||
|  * @author 你的名字 | ||||
|  * @description 主题描述 | ||||
|  */ | ||||
| import { defineTheme } from "src"; | ||||
| export default defineTheme({ | ||||
|   ... | ||||
| }); | ||||
| // 使用其他主题颜色作为基础 | ||||
| import dark from "themes/dark"; | ||||
| export default defineTheme({ | ||||
|   ...dark, | ||||
|   ... | ||||
| }); | ||||
| ``` | ||||
|  | ||||
| 如果不需要自定义代码高亮色, 则不传递 chroma 参数, 框架会自动根据主题的暗色或亮色生成代码高亮色. | ||||
|  | ||||
| 如果需要完全自定义每个 Gitea 变量, 请导入 `import type { Theme } from "src"` | ||||
|  | ||||
| 例: `themes/主题名称-dark.css.ts` | ||||
|  | ||||
| ```ts | ||||
| /** | ||||
|  * @author 你的名字 | ||||
|  * @description 主题描述 | ||||
|  */ | ||||
| import type { Theme } from "src"; | ||||
| export default theme: Theme = { | ||||
|  ... | ||||
| }; | ||||
| ``` | ||||
|  | ||||
| 完成主题颜色开发后, 请在某个仓库的代码文件列表页, 打开 Code 菜单选择 Tea Cli 进行截图, 并放入 `screenshots` | ||||
| 目录下, 截图名与主题名相同. (推荐克隆 Github 的 actions/checkout 仓库, 该仓库信息较全, 避免泄露个人隐私) | ||||
|  | ||||
| 然后将截图信息添加到 `README.md` 文件中, 可以在折叠部分中添加自己的说明. | ||||
|  | ||||
| ## 主题样式贡献 | ||||
|  | ||||
| 主题样式使用 TypeScript 的 css 模板字符串开发, 该模板字符串会经过 sass 预处理器处理, 支持 SCSS 语法并且主题只接受 SCSS 嵌套语法, 请不要使用 CSS 语法, 如果一定要用请说明原因. | ||||
|  | ||||
| 请尽量不要使用 SCSS 的函数, `vscode-styled-components` 插件会报错, 请使用 TypeScript 相关库处理, 比如主题自带的 | ||||
| `polished` 库. | ||||
|  | ||||
| 推荐需要使用复杂处理时, 提取逻辑到 `src/functions` 目录下的函数中, 然后在 `src/styles` 目录下的样式文件中使用. | ||||
|  | ||||
| 主题样式中使用到的所有颜色必须使用颜色变量, 颜色变量导入 `import { themeVars } from "src/types/vars"` | ||||
|  | ||||
| 涉及到主题自己的颜色变量 `${themeVars.github.xxx}`, 在使用时请将使用的文件和变量添加到对应变量的注释中 | ||||
| `src/types/color/github` | ||||
|  | ||||
| 小型圆角(6px)请使用全局圆角变量, 圆角变量导入 `import { otherThemeVars } from "src/types/vars"` | ||||
| `${otherThemeVars.border.radius}` | ||||
|   | ||||
							
								
								
									
										70
									
								
								README.md
									
									
									
									
									
								
							
							
						
						| @@ -1,13 +1,23 @@ | ||||
| # gitea-github-theme | ||||
|  | ||||
| 尽量保持与 GitHub 相同样式的 Gitea 主题 | ||||
| 一个精致模仿 Github 风格的 Gitea 主题 | ||||
|  | ||||
| ### 主题说明 | ||||
| > [!TIP] | ||||
| > | ||||
| > 推荐搭配文件图标浏览器插件一起使用更佳 | ||||
| > [web-file-explorer-icons](https://github.com/catppuccin/web-file-explorer-icons) | ||||
|  | ||||
| 添加了短暂的过渡动画优化体验(与 GitHub Code 克隆列表动画一致) | ||||
| ## 版本号说明 | ||||
|  | ||||
| 推荐搭配文件图标浏览器插件一起使用更佳 | ||||
| [github-file-explorer-icons](https://github.com/catppuccin/github-file-explorer-icons) | ||||
| 主题版本号格式: `Gitea 版本号.时间戳` | ||||
|  | ||||
| Gitea 版本号格式: `1.大版本号.小版本号` | ||||
|  | ||||
| Gitea 理论上小版本号变更不会修改前端布局, 所以主题的小版本号适用于所有 Gitea 大版本号相同的 Gitea 版本. | ||||
|  | ||||
| 比如: 主题版本 `1.24.4` 适用于 Gitea 版本 `>=1.24.0` ~ `<1.25.0` | ||||
|  | ||||
| 仅维护项目发布中的最新的 Gitea 版本, 其他旧版本主题不接受 Issue 和 PR. | ||||
|  | ||||
| ## 安装 | ||||
|  | ||||
| @@ -15,7 +25,10 @@ | ||||
| 2. 修改 `gitea/conf/app.ini`,并将 CSS 文件名去掉 `theme-` 的名称附加到 `[ui]` 下的 `THEMES` 末尾 | ||||
| 3. 重启 Gitea | ||||
| 4. 在设置中查看主题 | ||||
| 5. 自动颜色主题需要亮色和暗色的主题文件 | ||||
|  | ||||
| > [!IMPORTANT] | ||||
| > | ||||
| > 自动颜色主题需要亮色和暗色的主题文件 | ||||
|  | ||||
| 例: 主题文件名为 `theme-github-dark.css`,则添加 `github-dark` 到 `THEMES` 末尾 | ||||
|  | ||||
| @@ -29,6 +42,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 变量 | ||||
|  | ||||
| 可以根据自己的偏好自定义主题的一部分样式 | ||||
| @@ -54,8 +84,8 @@ THEMES = gitea-auto, gitea-light, gitea-dark, github-auto, github-light, github- | ||||
|  | ||||
| ### CSS 变量 | ||||
|  | ||||
| | 变量名                            | 描述                        | 默认值 | Github | 推荐  | 最小值 | 最大值 | | ||||
| | :-------------------------------- | :-------------------------- | :----- | :----- | :---- | :----- | :----- | | ||||
| | 变量名                            | 描述                        | 默认  | 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   |       |       | | ||||
| @@ -63,22 +93,22 @@ THEMES = gitea-auto, gitea-light, gitea-dark, github-auto, github-light, github- | ||||
| | --custom-org-repolist-columns     | 组织页面的仓库列表列数      | 1     | 1      | 1/2   |       |       | | ||||
| | --custom-org-userlist-columns     | 组织页面的用户列表列数      | 2     | 1      | 1/2   |       |       | | ||||
|  | ||||
| ## 截图 | ||||
| ## 使用开发中的主题 | ||||
|  | ||||
|  | ||||
| 也许你会想使用开发中的主题, 而不是发布的主题 | ||||
|  | ||||
|  | ||||
| 请确保你已经安装了 Node.js 环境, 推荐使用 Node.js 20 或以上版本 | ||||
|  | ||||
|  | ||||
| ```bash | ||||
| git clone https://github.com/lutinglt/gitea-github-theme.git | ||||
| cd gitea-github-theme | ||||
| npm install | ||||
| npm run build | ||||
| ``` | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| 编译完成后, 会在 `dist` 目录下生成主题文件, 你可以将主题文件放入 `gitea/public/assets/css` 目录下, 然后在 | ||||
| `gitea/conf/app.ini` 中添加主题名称到 `THEMES` 末尾 | ||||
|  | ||||
| ## 贡献 | ||||
|  | ||||
| 欢迎提交 Issue 或 Pull Request | ||||
| 请查看 [CONTRIBUTING](CONTRIBUTING.md) | ||||
|   | ||||
							
								
								
									
										11
									
								
								TODO.md
									
									
									
									
									
								
							
							
						
						| @@ -1,11 +1,6 @@ | ||||
| ### 重大 | ||||
|  | ||||
| - gitea issue 默认标签颜色匹配使用 github 样式 | ||||
| - gitea issue 暗色模式下默认标签颜色匹配使用 github 样式 | ||||
| - issue/PR 列表样式 github 布局 | ||||
| - styles/themes 库组件导出整理 | ||||
| - defineTheme 颜色生成代码重构 | ||||
|  | ||||
| ### 其他 | ||||
|  | ||||
| - README 更新/截图更新 | ||||
| - CONTRIBUTING 更新 | ||||
| - 色盲主题支持 | ||||
| - 打开文件时的文件导航树样式和滚动高度 | ||||
|   | ||||
							
								
								
									
										
											BIN
										
									
								
								screenshots/action.png
									
									
									
									
										vendored
									
									
								
							
							
						
						| Before Width: | Height: | Size: 109 KiB | 
							
								
								
									
										
											BIN
										
									
								
								screenshots/actions.png
									
									
									
									
										vendored
									
									
								
							
							
						
						| Before Width: | Height: | Size: 176 KiB | 
							
								
								
									
										
											BIN
										
									
								
								screenshots/commit.png
									
									
									
									
										vendored
									
									
								
							
							
						
						| Before Width: | Height: | Size: 394 KiB | 
							
								
								
									
										
											BIN
										
									
								
								screenshots/dark.png
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 202 KiB | 
							
								
								
									
										
											BIN
										
									
								
								screenshots/dispatch.png
									
									
									
									
										vendored
									
									
								
							
							
						
						| Before Width: | Height: | Size: 111 KiB | 
							
								
								
									
										
											BIN
										
									
								
								screenshots/file_list.png
									
									
									
									
										vendored
									
									
								
							
							
						
						| Before Width: | Height: | Size: 343 KiB | 
							
								
								
									
										
											BIN
										
									
								
								screenshots/light.png
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 201 KiB | 
							
								
								
									
										
											BIN
										
									
								
								screenshots/release.png
									
									
									
									
										vendored
									
									
								
							
							
						
						| Before Width: | Height: | Size: 187 KiB | 
							
								
								
									
										
											BIN
										
									
								
								screenshots/repo.png
									
									
									
									
										vendored
									
									
								
							
							
						
						| Before Width: | Height: | Size: 211 KiB | 
							
								
								
									
										
											BIN
										
									
								
								screenshots/soft-dark.png
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 202 KiB | 
							
								
								
									
										61
									
								
								src/core/chroma.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,61 @@ | ||||
| import { prettylights2Chroma } from "./prettylights"; | ||||
|  | ||||
| export const defaultDarkChroma = prettylights2Chroma({ | ||||
|   syntax: { | ||||
|     brackethighlighter: { angle: "#9198a1", unmatched: "#f85149" }, | ||||
|     carriage: { return: { bg: "#b62324", text: "#f0f6fc" } }, | ||||
|     comment: "#9198a1", | ||||
|     constant: "#79c0ff", | ||||
|     constantOtherReferenceLink: "#a5d6ff", | ||||
|     entity: "#d2a8ff", | ||||
|     entityTag: "#7ee787", | ||||
|     invalid: { illegal: { bg: "#8e1519", text: "#f0f6fc" } }, | ||||
|     keyword: "#ff7b72", | ||||
|     markup: { | ||||
|       bold: "#f0f6fc", | ||||
|       changed: { bg: "#5a1e02", text: "#ffdfb6" }, | ||||
|       deleted: { bg: "#67060c", text: "#ffdcd7" }, | ||||
|       heading: "#1f6feb", | ||||
|       ignored: { bg: "#1158c7", text: "#f0f6fc" }, | ||||
|       inserted: { bg: "#033a16", text: "#aff5b4" }, | ||||
|       italic: "#f0f6fc", | ||||
|       list: "#f2cc60", | ||||
|     }, | ||||
|     metaDiffRange: "#d2a8ff", | ||||
|     storageModifierImport: "#f0f6fc", | ||||
|     string: "#a5d6ff", | ||||
|     stringRegexp: "#7ee787", | ||||
|     sublimelinterGutterMark: "#3d444d", | ||||
|     variable: "#ffa657", | ||||
|   }, | ||||
| }); | ||||
|  | ||||
| export const defaultLightChroma = prettylights2Chroma({ | ||||
|   syntax: { | ||||
|     brackethighlighter: { angle: "#59636e", unmatched: "#82071e" }, | ||||
|     carriage: { return: { bg: "#cf222e", text: "#f6f8fa" } }, | ||||
|     comment: "#59636e", | ||||
|     constant: "#0550ae", | ||||
|     constantOtherReferenceLink: "#0a3069", | ||||
|     entity: "#6639ba", | ||||
|     entityTag: "#0550ae", | ||||
|     invalid: { illegal: { bg: "#82071e", text: "#f6f8fa" } }, | ||||
|     keyword: "#cf222e", | ||||
|     markup: { | ||||
|       bold: "#1f2328", | ||||
|       changed: { bg: "#ffd8b5", text: "#953800" }, | ||||
|       deleted: { bg: "#ffebe9", text: "#82071e" }, | ||||
|       heading: "#0550ae", | ||||
|       ignored: { bg: "#0550ae", text: "#d1d9e0" }, | ||||
|       inserted: { bg: "#dafbe1", text: "#116329" }, | ||||
|       italic: "#1f2328", | ||||
|       list: "#3b2300", | ||||
|     }, | ||||
|     metaDiffRange: "#8250df", | ||||
|     storageModifierImport: "#1f2328", | ||||
|     string: "#0a3069", | ||||
|     stringRegexp: "#116329", | ||||
|     sublimelinterGutterMark: "#818b98", | ||||
|     variable: "#953800", | ||||
|   }, | ||||
| }); | ||||
| @@ -2,7 +2,7 @@ import { rgba, saturate } from "polished"; | ||||
| import { scaleColorLight } from "src/functions"; | ||||
| import type { Ansi, Chroma, Console, Diff, Github, Message, Named, Other, Primary, Secondary } from "src/types"; | ||||
| import { themeVars } from "src/types/vars"; | ||||
| import { prettylightsDark, prettylightsLight } from "./prettylights"; | ||||
| import { defaultDarkChroma, defaultLightChroma } from "./chroma"; | ||||
| import type { Theme } from "./theme"; | ||||
|  | ||||
| type ThemeColor = { | ||||
| @@ -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 { | ||||
| @@ -341,7 +342,7 @@ export function defineTheme(themeColor: ThemeColor, chroma: Chroma | null = null | ||||
|  | ||||
|   return { | ||||
|     isDarkTheme: themeColor.isDarkTheme.toString(), | ||||
|     chroma: chroma || (themeColor.isDarkTheme ? prettylightsDark : prettylightsLight), | ||||
|     chroma: chroma || (themeColor.isDarkTheme ? defaultDarkChroma : defaultLightChroma), | ||||
|     color: { | ||||
|       primary, | ||||
|       secondary, | ||||
|   | ||||
| @@ -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 }; | ||||
|     }; | ||||
|   }; | ||||
| }; | ||||
|   | ||||
| @@ -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; | ||||
|     }; | ||||
| @@ -150,113 +125,3 @@ export function prettylights2Chroma(prettylights: prettylightsColor): Chroma { | ||||
|     }, | ||||
|   }; | ||||
| } | ||||
|  | ||||
| export const prettylightsDark = prettylights2Chroma({ | ||||
|   syntax: { | ||||
|     brackethighlighter: { | ||||
|       angle: "#9198a1", | ||||
|       unmatched: "#f85149", | ||||
|     }, | ||||
|     carriage: { | ||||
|       return: { | ||||
|         bg: "#b62324", | ||||
|         text: "#f0f6fc", | ||||
|       }, | ||||
|     }, | ||||
|     comment: "#9198a1", | ||||
|     constant: "#79c0ff", | ||||
|     constantOtherReferenceLink: "#a5d6ff", | ||||
|     entity: "#d2a8ff", | ||||
|     entityTag: "#7ee787", | ||||
|     invalid: { | ||||
|       illegal: { | ||||
|         bg: "#8e1519", | ||||
|         text: "#f0f6fc", | ||||
|       }, | ||||
|     }, | ||||
|     keyword: "#ff7b72", | ||||
|     markup: { | ||||
|       bold: "#f0f6fc", | ||||
|       changed: { | ||||
|         bg: "#5a1e02", | ||||
|         text: "#ffdfb6", | ||||
|       }, | ||||
|       deleted: { | ||||
|         bg: "#67060c", | ||||
|         text: "#ffdcd7", | ||||
|       }, | ||||
|       heading: "#1f6feb", | ||||
|       ignored: { | ||||
|         bg: "#1158c7", | ||||
|         text: "#f0f6fc", | ||||
|       }, | ||||
|       inserted: { | ||||
|         bg: "#033a16", | ||||
|         text: "#aff5b4", | ||||
|       }, | ||||
|       italic: "#f0f6fc", | ||||
|       list: "#f2cc60", | ||||
|     }, | ||||
|     metaDiffRange: "#d2a8ff", | ||||
|     storageModifierImport: "#f0f6fc", | ||||
|     string: "#a5d6ff", | ||||
|     stringRegexp: "#7ee787", | ||||
|     sublimelinterGutterMark: "#3d444d", | ||||
|     variable: "#ffa657", | ||||
|   } | ||||
| }) | ||||
|  | ||||
| export const prettylightsLight = prettylights2Chroma({ | ||||
|   syntax: { | ||||
|     brackethighlighter: { | ||||
|       angle: "#59636e", | ||||
|       unmatched: "#82071e", | ||||
|     }, | ||||
|     carriage: { | ||||
|       return: { | ||||
|         bg: "#cf222e", | ||||
|         text: "#f6f8fa", | ||||
|       }, | ||||
|     }, | ||||
|     comment: "#59636e", | ||||
|     constant: "#0550ae", | ||||
|     constantOtherReferenceLink: "#0a3069", | ||||
|     entity: "#6639ba", | ||||
|     entityTag: "#0550ae", | ||||
|     invalid: { | ||||
|       illegal: { | ||||
|         bg: "#82071e", | ||||
|         text: "#f6f8fa", | ||||
|       }, | ||||
|     }, | ||||
|     keyword: "#cf222e", | ||||
|     markup: { | ||||
|       bold: "#1f2328", | ||||
|       changed: { | ||||
|         bg: "#ffd8b5", | ||||
|         text: "#953800", | ||||
|       }, | ||||
|       deleted: { | ||||
|         bg: "#ffebe9", | ||||
|         text: "#82071e", | ||||
|       }, | ||||
|       heading: "#0550ae", | ||||
|       ignored: { | ||||
|         bg: "#0550ae", | ||||
|         text: "#d1d9e0", | ||||
|       }, | ||||
|       inserted: { | ||||
|         bg: "#dafbe1", | ||||
|         text: "#116329", | ||||
|       }, | ||||
|       italic: "#1f2328", | ||||
|       list: "#3b2300", | ||||
|     }, | ||||
|     metaDiffRange: "#8250df", | ||||
|     storageModifierImport: "#1f2328", | ||||
|     string: "#0a3069", | ||||
|     stringRegexp: "#116329", | ||||
|     sublimelinterGutterMark: "#818b98", | ||||
|     variable: "#953800", | ||||
|   } | ||||
| }) | ||||
| @@ -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: { | ||||
|   | ||||
| @@ -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})`; | ||||
|   | ||||
| @@ -1,3 +1,4 @@ | ||||
| export { defineTheme } from "./core/color"; | ||||
| export type { 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"; | ||||
|   | ||||
| @@ -29,6 +29,7 @@ export const github = { | ||||
|        * @release `releaseTagMenu` 顶部栏左侧按钮激活背景色 | ||||
|        * @navbar `navbarRight` 头像管理员标识背景颜色 | ||||
|        * @dropdown `dropdown` emoji 的悬停背景色 | ||||
|        * @menu `paginationMenu` 分页菜单的激活背景色 | ||||
|        */ | ||||
|       emphasis: null, | ||||
|       /** 暗淡的背景颜色 | ||||
| @@ -175,6 +176,9 @@ export const github = { | ||||
|          * @menu `menu` 菜单项的悬停背景颜色 | ||||
|          * @repo `repoHeader` 仓库标题的悬停背景颜色 | ||||
|          * @commit `commit` 提交信息的 Action 按钮的悬停背景颜色 | ||||
|          * @filelist `repoFiles` README 栏的按钮的悬停背景颜色 | ||||
|          * @issue `issueSidebar` 操作按钮的悬停背景颜色 | ||||
|          * @dashboard `dashboard` 仓库列表项目的悬停背景颜色 | ||||
|          */ | ||||
|         hover: null, | ||||
|       }, | ||||
| @@ -194,6 +198,7 @@ export const github = { | ||||
|       /** 下划线导航栏的边框颜色 | ||||
|        * @clone `clone` 按钮组的按钮下划线颜色 | ||||
|        * @menu `secondaryMenu` 二级菜单按钮的下划线颜色 | ||||
|        * @filelist `repoFiles` README 栏的左边按钮下划线颜色 | ||||
|        */ | ||||
|       active: null, | ||||
|     }, | ||||
| @@ -201,17 +206,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, | ||||
|   | ||||
| @@ -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, | ||||
|   | ||||
| @@ -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 }; | ||||
|   | ||||
| @@ -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, | ||||
| }; | ||||
|   | ||||
| @@ -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()); | ||||
|   | ||||
| @@ -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}; | ||||
|         } | ||||
|   | ||||
| @@ -1,15 +1,55 @@ | ||||
| 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; | ||||
|     } | ||||
|     // 仓库/组织列表标题 | ||||
|     .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; | ||||
|     } | ||||
|   } | ||||
| `; | ||||
|   | ||||
| @@ -34,7 +34,7 @@ export const diff = css` | ||||
|  | ||||
|     &:hover { | ||||
|       background: ${themeVars.github.bgColor.accent.emphasis}; | ||||
|       color: ${themeVars.color.white} | ||||
|       color: ${themeVars.color.white}; | ||||
|     } | ||||
|   } | ||||
|   /* 行号居中 */ | ||||
|   | ||||
| @@ -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; | ||||
|       } | ||||
|   | ||||
| @@ -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}; | ||||
|         } | ||||
|       } | ||||
|     } | ||||
|   } | ||||
| `; | ||||
|  | ||||
|   | ||||
| @@ -1,7 +1,19 @@ | ||||
| import { css, themeVars } from "src/types/vars"; | ||||
| import { css, otherThemeVars, themeVars } from "src/types/vars"; | ||||
|  | ||||
| export const heatmap = css` | ||||
|   #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 { | ||||
| @@ -48,4 +60,26 @@ export const heatmap = css` | ||||
|         } | ||||
|       } | ||||
|     } | ||||
|   } | ||||
| `; | ||||
|  | ||||
| // 动态 | ||||
| export const activity = css` | ||||
|   #activity-feed { | ||||
|     .flex-item { | ||||
|       gap: 12px; | ||||
|       padding: 16px 0; | ||||
|       &:first-child { | ||||
|         padding-top: 6px; | ||||
|       } | ||||
|       > .flex-item-main { | ||||
|         gap: 8px !important; | ||||
|       } | ||||
|       // 动态的右侧 svg 图标 | ||||
|       .flex-item-trailing svg { | ||||
|         height: 20px; | ||||
|         width: 20px; | ||||
|       } | ||||
|     } | ||||
|   } | ||||
| `; | ||||
|   | ||||
| @@ -8,6 +8,9 @@ import "./filelist"; | ||||
| import "./heatmap"; | ||||
| import "./issue"; | ||||
| import "./newrepo"; | ||||
| import "./org"; | ||||
| import "./release"; | ||||
| import "./repo"; | ||||
| import "./setting"; | ||||
| import "./signin"; | ||||
| import "./user"; | ||||
|   | ||||
| @@ -18,6 +18,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 +108,7 @@ export const comment = css` | ||||
|     } | ||||
|     .comment-header { | ||||
|       padding: 4px 4px 4px 16px; | ||||
|       min-height: 38px; | ||||
|     } | ||||
|     .comment-header-right { | ||||
|       > .item, | ||||
| @@ -330,3 +336,102 @@ 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; | ||||
|       } | ||||
|       > .flex-text-block, | ||||
|       .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; | ||||
|         } | ||||
|       } | ||||
|       // 选中日期颜色 | ||||
|       .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
									
								
							
							
						
						| @@ -0,0 +1,21 @@ | ||||
| import { css, themeVars } from "src/types/vars"; | ||||
|  | ||||
| export const org = css` | ||||
|   .page-content.organization.profile { | ||||
|     #org-info { | ||||
|       .ui.header { | ||||
|         // 组织页面的 RSS 订阅按钮 | ||||
|         .ui.label.button { | ||||
|           padding: 4px 16px; | ||||
|           .svg { | ||||
|             width: 20px; | ||||
|             min-width: 20px; | ||||
|           } | ||||
|           &:hover { | ||||
|             border-color: ${themeVars.color.light.border}; | ||||
|           } | ||||
|         } | ||||
|       } | ||||
|     } | ||||
|   } | ||||
| `; | ||||
| @@ -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; | ||||
|     } | ||||
|   } | ||||
| `; | ||||
|   | ||||
							
								
								
									
										49
									
								
								styles/components/signin.ts
									
									
									
									
									
										Normal 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
									
								
							
							
						
						| @@ -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
									
								
							
							
						
						| @@ -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; | ||||
|     } | ||||
|   } | ||||
| `; | ||||
| @@ -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; | ||||
|   | ||||
| @@ -13,3 +13,4 @@ import "./menu"; // 菜单 | ||||
| import "./modal"; // 弹窗 | ||||
| import "./tippy"; // 提示框 | ||||
| import "./navbar"; // 导航栏 | ||||
| import "./attached"; // 附加样式 | ||||
|   | ||||
| @@ -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; | ||||
|   } | ||||
| `; | ||||
|  | ||||
| // 软件包列表 | ||||
|   | ||||
| @@ -193,3 +193,47 @@ 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}; | ||||
|           transition-duration: 0.1s; | ||||
|         } | ||||
|       } | ||||
|       &.navigation { | ||||
|         &:not(.disabled) { | ||||
|           span, | ||||
|           svg { | ||||
|             color: ${themeVars.color.primary.self}; | ||||
|           } | ||||
|         } | ||||
|         // 对齐文字 | ||||
|         svg { | ||||
|           margin-top: 2px; | ||||
|         } | ||||
|       } | ||||
|     } | ||||
|   } | ||||
| `; | ||||
|   | ||||
| @@ -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; | ||||
|     } | ||||
|   } | ||||
|   | ||||
| @@ -11,6 +11,9 @@ export const transition = css` | ||||
|   .repo-file-cell, | ||||
|   // 差异对比的代码折叠按钮 | ||||
|   .code-expander-button, | ||||
|   // 仓库 README 头部的按钮 | ||||
|   .file-header-left, | ||||
|   .file-header-right, | ||||
|   .tippy-box .flex-items-block .item, | ||||
|   .clone-panel-tab .item, | ||||
|   .ui.form select, | ||||
|   | ||||
| @@ -74,47 +74,22 @@ export default defineGithubTheme( | ||||
|   }, | ||||
|   prettylights2Chroma({ | ||||
|     syntax: { | ||||
|       brackethighlighter: { | ||||
|         angle: "#9198a1", | ||||
|         unmatched: "#e5534b", | ||||
|       }, | ||||
|       carriage: { | ||||
|         return: { | ||||
|           bg: "#ad2e2c", | ||||
|           text: "#f0f6fc", | ||||
|         }, | ||||
|       }, | ||||
|       brackethighlighter: { angle: "#9198a1", unmatched: "#e5534b" }, | ||||
|       carriage: { return: { bg: "#ad2e2c", text: "#f0f6fc" } }, | ||||
|       comment: "#9198a1", | ||||
|       constant: "#6cb6ff", | ||||
|       constantOtherReferenceLink: "#96d0ff", | ||||
|       entity: "#dcbdfb", | ||||
|       entityTag: "#8ddb8c", | ||||
|       invalid: { | ||||
|         illegal: { | ||||
|           bg: "#922323", | ||||
|           text: "#f0f6fc", | ||||
|         }, | ||||
|       }, | ||||
|       invalid: { illegal: { bg: "#922323", text: "#f0f6fc" } }, | ||||
|       keyword: "#f47067", | ||||
|       markup: { | ||||
|         bold: "#f0f6fc", | ||||
|         changed: { | ||||
|           bg: "#682d0f", | ||||
|           text: "#ffddb0", | ||||
|         }, | ||||
|         deleted: { | ||||
|           bg: "#78191b", | ||||
|           text: "#ffd8d3", | ||||
|         }, | ||||
|         changed: { bg: "#682d0f", text: "#ffddb0" }, | ||||
|         deleted: { bg: "#78191b", text: "#ffd8d3" }, | ||||
|         heading: "#316dca", | ||||
|         ignored: { | ||||
|           bg: "#255ab2", | ||||
|           text: "#f0f6fc", | ||||
|         }, | ||||
|         inserted: { | ||||
|           bg: "#1b4721", | ||||
|           text: "#b4f1b4", | ||||
|         }, | ||||
|         ignored: { bg: "#255ab2", text: "#f0f6fc" }, | ||||
|         inserted: { bg: "#1b4721", text: "#b4f1b4" }, | ||||
|         italic: "#f0f6fc", | ||||
|         list: "#eac55f", | ||||
|       }, | ||||
|   | ||||