Compare commits
	
		
			25 Commits
		
	
	
		
			56c284aec2
			...
			v1.24.5
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|   | 5037e46447 | ||
|   | cd2f7579b1 | ||
|   | 1b237b12f3 | ||
|   | a8453a87a5 | ||
|   | 6aef26cdc8 | ||
|   | a4c94cb34d | ||
|   | 8c45f44309 | ||
|   | 1c9b02ea88 | ||
|   | 61313d5644 | ||
|   | d7722cde2f | ||
|   | e3366a8406 | ||
|   | f6fc6a9702 | ||
|   | 12d5636fb7 | ||
|   | 10c06dad60 | ||
|   | c80dd09828 | ||
|   | 8f2f45406a | ||
|   | c46d9333ff | ||
|   | 7039041d9d | ||
|   | 9949bdc7bd | ||
|   | 1b81b6ad93 | ||
|   | 62bc2afa2a | ||
|   | 60e873b0e0 | ||
|   | 00737f5203 | ||
|   | a90b72896b | ||
|   | f90c488d45 | 
							
								
								
									
										4
									
								
								.github/release-template.md
									
									
									
									
										vendored
									
									
								
							
							
						
						| @@ -1,3 +1,5 @@ | |||||||
|  | ## 🎉 | ||||||
|  |  | ||||||
| ## ✨ Feature | ## ✨ Feature | ||||||
|  |  | ||||||
| #### CSS 变量 | #### CSS 变量 | ||||||
| @@ -6,6 +8,4 @@ | |||||||
|  |  | ||||||
| #### 更符合 GitHub 风格 | #### 更符合 GitHub 风格 | ||||||
|  |  | ||||||
| ## 🎈 Perf |  | ||||||
|  |  | ||||||
| ## 🐞 Fix | ## 🐞 Fix | ||||||
|   | |||||||
							
								
								
									
										19
									
								
								.github/release.md
									
									
									
									
										vendored
									
									
								
							
							
						
						| @@ -1,21 +1,8 @@ | |||||||
| ## ✨ Feature | ## ✨ Feature | ||||||
|  |  | ||||||
| ## 🌈 Style | - 支持色盲主题(Beta) ( 红绿色盲和蓝色盲 ) ( Colorblind & Tritanopia ) | ||||||
|  |  | ||||||
| #### 更符合 GitHub 风格 |  | ||||||
|  |  | ||||||
| - 同步仓库代码文件页 README 导航栏样式 |  | ||||||
| - 同步分页菜单样式 |  | ||||||
| - 同步登录/注册页面样式 |  | ||||||
|  |  | ||||||
| ## 🎈 Perf |  | ||||||
|  |  | ||||||
| - 略微增加仓库代码文件列表的单行高度与 GitHub 一致 |  | ||||||
| - 优化创建仓库/迁移仓库/创建组织页面的样式与设置页面的样式一致 |  | ||||||
|  |  | ||||||
| ## 🐞 Fix | ## 🐞 Fix | ||||||
|  |  | ||||||
| - 修复 Action 作业步骤页面标题选中时滚动固定的高度问题 | - 查看代码文件页面路径栏有时内容不会居中 | ||||||
| - 修复用户公开活动页动态布局问题 | - 查看代码文件页面文件树头部滚动到底部时不会固定住 | ||||||
| - 修复顶部导航栏工单管理/请求合并页面搜索框旁的选择下拉框按钮内容过窄 |  | ||||||
| - 修复手机页面下注册/登录页导航栏注册按钮换行的问题 |  | ||||||
|   | |||||||
							
								
								
									
										4
									
								
								.github/workflows/release.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						| @@ -18,8 +18,10 @@ jobs: | |||||||
|       - name: Create release |       - name: Create release | ||||||
|         run: | |         run: | | ||||||
|           export TZ=Asia/Shanghai |           export TZ=Asia/Shanghai | ||||||
|           TAG="v$(npm run -s version).$(date +%y%m%d%H%M)" |           TAG="v$(npm run -s version)" | ||||||
|           tar -zcf dist/theme-github.tar.gz --remove-files dist/theme-github-auto.css dist/theme-github-light.css dist/theme-github-dark.css dist/theme-github-soft-dark.css |           tar -zcf dist/theme-github.tar.gz --remove-files dist/theme-github-auto.css dist/theme-github-light.css dist/theme-github-dark.css dist/theme-github-soft-dark.css | ||||||
|  |           tar -zcf dist/theme-github-colorblind.tar.gz --remove-files dist/theme-github-colorblind-auto.css dist/theme-github-colorblind-light.css dist/theme-github-colorblind-dark.css | ||||||
|  |           tar -zcf dist/theme-github-tritanopia.tar.gz --remove-files dist/theme-github-tritanopia-auto.css dist/theme-github-tritanopia-light.css dist/theme-github-tritanopia-dark.css | ||||||
|           gh release create "$TAG" dist/* --notes-file .github/release.md --draft -t $TAG |           gh release create "$TAG" dist/* --notes-file .github/release.md --draft -t $TAG | ||||||
|         env: |         env: | ||||||
|           GH_TOKEN: ${{ github.token }} |           GH_TOKEN: ${{ github.token }} | ||||||
|   | |||||||
| @@ -95,8 +95,8 @@ npm run commit | |||||||
|  |  | ||||||
| 请在颜色主题文件头部附加自己的作者信息, 方便 Issue 提问者找到你 `@`. | 请在颜色主题文件头部附加自己的作者信息, 方便 Issue 提问者找到你 `@`. | ||||||
|  |  | ||||||
| 推荐使用 `import { defineTheme } from "src"` 导入主题生成框架, 然后使用 `defineTheme` 函数生成主题, | 推荐使用 `import { defineTheme, type ThemeColor } from "src"` 导入主题生成框架, 声明主题颜色, 然后使用 `defineTheme` 函数生成主题所有 CSS 变量, | ||||||
| defineTheme 中设置了一些经过计算得到的 Gitea 变量可以减少工作量, 具体请查看函数说明. | defineTheme 中设置了一些经过计算得到的 Gitea 变量可以减少工作量, 具体请查看函数说明和定义. | ||||||
|  |  | ||||||
| 颜色计算函数可以从 `src/functions` 导入, 例如 `import { scaleColorLight } from "src/functions"`, 或者使用 `polished` 库. | 颜色计算函数可以从 `src/functions` 导入, 例如 `import { scaleColorLight } from "src/functions"`, 或者使用 `polished` 库. | ||||||
|  |  | ||||||
| @@ -107,12 +107,15 @@ defineTheme 中设置了一些经过计算得到的 Gitea 变量可以减少工 | |||||||
|  * @author 你的名字 |  * @author 你的名字 | ||||||
|  * @description 主题描述 |  * @description 主题描述 | ||||||
|  */ |  */ | ||||||
| import { defineTheme } from "src"; | import { defineTheme, type ThemeColor } from "src"; | ||||||
| export default defineTheme({ | export const 主题名称DarkColors: ThemeColor = { | ||||||
|   ... |   ... | ||||||
| }); | } | ||||||
|  | export default defineTheme(主题名称DarkColors); | ||||||
| // 使用其他主题颜色作为基础 | // 使用其他主题颜色作为基础 | ||||||
| import dark from "themes/dark"; | import dark from "themes/dark"; | ||||||
|  | import { darkColors } from "themes/dark"; | ||||||
|  | export const 主题名称DarkColors: ThemeColor = darkColors; | ||||||
| export default defineTheme({ | export default defineTheme({ | ||||||
|   ...dark, |   ...dark, | ||||||
|   ... |   ... | ||||||
| @@ -130,17 +133,26 @@ export default defineTheme({ | |||||||
|  * @author 你的名字 |  * @author 你的名字 | ||||||
|  * @description 主题描述 |  * @description 主题描述 | ||||||
|  */ |  */ | ||||||
| import type { Theme } from "src"; | import type { Theme, Chroma, Primary, Secondary, ... } from "src"; | ||||||
|  | export const primary: Primary = ...; | ||||||
|  | export const secondary: Secondary =...; | ||||||
|  | export const chroma: Chroma =...; | ||||||
|  | ... | ||||||
| export default theme: Theme = { | export default theme: Theme = { | ||||||
|  |   primary, | ||||||
|  |   secondary, | ||||||
|  |   chroma, | ||||||
|   ... |   ... | ||||||
| }; | }; | ||||||
| ``` | ``` | ||||||
|  |  | ||||||
| 完成主题颜色开发后, 请在某个仓库的代码文件列表页, 打开 Code 菜单选择 Tea Cli 进行截图, 并放入 `screenshots` | 完成主题颜色开发后, 请在某个仓库的代码文件列表页, 打开 Code 菜单选择 Tea Cli 进行截图, 并放入 `screenshots` | ||||||
| 目录下, 截图名与主题名相同. (推荐克隆 Github 的 actions/checkout 仓库, 该仓库信息较全, 避免泄露个人隐私) | 目录下, 截图名与主题名相同. (推荐克隆本仓库, 避免泄露个人隐私) | ||||||
|  |  | ||||||
| 然后将截图信息添加到 `README.md` 文件中, 可以在折叠部分中添加自己的说明. | 然后将截图信息添加到 `README.md` 文件中, 可以在折叠部分中添加自己的说明. | ||||||
|  |  | ||||||
|  | 主题颜色复用案例可以参考本主题的色盲主题. | ||||||
|  |  | ||||||
| ## 主题样式贡献 | ## 主题样式贡献 | ||||||
|  |  | ||||||
| 主题样式使用 TypeScript 的 css 模板字符串开发, 该模板字符串会经过 sass 预处理器处理, 支持 SCSS 语法并且主题只接受 SCSS 嵌套语法, 请不要使用 CSS 语法, 如果一定要用请说明原因. | 主题样式使用 TypeScript 的 css 模板字符串开发, 该模板字符串会经过 sass 预处理器处理, 支持 SCSS 语法并且主题只接受 SCSS 嵌套语法, 请不要使用 CSS 语法, 如果一定要用请说明原因. | ||||||
|   | |||||||
							
								
								
									
										23
									
								
								README.md
									
									
									
									
									
								
							
							
						
						| @@ -9,7 +9,7 @@ | |||||||
|  |  | ||||||
| ## 版本号说明 | ## 版本号说明 | ||||||
|  |  | ||||||
| 主题版本号格式: `Gitea 版本号.时间戳` | 主题版本号与 Gitea 版本号保持一致 | ||||||
|  |  | ||||||
| Gitea 版本号格式: `1.大版本号.小版本号` | Gitea 版本号格式: `1.大版本号.小版本号` | ||||||
|  |  | ||||||
| @@ -19,6 +19,8 @@ Gitea 理论上小版本号变更不会修改前端布局, 所以主题的小版 | |||||||
|  |  | ||||||
| 仅维护项目发布中的最新的 Gitea 版本, 其他旧版本主题不接受 Issue 和 PR. | 仅维护项目发布中的最新的 Gitea 版本, 其他旧版本主题不接受 Issue 和 PR. | ||||||
|  |  | ||||||
|  | > 开发阶段的主题版本号格式: `1.大版本号.小版本号.时间戳` | ||||||
|  |  | ||||||
| ## 安装 | ## 安装 | ||||||
|  |  | ||||||
| 1. 在发布页下载最新的 CSS 主题文件放入 `gitea/public/assets/css` 目录下 | 1. 在发布页下载最新的 CSS 主题文件放入 `gitea/public/assets/css` 目录下 | ||||||
| @@ -44,6 +46,11 @@ THEMES = gitea-auto, gitea-light, gitea-dark, github-auto, github-light, github- | |||||||
|  |  | ||||||
| ## 截图 | ## 截图 | ||||||
|  |  | ||||||
|  | ### 基本主题 | ||||||
|  |  | ||||||
|  | ```ini | ||||||
|  | THEMES = github-auto, github-light, github-dark, github-soft-dark | ||||||
|  | ``` | ||||||
| <details open> | <details open> | ||||||
| <summary>GitHub</summary> | <summary>GitHub</summary> | ||||||
| <h4>theme-github-light.css</h4> | <h4>theme-github-light.css</h4> | ||||||
| @@ -54,9 +61,19 @@ THEMES = gitea-auto, gitea-light, gitea-dark, github-auto, github-light, github- | |||||||
| <img src="screenshots/soft-dark.png"/> | <img src="screenshots/soft-dark.png"/> | ||||||
| </details> | </details> | ||||||
|  |  | ||||||
|  | ### 色盲主题 ( Beta ) | ||||||
|  |  | ||||||
|  | ```ini | ||||||
|  | THEMES = github-colorblind-auto, github-colorblind-light, github-colorblind-dark | ||||||
|  | THEMES = github-tritanopia-auto, github-tritanopia-light, github-tritanopia-dark | ||||||
|  | ``` | ||||||
|  |  | ||||||
| <details> | <details> | ||||||
| <summary>其他主题</summary> | <summary>红绿色盲 & 蓝色盲 ( Colorblind & Tritanopia )</summary> | ||||||
| 等待贡献者ing... | <h4>theme-github-colorblind-light.css & theme-github-tritanopia-light.css</h4> | ||||||
|  | <img src="screenshots/colorblind-light.png"/> | ||||||
|  | <h4>theme-github-colorblind-dark.css & theme-github-tritanopia-dark.css</h4> | ||||||
|  | <img src="screenshots/colorblind-dark.png"/> | ||||||
| </details> | </details> | ||||||
|  |  | ||||||
| ## 自定义 CSS 变量 | ## 自定义 CSS 变量 | ||||||
|   | |||||||
							
								
								
									
										8
									
								
								TODO.md
									
									
									
									
									
								
							
							
						
						| @@ -1,8 +0,0 @@ | |||||||
| ### 重大 |  | ||||||
|  |  | ||||||
| - gitea issue 暗色模式下默认标签颜色匹配使用 github 样式 |  | ||||||
| - issue/PR 列表样式 github 布局 |  | ||||||
| - 用户动态仪表板样式优化 |  | ||||||
| - 色盲主题支持 |  | ||||||
| - 打开文件时的文件导航树样式和滚动高度 |  | ||||||
| - 私有库标签大小, 组织页面下的RSS订阅按钮样式 |  | ||||||
| @@ -1,6 +1,6 @@ | |||||||
| { | { | ||||||
|   "name": "gitea-github-theme", |   "name": "gitea-github-theme", | ||||||
|   "version": "1.24.4", |   "version": "1.24.5", | ||||||
|   "description": "A theme to make Gitea look and feel like GitHub", |   "description": "A theme to make Gitea look and feel like GitHub", | ||||||
|   "type": "module", |   "type": "module", | ||||||
|   "scripts": { |   "scripts": { | ||||||
|   | |||||||
							
								
								
									
										
											BIN
										
									
								
								screenshots/colorblind-dark.png
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 260 KiB | 
							
								
								
									
										
											BIN
										
									
								
								screenshots/colorblind-light.png
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 259 KiB | 
							
								
								
									
										
											BIN
										
									
								
								screenshots/dark.png
									
									
									
									
										vendored
									
									
								
							
							
						
						| Before Width: | Height: | Size: 202 KiB After Width: | Height: | Size: 260 KiB | 
							
								
								
									
										
											BIN
										
									
								
								screenshots/light.png
									
									
									
									
										vendored
									
									
								
							
							
						
						| Before Width: | Height: | Size: 201 KiB After Width: | Height: | Size: 259 KiB | 
							
								
								
									
										
											BIN
										
									
								
								screenshots/soft-dark.png
									
									
									
									
										vendored
									
									
								
							
							
						
						| Before Width: | Height: | Size: 202 KiB After Width: | Height: | Size: 261 KiB | 
| @@ -1,36 +1,6 @@ | |||||||
| import { prettylights2Chroma } from "./prettylights"; | import { prettylights2Chroma, type prettylightsColor } from "./prettylights"; | ||||||
|  |  | ||||||
| export const defaultDarkChroma = prettylights2Chroma({ | export const lightPrettylights: prettylightsColor = { | ||||||
|   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: { |   syntax: { | ||||||
|     brackethighlighter: { angle: "#59636e", unmatched: "#82071e" }, |     brackethighlighter: { angle: "#59636e", unmatched: "#82071e" }, | ||||||
|     carriage: { return: { bg: "#cf222e", text: "#f6f8fa" } }, |     carriage: { return: { bg: "#cf222e", text: "#f6f8fa" } }, | ||||||
| @@ -58,4 +28,37 @@ export const defaultLightChroma = prettylights2Chroma({ | |||||||
|     sublimelinterGutterMark: "#818b98", |     sublimelinterGutterMark: "#818b98", | ||||||
|     variable: "#953800", |     variable: "#953800", | ||||||
|   }, |   }, | ||||||
| }); | }; | ||||||
|  |  | ||||||
|  | export const darkPrettylights: prettylightsColor = { | ||||||
|  |   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(lightPrettylights); | ||||||
|  | export const defaultDarkChroma = prettylights2Chroma(darkPrettylights); | ||||||
|   | |||||||
| @@ -5,7 +5,7 @@ import { themeVars } from "src/types/vars"; | |||||||
| import { defaultDarkChroma, defaultLightChroma } from "./chroma"; | import { defaultDarkChroma, defaultLightChroma } from "./chroma"; | ||||||
| import type { Theme } from "./theme"; | import type { Theme } from "./theme"; | ||||||
|  |  | ||||||
| type ThemeColor = { | export type ThemeColor = { | ||||||
|   /** 用于标识当前是否为暗色主题: `true` 暗色 `false` 亮色 */ |   /** 用于标识当前是否为暗色主题: `true` 暗色 `false` 亮色 */ | ||||||
|   isDarkTheme: boolean; |   isDarkTheme: boolean; | ||||||
|   /** 主色调(强调色) */ |   /** 主色调(强调色) */ | ||||||
| @@ -14,6 +14,8 @@ type ThemeColor = { | |||||||
|   primaryContrast: string; |   primaryContrast: string; | ||||||
|   /** 副色调(边框色) */ |   /** 副色调(边框色) */ | ||||||
|   secondary: string; |   secondary: string; | ||||||
|  |   /** 基础颜色 */ | ||||||
|  |   base: { | ||||||
|     /** 红色 */ |     /** 红色 */ | ||||||
|     red: string; |     red: string; | ||||||
|     /** 橙色 */ |     /** 橙色 */ | ||||||
| @@ -46,6 +48,7 @@ type ThemeColor = { | |||||||
|     gold: string; |     gold: string; | ||||||
|     /** 白色 */ |     /** 白色 */ | ||||||
|     white: string; |     white: string; | ||||||
|  |   }; | ||||||
|   /** Action 日志 */ |   /** Action 日志 */ | ||||||
|   console: Console; |   console: Console; | ||||||
|   /** 提交代码对比 */ |   /** 提交代码对比 */ | ||||||
| @@ -161,161 +164,161 @@ export function defineTheme(themeColor: ThemeColor, chroma: Chroma | null = null | |||||||
|  |  | ||||||
|   const named: Named = { |   const named: Named = { | ||||||
|     red: { |     red: { | ||||||
|       self: themeColor.red, |       self: themeColor.base.red, | ||||||
|       light: themeColor.isDarkTheme ? scaleColorLight(themeColor.red, 15) : scaleColorLight(themeColor.red, 25), |       light: themeColor.isDarkTheme ? scaleColorLight(themeColor.base.red, 15) : scaleColorLight(themeColor.base.red, 25), | ||||||
|       dark: { |       dark: { | ||||||
|         num1: scaleColorLight(themeColor.red, -10), |         num1: scaleColorLight(themeColor.base.red, -10), | ||||||
|         num2: scaleColorLight(themeColor.red, -20), |         num2: scaleColorLight(themeColor.base.red, -20), | ||||||
|       }, |       }, | ||||||
|       badge: { |       badge: { | ||||||
|         self: themeColor.red, |         self: themeColor.base.red, | ||||||
|         bg: rgba(themeColor.red, 0.1), |         bg: rgba(themeColor.base.red, 0.1), | ||||||
|         hover: { |         hover: { | ||||||
|           bg: rgba(themeColor.red, 0.3), |           bg: rgba(themeColor.base.red, 0.3), | ||||||
|         }, |         }, | ||||||
|       }, |       }, | ||||||
|     }, |     }, | ||||||
|     orange: { |     orange: { | ||||||
|       self: themeColor.orange, |       self: themeColor.base.orange, | ||||||
|       light: themeColor.isDarkTheme ? scaleColorLight(themeColor.orange, 15) : scaleColorLight(themeColor.orange, 25), |       light: themeColor.isDarkTheme ? scaleColorLight(themeColor.base.orange, 15) : scaleColorLight(themeColor.base.orange, 25), | ||||||
|       dark: { |       dark: { | ||||||
|         num1: scaleColorLight(themeColor.orange, -10), |         num1: scaleColorLight(themeColor.base.orange, -10), | ||||||
|         num2: scaleColorLight(themeColor.orange, -20), |         num2: scaleColorLight(themeColor.base.orange, -20), | ||||||
|       }, |       }, | ||||||
|       badge: { |       badge: { | ||||||
|         self: themeColor.orange, |         self: themeColor.base.orange, | ||||||
|         bg: rgba(themeColor.orange, 0.1), |         bg: rgba(themeColor.base.orange, 0.1), | ||||||
|         hover: { |         hover: { | ||||||
|           bg: rgba(themeColor.orange, 0.3), |           bg: rgba(themeColor.base.orange, 0.3), | ||||||
|         }, |         }, | ||||||
|       }, |       }, | ||||||
|     }, |     }, | ||||||
|     yellow: { |     yellow: { | ||||||
|       self: themeColor.yellow, |       self: themeColor.base.yellow, | ||||||
|       light: themeColor.isDarkTheme ? scaleColorLight(themeColor.yellow, 15) : scaleColorLight(themeColor.yellow, 25), |       light: themeColor.isDarkTheme ? scaleColorLight(themeColor.base.yellow, 15) : scaleColorLight(themeColor.base.yellow, 25), | ||||||
|       dark: { |       dark: { | ||||||
|         num1: scaleColorLight(themeColor.yellow, -10), |         num1: scaleColorLight(themeColor.base.yellow, -10), | ||||||
|         num2: scaleColorLight(themeColor.yellow, -20), |         num2: scaleColorLight(themeColor.base.yellow, -20), | ||||||
|       }, |       }, | ||||||
|       badge: { |       badge: { | ||||||
|         self: themeColor.yellow, |         self: themeColor.base.yellow, | ||||||
|         bg: rgba(themeColor.yellow, 0.1), |         bg: rgba(themeColor.base.yellow, 0.1), | ||||||
|         hover: { |         hover: { | ||||||
|           bg: rgba(themeColor.yellow, 0.3), |           bg: rgba(themeColor.base.yellow, 0.3), | ||||||
|         }, |         }, | ||||||
|       }, |       }, | ||||||
|     }, |     }, | ||||||
|     olive: { |     olive: { | ||||||
|       self: themeColor.olive, |       self: themeColor.base.olive, | ||||||
|       light: themeColor.isDarkTheme ? scaleColorLight(themeColor.olive, 15) : scaleColorLight(themeColor.olive, 25), |       light: themeColor.isDarkTheme ? scaleColorLight(themeColor.base.olive, 15) : scaleColorLight(themeColor.base.olive, 25), | ||||||
|       dark: { |       dark: { | ||||||
|         num1: scaleColorLight(themeColor.olive, -10), |         num1: scaleColorLight(themeColor.base.olive, -10), | ||||||
|         num2: scaleColorLight(themeColor.olive, -20), |         num2: scaleColorLight(themeColor.base.olive, -20), | ||||||
|       }, |       }, | ||||||
|     }, |     }, | ||||||
|     green: { |     green: { | ||||||
|       self: themeColor.green, |       self: themeColor.base.green, | ||||||
|       light: themeColor.isDarkTheme ? scaleColorLight(themeColor.green, 15) : scaleColorLight(themeColor.green, 25), |       light: themeColor.isDarkTheme ? scaleColorLight(themeColor.base.green, 15) : scaleColorLight(themeColor.base.green, 25), | ||||||
|       dark: { |       dark: { | ||||||
|         num1: scaleColorLight(themeColor.green, -10), |         num1: scaleColorLight(themeColor.base.green, -10), | ||||||
|         num2: scaleColorLight(themeColor.green, -20), |         num2: scaleColorLight(themeColor.base.green, -20), | ||||||
|       }, |       }, | ||||||
|       badge: { |       badge: { | ||||||
|         self: themeColor.green, |         self: themeColor.base.green, | ||||||
|         bg: rgba(themeColor.green, 0.1), |         bg: rgba(themeColor.base.green, 0.1), | ||||||
|         hover: { |         hover: { | ||||||
|           bg: rgba(themeColor.green, 0.3), |           bg: rgba(themeColor.base.green, 0.3), | ||||||
|         }, |         }, | ||||||
|       }, |       }, | ||||||
|     }, |     }, | ||||||
|     teal: { |     teal: { | ||||||
|       self: themeColor.teal, |       self: themeColor.base.teal, | ||||||
|       light: themeColor.isDarkTheme ? scaleColorLight(themeColor.teal, 15) : scaleColorLight(themeColor.teal, 25), |       light: themeColor.isDarkTheme ? scaleColorLight(themeColor.base.teal, 15) : scaleColorLight(themeColor.base.teal, 25), | ||||||
|       dark: { |       dark: { | ||||||
|         num1: scaleColorLight(themeColor.teal, -10), |         num1: scaleColorLight(themeColor.base.teal, -10), | ||||||
|         num2: scaleColorLight(themeColor.teal, -20), |         num2: scaleColorLight(themeColor.base.teal, -20), | ||||||
|       }, |       }, | ||||||
|     }, |     }, | ||||||
|     blue: { |     blue: { | ||||||
|       self: themeColor.blue, |       self: themeColor.base.blue, | ||||||
|       light: themeColor.isDarkTheme ? scaleColorLight(themeColor.blue, 15) : scaleColorLight(themeColor.blue, 25), |       light: themeColor.isDarkTheme ? scaleColorLight(themeColor.base.blue, 15) : scaleColorLight(themeColor.base.blue, 25), | ||||||
|       dark: { |       dark: { | ||||||
|         num1: scaleColorLight(themeColor.blue, -10), |         num1: scaleColorLight(themeColor.base.blue, -10), | ||||||
|         num2: scaleColorLight(themeColor.blue, -20), |         num2: scaleColorLight(themeColor.base.blue, -20), | ||||||
|       }, |       }, | ||||||
|     }, |     }, | ||||||
|     violet: { |     violet: { | ||||||
|       self: themeColor.violet, |       self: themeColor.base.violet, | ||||||
|       light: themeColor.isDarkTheme ? scaleColorLight(themeColor.violet, 15) : scaleColorLight(themeColor.violet, 25), |       light: themeColor.isDarkTheme ? scaleColorLight(themeColor.base.violet, 15) : scaleColorLight(themeColor.base.violet, 25), | ||||||
|       dark: { |       dark: { | ||||||
|         num1: scaleColorLight(themeColor.violet, -10), |         num1: scaleColorLight(themeColor.base.violet, -10), | ||||||
|         num2: scaleColorLight(themeColor.violet, -20), |         num2: scaleColorLight(themeColor.base.violet, -20), | ||||||
|       }, |       }, | ||||||
|     }, |     }, | ||||||
|     purple: { |     purple: { | ||||||
|       self: themeColor.purple, |       self: themeColor.base.purple, | ||||||
|       light: themeColor.isDarkTheme ? scaleColorLight(themeColor.purple, 15) : scaleColorLight(themeColor.purple, 25), |       light: themeColor.isDarkTheme ? scaleColorLight(themeColor.base.purple, 15) : scaleColorLight(themeColor.base.purple, 25), | ||||||
|       dark: { |       dark: { | ||||||
|         num1: scaleColorLight(themeColor.purple, -10), |         num1: scaleColorLight(themeColor.base.purple, -10), | ||||||
|         num2: scaleColorLight(themeColor.purple, -20), |         num2: scaleColorLight(themeColor.base.purple, -20), | ||||||
|       }, |       }, | ||||||
|     }, |     }, | ||||||
|     pink: { |     pink: { | ||||||
|       self: themeColor.pink, |       self: themeColor.base.pink, | ||||||
|       light: themeColor.isDarkTheme ? scaleColorLight(themeColor.pink, 15) : scaleColorLight(themeColor.pink, 25), |       light: themeColor.isDarkTheme ? scaleColorLight(themeColor.base.pink, 15) : scaleColorLight(themeColor.base.pink, 25), | ||||||
|       dark: { |       dark: { | ||||||
|         num1: scaleColorLight(themeColor.pink, -10), |         num1: scaleColorLight(themeColor.base.pink, -10), | ||||||
|         num2: scaleColorLight(themeColor.pink, -20), |         num2: scaleColorLight(themeColor.base.pink, -20), | ||||||
|       }, |       }, | ||||||
|     }, |     }, | ||||||
|     brown: { |     brown: { | ||||||
|       self: themeColor.brown, |       self: themeColor.base.brown, | ||||||
|       light: themeColor.isDarkTheme ? scaleColorLight(themeColor.brown, 15) : scaleColorLight(themeColor.brown, 25), |       light: themeColor.isDarkTheme ? scaleColorLight(themeColor.base.brown, 15) : scaleColorLight(themeColor.base.brown, 25), | ||||||
|       dark: { |       dark: { | ||||||
|         num1: scaleColorLight(themeColor.brown, -10), |         num1: scaleColorLight(themeColor.base.brown, -10), | ||||||
|         num2: scaleColorLight(themeColor.brown, -20), |         num2: scaleColorLight(themeColor.base.brown, -20), | ||||||
|       }, |       }, | ||||||
|     }, |     }, | ||||||
|     black: { |     black: { | ||||||
|       self: themeColor.black, |       self: themeColor.base.black, | ||||||
|       light: themeColor.isDarkTheme ? scaleColorLight(themeColor.black, 15) : scaleColorLight(themeColor.black, 25), |       light: themeColor.isDarkTheme ? scaleColorLight(themeColor.base.black, 15) : scaleColorLight(themeColor.base.black, 25), | ||||||
|       dark: { |       dark: { | ||||||
|         num1: scaleColorLight(themeColor.black, -10), |         num1: scaleColorLight(themeColor.base.black, -10), | ||||||
|         num2: scaleColorLight(themeColor.black, -20), |         num2: scaleColorLight(themeColor.base.black, -20), | ||||||
|       }, |       }, | ||||||
|     }, |     }, | ||||||
|     grey: { |     grey: { | ||||||
|       self: themeColor.grey, |       self: themeColor.base.grey, | ||||||
|       light: themeColor.isDarkTheme ? scaleColorLight(themeColor.grey, 15) : scaleColorLight(themeColor.grey, 25), |       light: themeColor.isDarkTheme ? scaleColorLight(themeColor.base.grey, 15) : scaleColorLight(themeColor.base.grey, 25), | ||||||
|     }, |     }, | ||||||
|     gold: themeColor.gold, |     gold: themeColor.base.gold, | ||||||
|     white: themeColor.white, |     white: themeColor.base.white, | ||||||
|   }; |   }; | ||||||
|  |  | ||||||
|   const message: Message = { |   const message: Message = { | ||||||
|     error: { |     error: { | ||||||
|       bg: { |       bg: { | ||||||
|         self: rgba(themeColor.red, 0.1), |         self: rgba(themeColor.base.red, 0.1), | ||||||
|         active: rgba(themeColor.red, 0.5), |         active: rgba(themeColor.base.red, 0.5), | ||||||
|         hover: rgba(themeColor.red, 0.3), |         hover: rgba(themeColor.base.red, 0.3), | ||||||
|       }, |       }, | ||||||
|       border: rgba(themeColor.red, 0.4), |       border: rgba(themeColor.base.red, 0.4), | ||||||
|       text: saturate(0.2, themeColor.red), // 饱和度提高 |       text: saturate(0.2, themeColor.base.red), // 饱和度提高 | ||||||
|     }, |     }, | ||||||
|     success: { |     success: { | ||||||
|       bg: rgba(themeColor.green, 0.1), |       bg: rgba(themeColor.base.green, 0.1), | ||||||
|       border: rgba(themeColor.green, 0.4), |       border: rgba(themeColor.base.green, 0.4), | ||||||
|       text: saturate(0.2, themeColor.green), |       text: saturate(0.2, themeColor.base.green), | ||||||
|     }, |     }, | ||||||
|     warning: { |     warning: { | ||||||
|       bg: rgba(themeColor.yellow, 0.1), |       bg: rgba(themeColor.base.yellow, 0.1), | ||||||
|       border: rgba(themeColor.yellow, 0.4), |       border: rgba(themeColor.base.yellow, 0.4), | ||||||
|       text: saturate(0.2, themeColor.yellow), |       text: saturate(0.2, themeColor.base.yellow), | ||||||
|     }, |     }, | ||||||
|     info: { |     info: { | ||||||
|       bg: rgba(themeColor.blue, 0.1), |       bg: rgba(themeColor.base.blue, 0.1), | ||||||
|       border: rgba(themeColor.blue, 0.4), |       border: rgba(themeColor.base.blue, 0.4), | ||||||
|       text: saturate(0.2, themeColor.blue), |       text: saturate(0.2, themeColor.base.blue), | ||||||
|     }, |     }, | ||||||
|   }; |   }; | ||||||
|  |  | ||||||
| @@ -326,7 +329,7 @@ export function defineTheme(themeColor: ThemeColor, chroma: Chroma | null = null | |||||||
|     yellow: themeVars.color.yellow.self, |     yellow: themeVars.color.yellow.self, | ||||||
|     blue: themeVars.color.blue.self, |     blue: themeVars.color.blue.self, | ||||||
|     magenta: themeVars.color.pink.self, |     magenta: themeVars.color.pink.self, | ||||||
|     cyan: themeColor.cyan, |     cyan: themeColor.base.cyan, | ||||||
|     white: themeVars.color.console.fg.subtle, |     white: themeVars.color.console.fg.subtle, | ||||||
|     bright: { |     bright: { | ||||||
|       black: themeVars.color.black.light, |       black: themeVars.color.black.light, | ||||||
| @@ -335,7 +338,7 @@ export function defineTheme(themeColor: ThemeColor, chroma: Chroma | null = null | |||||||
|       yellow: themeVars.color.yellow.light, |       yellow: themeVars.color.yellow.light, | ||||||
|       blue: themeVars.color.blue.light, |       blue: themeVars.color.blue.light, | ||||||
|       magenta: themeVars.color.pink.light, |       magenta: themeVars.color.pink.light, | ||||||
|       cyan: themeColor.isDarkTheme ? scaleColorLight(themeColor.cyan, 10) : scaleColorLight(themeColor.cyan, 25), |       cyan: themeColor.isDarkTheme ? scaleColorLight(themeColor.base.cyan, 10) : scaleColorLight(themeColor.base.cyan, 25), | ||||||
|       white: themeVars.color.console.fg.self, |       white: themeVars.color.console.fg.self, | ||||||
|     }, |     }, | ||||||
|   }; |   }; | ||||||
|   | |||||||
| @@ -1,10 +1,9 @@ | |||||||
| import { saturate } from "polished"; | import { saturate } from "polished"; | ||||||
| import type { Console, Diff, Other } from "src"; | import type { Console, Diff, Other } from "src"; | ||||||
| import { scaleColorLight } from "src/functions"; | import { scaleColorLight } from "src/functions"; | ||||||
| import type { Chroma, Github } from "src/types"; | import type { Github } from "src/types"; | ||||||
| import { themeVars } from "src/types/vars"; | import { themeVars } from "src/types/vars"; | ||||||
| import { defineTheme } from "./color"; | import { type ThemeColor } from "./color"; | ||||||
| import type { Theme } from "./theme"; |  | ||||||
|  |  | ||||||
| export type GithubColor = { | export type GithubColor = { | ||||||
|   isDarkTheme: boolean; |   isDarkTheme: boolean; | ||||||
| @@ -77,7 +76,7 @@ export type GithubColor = { | |||||||
|   }; |   }; | ||||||
| }; | }; | ||||||
|  |  | ||||||
| export function defineGithubTheme(githubColor: GithubColor, chroma: Chroma | null = null): Theme { | export function github2ThemeColor(githubColor: GithubColor): ThemeColor { | ||||||
|   const console: Console = { |   const console: Console = { | ||||||
|     fg: { |     fg: { | ||||||
|       self: githubColor.fgColor.default, |       self: githubColor.fgColor.default, | ||||||
| @@ -327,12 +326,12 @@ export function defineGithubTheme(githubColor: GithubColor, chroma: Chroma | nul | |||||||
|       }, |       }, | ||||||
|     }, |     }, | ||||||
|   }; |   }; | ||||||
|   return defineTheme( |   return { | ||||||
|     { |  | ||||||
|     isDarkTheme: githubColor.isDarkTheme, |     isDarkTheme: githubColor.isDarkTheme, | ||||||
|     primary: githubColor.fgColor.accent, |     primary: githubColor.fgColor.accent, | ||||||
|     primaryContrast: githubColor.fgColor.default, |     primaryContrast: githubColor.fgColor.default, | ||||||
|     secondary: githubColor.borderColor.default, |     secondary: githubColor.borderColor.default, | ||||||
|  |     base: { | ||||||
|       red: githubColor.fgColor.danger, |       red: githubColor.fgColor.danger, | ||||||
|       orange: githubColor.fgColor.severe, |       orange: githubColor.fgColor.severe, | ||||||
|       yellow: githubColor.fgColor.attention, |       yellow: githubColor.fgColor.attention, | ||||||
| @@ -349,11 +348,10 @@ export function defineGithubTheme(githubColor: GithubColor, chroma: Chroma | nul | |||||||
|       grey: githubColor.fgColor.neutral, |       grey: githubColor.fgColor.neutral, | ||||||
|       gold: githubColor.display.lemon.fgColor, |       gold: githubColor.display.lemon.fgColor, | ||||||
|       white: githubColor.fgColor.white, |       white: githubColor.fgColor.white, | ||||||
|  |     }, | ||||||
|     console, |     console, | ||||||
|     diff, |     diff, | ||||||
|     other, |     other, | ||||||
|     github, |     github, | ||||||
|     }, |   }; | ||||||
|     chroma |  | ||||||
|   ); |  | ||||||
| } | } | ||||||
|   | |||||||
| @@ -1,4 +1,5 @@ | |||||||
| export { defineTheme } from "./core/color"; | export { defaultDarkChroma, defaultLightChroma } from "./core/chroma"; | ||||||
|  | export { defineTheme, type ThemeColor } from "./core/color"; | ||||||
| export type { Theme } from "./core/theme"; | export type { Theme } from "./core/theme"; | ||||||
| export type { Chroma, Console, Diff, Github, Other } from "./types"; | export type { Ansi, Chroma, Console, Diff, Github, Message, Named, Other, Primary, Secondary } from "./types"; | ||||||
| export { otherThemeVars, themeVars } from "./types/vars"; | export { otherThemeVars, themeVars } from "./types/vars"; | ||||||
|   | |||||||
| @@ -177,6 +177,9 @@ export const github = { | |||||||
|          * @repo `repoHeader` 仓库标题的悬停背景颜色 |          * @repo `repoHeader` 仓库标题的悬停背景颜色 | ||||||
|          * @commit `commit` 提交信息的 Action 按钮的悬停背景颜色 |          * @commit `commit` 提交信息的 Action 按钮的悬停背景颜色 | ||||||
|          * @filelist `repoFiles` README 栏的按钮的悬停背景颜色 |          * @filelist `repoFiles` README 栏的按钮的悬停背景颜色 | ||||||
|  |          * @issue `issueSidebar` 操作按钮的悬停背景颜色 | ||||||
|  |          * @issue `issueList` 头部菜单左侧开启关闭菜单的悬停背景颜色 | ||||||
|  |          * @dashboard `dashboard` 仓库列表项目的悬停背景颜色 | ||||||
|          */ |          */ | ||||||
|         hover: null, |         hover: null, | ||||||
|       }, |       }, | ||||||
|   | |||||||
| @@ -1,15 +1,66 @@ | |||||||
| import { css } from "src/types/vars"; | import { css, otherThemeVars, themeVars } from "src/types/vars"; | ||||||
|  |  | ||||||
| export const dashboard = css` | export const dashboard = css` | ||||||
|   .page-content.dashboard { |   .page-content.dashboard { | ||||||
|     // 动态的右侧 svg 图标 |  | ||||||
|     .flex-item .flex-item-trailing svg { |  | ||||||
|       height: 20px; |  | ||||||
|       width: 20px; |  | ||||||
|     } |  | ||||||
|     // 仓库列表的仓库/组织切换按钮 |     // 仓库列表的仓库/组织切换按钮 | ||||||
|     .ui.two.item.menu { |     .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; | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
| `; | `; | ||||||
|   | |||||||
							
								
								
									
										20
									
								
								styles/components/editor.ts
									
									
									
									
									
										Normal 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; | ||||||
|  |       } | ||||||
|  |     } | ||||||
|  |   } | ||||||
|  | `; | ||||||
| @@ -38,10 +38,6 @@ export const repoList = css` | |||||||
|               &:not(a) { |               &:not(a) { | ||||||
|                 color: ${themeVars.color.text.light.num1}; |                 color: ${themeVars.color.text.light.num1}; | ||||||
|               } |               } | ||||||
|               // 仓库类型和状态标签 |  | ||||||
|               > .label-list .label { |  | ||||||
|                 padding: 3px 6px; |  | ||||||
|               } |  | ||||||
|             } |             } | ||||||
|             // 仓库语言, 星标 |             // 仓库语言, 星标 | ||||||
|             > .flex-item-trailing { |             > .flex-item-trailing { | ||||||
| @@ -113,7 +109,6 @@ export const userList = css` | |||||||
|             // 用户标签 |             // 用户标签 | ||||||
|             > .label { |             > .label { | ||||||
|               font-size: 12px; |               font-size: 12px; | ||||||
|               padding: 3px 6px; |  | ||||||
|             } |             } | ||||||
|           } |           } | ||||||
|           // 用户描述 |           // 用户描述 | ||||||
|   | |||||||
| @@ -147,12 +147,77 @@ export const repoFilesMobile = css` | |||||||
| // 仓库打开文件时的视图 | // 仓库打开文件时的视图 | ||||||
| export const repoFileView = css` | export const repoFileView = css` | ||||||
|   .page-content.repository.file.list { |   .page-content.repository.file.list { | ||||||
|  |     > .ui.container.fluid { | ||||||
|  |       max-width: calc(100% - calc(2 * 16px)); | ||||||
|  |     } | ||||||
|     .repo-view-container { |     .repo-view-container { | ||||||
|  |       position: sticky; | ||||||
|  |       top: 0; | ||||||
|  |       // 左侧文件树 | ||||||
|  |       .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 { | ||||||
|  |           align-content: center; | ||||||
|  |           background: ${themeVars.color.body}; | ||||||
|  |           height: 64px; | ||||||
|  |           margin: 0; | ||||||
|  |           position: sticky; | ||||||
|  |           top: 0; | ||||||
|  |           &:after { | ||||||
|  |             content: ""; | ||||||
|  |             position: absolute; | ||||||
|  |             top: 64px; | ||||||
|  |             left: -16px; | ||||||
|  |             width: calc(100% + 16px); | ||||||
|  |             height: 1px; | ||||||
|  |             background: ${themeVars.color.secondary.self}; | ||||||
|  |           } | ||||||
|  |         } | ||||||
|  |         .view-file-tree-items { | ||||||
|  |           margin-right: 0; | ||||||
|  |           padding: 16px 16px 16px 0; | ||||||
|  |         } | ||||||
|  |       } | ||||||
|       // 右侧文件视图内容 |       // 右侧文件视图内容 | ||||||
|       .repo-view-content { |       .repo-view-content { | ||||||
|  |         .repo-button-row { | ||||||
|  |           align-content: 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: 45px; | ||||||
|  |             z-index: 1; | ||||||
|  |           } | ||||||
|  |         } | ||||||
|         // 头部提交信息 |         // 头部提交信息 | ||||||
|         #repo-file-commit-box { |         .ui.segment#repo-file-commit-box { | ||||||
|           padding: 8px 12px; |           padding: 8px 12px; | ||||||
|  |           margin-bottom: 8px !important; | ||||||
|           > .latest-commit { |           > .latest-commit { | ||||||
|             gap: 8px; |             gap: 8px; | ||||||
|           } |           } | ||||||
| @@ -167,6 +232,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` | export const repoGrid = css` | ||||||
|   .repo-grid-filelist-sidebar { |   .repo-grid-filelist-sidebar { | ||||||
|   | |||||||
| @@ -1,7 +1,19 @@ | |||||||
| import { css, themeVars } from "src/types/vars"; | import { css, otherThemeVars, themeVars } from "src/types/vars"; | ||||||
|  |  | ||||||
| export const heatmap = css` | 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 { |     .vch__container { | ||||||
|  |       padding: 12px 20px; | ||||||
|  |       border: 1px solid ${themeVars.color.secondary.self}; | ||||||
|  |       border-radius: ${otherThemeVars.border.radius}; | ||||||
|       // 覆盖热力图和图例的背景色 |       // 覆盖热力图和图例的背景色 | ||||||
|       .vch__day__square, |       .vch__day__square, | ||||||
|       .vch__legend__wrapper rect { |       .vch__legend__wrapper rect { | ||||||
| @@ -48,4 +60,30 @@ 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; | ||||||
|  |  | ||||||
|  |         relative-time { | ||||||
|  |           color: ${themeVars.color.text.light.num1}; | ||||||
|  |         } | ||||||
|  |       } | ||||||
|  |       // 动态的右侧 svg 图标 | ||||||
|  |       .flex-item-trailing svg { | ||||||
|  |         height: 20px; | ||||||
|  |         width: 20px; | ||||||
|  |       } | ||||||
|  |     } | ||||||
|  |   } | ||||||
| `; | `; | ||||||
|   | |||||||
| @@ -7,8 +7,12 @@ import "./explore"; | |||||||
| import "./filelist"; | import "./filelist"; | ||||||
| import "./heatmap"; | import "./heatmap"; | ||||||
| import "./issue"; | import "./issue"; | ||||||
| import "./signin"; |  | ||||||
| import "./newrepo"; | import "./newrepo"; | ||||||
|  | import "./org"; | ||||||
| import "./release"; | import "./release"; | ||||||
| import "./repo"; | import "./repo"; | ||||||
| import "./setting"; | import "./setting"; | ||||||
|  | import "./signin"; | ||||||
|  | import "./user"; | ||||||
|  | import "./chroma"; | ||||||
|  | import "./editor" | ||||||
| @@ -1,6 +1,115 @@ | |||||||
| import { css, otherThemeVars, themeVars } from "src/types/vars"; | import { css, otherThemeVars, themeVars } from "src/types/vars"; | ||||||
| import { activeItemAfterStyle } from "styles/public/menu"; | 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` | export const button = css` | ||||||
|   .issue-content-left .field.footer { |   .issue-content-left .field.footer { | ||||||
|     // 关闭工单按钮 |     // 关闭工单按钮 | ||||||
| @@ -18,6 +127,11 @@ export const button = css` | |||||||
|       color: ${themeVars.github.fgColor.success}; |       color: ${themeVars.github.fgColor.success}; | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
|  |   // 工单&PR标题右侧按钮 | ||||||
|  |   .repository.view.issue .issue-title-buttons > .ui.button { | ||||||
|  |     padding: 0 12px; | ||||||
|  |     height: 32px; | ||||||
|  |   } | ||||||
| `; | `; | ||||||
|  |  | ||||||
| export const babel = css` | export const babel = css` | ||||||
| @@ -103,6 +217,7 @@ export const comment = css` | |||||||
|     } |     } | ||||||
|     .comment-header { |     .comment-header { | ||||||
|       padding: 4px 4px 4px 16px; |       padding: 4px 4px 4px 16px; | ||||||
|  |       min-height: 38px; | ||||||
|     } |     } | ||||||
|     .comment-header-right { |     .comment-header-right { | ||||||
|       > .item, |       > .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
									
								
							
							
						
						| @@ -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}; | ||||||
|  |           } | ||||||
|  |         } | ||||||
|  |       } | ||||||
|  |     } | ||||||
|  |   } | ||||||
|  | `; | ||||||
| @@ -15,7 +15,7 @@ export const signIn = css` | |||||||
|       font-size: 20px; |       font-size: 20px; | ||||||
|       font-weight: 600; |       font-weight: 600; | ||||||
|       background-color: unset !important; |       background-color: unset !important; | ||||||
|       margin-bottom: 0.25rem; |       padding: 16px; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     .ui.attached.segment { |     .ui.attached.segment { | ||||||
|   | |||||||
							
								
								
									
										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; | ||||||
|  |             } | ||||||
|  |           } | ||||||
|  |         } | ||||||
|  |       } | ||||||
|  |     } | ||||||
|  |   } | ||||||
|  | `; | ||||||
| @@ -10,6 +10,7 @@ export const attached = css` | |||||||
|   // 新建页面内容 |   // 新建页面内容 | ||||||
|   .page-content.repository.new-repo, |   .page-content.repository.new-repo, | ||||||
|   .page-content.repository.new.migrate, |   .page-content.repository.new.migrate, | ||||||
|  |   .page-content.repository.new.fork, | ||||||
|   .page-content.organization.new.org { |   .page-content.organization.new.org { | ||||||
|     .ui.top.attached.header { |     .ui.top.attached.header { | ||||||
|       border: 0; |       border: 0; | ||||||
|   | |||||||
| @@ -5,7 +5,6 @@ import "./radius"; // 圆角, 此样式为基础样式, 确保在其他样式之 | |||||||
| import "./transition"; // 过渡效果 | import "./transition"; // 过渡效果 | ||||||
| import "./text"; // 文本或 SVG 的基本颜色 | import "./text"; // 文本或 SVG 的基本颜色 | ||||||
| import "./button"; // 按钮 | import "./button"; // 按钮 | ||||||
| import "./chroma"; // 代码高亮 |  | ||||||
| import "./dropdown"; // 下拉框 | import "./dropdown"; // 下拉框 | ||||||
| import "./input"; // 输入框 | import "./input"; // 输入框 | ||||||
| import "./label"; // 标签 | import "./label"; // 标签 | ||||||
|   | |||||||
| @@ -166,12 +166,19 @@ export const taskStatusLabel = css` | |||||||
| // 仓库标签 (私有/公开/内部) | // 仓库标签 (私有/公开/内部) | ||||||
| export const repoLabel = css` | export const repoLabel = css` | ||||||
|   span, |   span, | ||||||
|  |   // 用户切换面板的标签 | ||||||
|   .org-visibility div { |   .org-visibility div { | ||||||
|     &.ui.basic.label { |     &.ui.basic.label { | ||||||
|       background-color: unset; |       background-color: unset; | ||||||
|       color: ${themeVars.color.text.light.num1}; |       color: ${themeVars.color.text.light.num1}; | ||||||
|  |       font-size: 12px; | ||||||
|  |       font-weight: 500; | ||||||
|  |       padding: 3px 6px; | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
|  |   .org-visibility span.ui.basic.label { | ||||||
|  |     font-size: 14px; | ||||||
|  |   } | ||||||
| `; | `; | ||||||
|  |  | ||||||
| // 软件包列表 | // 软件包列表 | ||||||
|   | |||||||
| @@ -219,7 +219,6 @@ export const paginationMenu = css` | |||||||
|         &:hover { |         &:hover { | ||||||
|           background: unset; |           background: unset; | ||||||
|           border-color: ${themeVars.color.secondary.self}; |           border-color: ${themeVars.color.secondary.self}; | ||||||
|           transition-duration: 0.1s; |  | ||||||
|         } |         } | ||||||
|       } |       } | ||||||
|       &.navigation { |       &.navigation { | ||||||
|   | |||||||
| @@ -77,6 +77,19 @@ export const navbarRight = css` | |||||||
|           left: 22px; |           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; | ||||||
|  |         } | ||||||
|  |       } | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
|   // 手机下的创建菜单按钮 |   // 手机下的创建菜单按钮 | ||||||
|   | |||||||
| @@ -2,6 +2,18 @@ import { css } from "src/types/vars"; | |||||||
|  |  | ||||||
| // 简单的渐变过渡 | // 简单的渐变过渡 | ||||||
| export const transition = css` | 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, |   #navbar .item, | ||||||
|   .header-wrapper .ui.tabular.menu .item, |   .header-wrapper .ui.tabular.menu .item, | ||||||
| @@ -9,11 +21,6 @@ export const transition = css` | |||||||
|   .job-step-logs, |   .job-step-logs, | ||||||
|   .job-brief-item, |   .job-brief-item, | ||||||
|   .repo-file-cell, |   .repo-file-cell, | ||||||
|   // 差异对比的代码折叠按钮 |  | ||||||
|   .code-expander-button, |  | ||||||
|   // 仓库 README 头部的按钮 |  | ||||||
|   .file-header-left, |  | ||||||
|   .file-header-right, |  | ||||||
|   .tippy-box .flex-items-block .item, |   .tippy-box .flex-items-block .item, | ||||||
|   .clone-panel-tab .item, |   .clone-panel-tab .item, | ||||||
|   .ui.form select, |   .ui.form select, | ||||||
|   | |||||||
							
								
								
									
										73
									
								
								themes/colorblind-dark.css.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,73 @@ | |||||||
|  | import { defineTheme, type Chroma, type ThemeColor } from "src"; | ||||||
|  | import { github2ThemeColor, type GithubColor } from "src/core/github"; | ||||||
|  | import { prettylights2Chroma, type prettylightsColor } from "src/core/prettylights"; | ||||||
|  | import { darkGithubColors } from "themes/dark"; | ||||||
|  |  | ||||||
|  | export const colorblindDarkGithubColors: GithubColor = { | ||||||
|  |   isDarkTheme: true, | ||||||
|  |   display: darkGithubColors.display, | ||||||
|  |   diffBlob: { | ||||||
|  |     addtionNum: { bgColor: "#58a6ff4d" }, | ||||||
|  |     addtionWord: { bgColor: "#388bfd66" }, | ||||||
|  |     deletionNum: { bgColor: "#db6d284d" }, | ||||||
|  |     deletionWord: { bgColor: "#db6d2866" }, | ||||||
|  |     hunkNum: { bgColor: { rest: "#2f3742" } }, | ||||||
|  |   }, | ||||||
|  |   fgColor: { | ||||||
|  |     ...darkGithubColors.fgColor, | ||||||
|  |     danger: "#f0883e", | ||||||
|  |     success: "#58a6ff", | ||||||
|  |   }, | ||||||
|  |   bgColor: { | ||||||
|  |     ...darkGithubColors.bgColor, | ||||||
|  |     danger: { muted: "#db6d281a" }, | ||||||
|  |     success: { emphasis: "#1f6feb", muted: "#388bfd33" }, | ||||||
|  |   }, | ||||||
|  |   borderColor: { | ||||||
|  |     ...darkGithubColors.borderColor, | ||||||
|  |     success: { emphasis: "#1f6feb" }, | ||||||
|  |   }, | ||||||
|  |   button: { | ||||||
|  |     primary: { fgColor: { rest: "#ffffff" }, bgColor: { hover: "#2a7aef" } }, | ||||||
|  |     danger: { fgColor: { rest: "#f0883e", hover: "#ffffff" }, bgColor: { hover: "#9b4215" } }, | ||||||
|  |   }, | ||||||
|  |   control: darkGithubColors.control, | ||||||
|  |   shadow: darkGithubColors.shadow, | ||||||
|  |   overlay: darkGithubColors.overlay, | ||||||
|  |   underlineNav: darkGithubColors.underlineNav, | ||||||
|  |   contribution: darkGithubColors.contribution, | ||||||
|  | }; | ||||||
|  | export const colorblindDarkPrettylights: prettylightsColor = { | ||||||
|  |   syntax: { | ||||||
|  |     brackethighlighter: { angle: "#9198a1", unmatched: "#db6d28" }, | ||||||
|  |     carriage: { return: { bg: "#9b4215", text: "#f0f6fc" } }, | ||||||
|  |     comment: "#9198a1", | ||||||
|  |     constant: "#79c0ff", | ||||||
|  |     constantOtherReferenceLink: "#a5d6ff", | ||||||
|  |     entity: "#d2a8ff", | ||||||
|  |     entityTag: "#a5d6ff", | ||||||
|  |     invalid: { illegal: { bg: "#762d0a", text: "#f0f6fc" } }, | ||||||
|  |     keyword: "#f0883e", | ||||||
|  |     markup: { | ||||||
|  |       bold: "#f0f6fc", | ||||||
|  |       changed: { bg: "#5a1e02", text: "#ffdfb6" }, | ||||||
|  |       deleted: { bg: "#5a1e02", text: "#ffdfb6" }, | ||||||
|  |       heading: "#1f6feb", | ||||||
|  |       ignored: { bg: "#1158c7", text: "#f0f6fc" }, | ||||||
|  |       inserted: { bg: "#0c2d6b", text: "#cae8ff" }, | ||||||
|  |       italic: "#f0f6fc", | ||||||
|  |       list: "#f2cc60", | ||||||
|  |     }, | ||||||
|  |     metaDiffRange: "#d2a8ff", | ||||||
|  |     storageModifierImport: "#f0f6fc", | ||||||
|  |     string: "#a5d6ff", | ||||||
|  |     stringRegexp: "#a5d6ff", | ||||||
|  |     sublimelinterGutterMark: "#3d444d", | ||||||
|  |     variable: "#ffa657", | ||||||
|  |   }, | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | export const colorblindDarkColors: ThemeColor = github2ThemeColor(colorblindDarkGithubColors); | ||||||
|  | export const colorblindDarkChroma: Chroma = prettylights2Chroma(colorblindDarkPrettylights); | ||||||
|  |  | ||||||
|  | export default defineTheme(colorblindDarkColors); | ||||||
							
								
								
									
										73
									
								
								themes/colorblind-light.css.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,73 @@ | |||||||
|  | import { defineTheme, type Chroma, type ThemeColor } from "src"; | ||||||
|  | import { github2ThemeColor, type GithubColor } from "src/core/github"; | ||||||
|  | import { prettylights2Chroma, type prettylightsColor } from "src/core/prettylights"; | ||||||
|  | import { lightGithubColors } from "themes/light"; | ||||||
|  |  | ||||||
|  | export const colorblindLightGithubColors: GithubColor = { | ||||||
|  |   isDarkTheme: false, | ||||||
|  |   display: lightGithubColors.display, | ||||||
|  |   diffBlob: { | ||||||
|  |     addtionNum: { bgColor: "#b6e3ff" }, | ||||||
|  |     addtionWord: { bgColor: "#b6e3ff" }, | ||||||
|  |     deletionNum: { bgColor: "#ffd8b5" }, | ||||||
|  |     deletionWord: { bgColor: "#ffd8b5" }, | ||||||
|  |     hunkNum: { bgColor: { rest: "#e6eaef" } }, | ||||||
|  |   }, | ||||||
|  |   fgColor: { | ||||||
|  |     ...lightGithubColors.fgColor, | ||||||
|  |     danger: "#bc4c00", | ||||||
|  |     success: "#0969da", | ||||||
|  |   }, | ||||||
|  |   bgColor: { | ||||||
|  |     ...lightGithubColors.bgColor, | ||||||
|  |     danger: { muted: "#fff1e5" }, | ||||||
|  |     success: { emphasis: "#0969da", muted: "#ddf4ff" }, | ||||||
|  |   }, | ||||||
|  |   borderColor: { | ||||||
|  |     ...lightGithubColors.borderColor, | ||||||
|  |     success: { emphasis: "#0969da" }, | ||||||
|  |   }, | ||||||
|  |   button: { | ||||||
|  |     primary: { fgColor: { rest: "#ffffff" }, bgColor: { hover: "#0864d1" } }, | ||||||
|  |     danger: { fgColor: { rest: "#bc4c00", hover: "#ffffff" }, bgColor: { hover: "#bc4c00" } }, | ||||||
|  |   }, | ||||||
|  |   control: lightGithubColors.control, | ||||||
|  |   shadow: lightGithubColors.shadow, | ||||||
|  |   overlay: lightGithubColors.overlay, | ||||||
|  |   underlineNav: lightGithubColors.underlineNav, | ||||||
|  |   contribution: lightGithubColors.contribution, | ||||||
|  | }; | ||||||
|  | export const colorblindLightPrettylights: prettylightsColor = { | ||||||
|  |   syntax: { | ||||||
|  |     brackethighlighter: { angle: "#59636e", unmatched: "#762c00" }, | ||||||
|  |     carriage: { return: { bg: "#bc4c00", text: "#f6f8fa" } }, | ||||||
|  |     comment: "#59636e", | ||||||
|  |     constant: "#0550ae", | ||||||
|  |     constantOtherReferenceLink: "#0a3069", | ||||||
|  |     entity: "#6639ba", | ||||||
|  |     entityTag: "#0550ae", | ||||||
|  |     invalid: { illegal: { bg: "#762c00", text: "#f6f8fa" } }, | ||||||
|  |     keyword: "#bc4c00", | ||||||
|  |     markup: { | ||||||
|  |       bold: "#1f2328", | ||||||
|  |       changed: { bg: "#ffd8b5", text: "#953800" }, | ||||||
|  |       deleted: { bg: "#fff1e5", text: "#762c00" }, | ||||||
|  |       heading: "#0550ae", | ||||||
|  |       ignored: { bg: "#0550ae", text: "#d1d9e0" }, | ||||||
|  |       inserted: { bg: "#ddf4ff", text: "#0550ae" }, | ||||||
|  |       italic: "#1f2328", | ||||||
|  |       list: "#3b2300", | ||||||
|  |     }, | ||||||
|  |     metaDiffRange: "#8250df", | ||||||
|  |     storageModifierImport: "#1f2328", | ||||||
|  |     string: "#0a3069", | ||||||
|  |     stringRegexp: "#0550ae", | ||||||
|  |     sublimelinterGutterMark: "#818b98", | ||||||
|  |     variable: "#953800", | ||||||
|  |   }, | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | export const colorblindLightColors: ThemeColor = github2ThemeColor(colorblindLightGithubColors); | ||||||
|  | export const colorblindLightChroma: Chroma = prettylights2Chroma(colorblindLightPrettylights); | ||||||
|  |  | ||||||
|  | export default defineTheme(colorblindLightColors); | ||||||
| @@ -1,6 +1,7 @@ | |||||||
| import { defineGithubTheme } from "src/core/github"; | import { defineTheme, type ThemeColor } from "src"; | ||||||
|  | import { github2ThemeColor, type GithubColor } from "src/core/github"; | ||||||
|  |  | ||||||
| export default defineGithubTheme({ | export const darkGithubColors: GithubColor = { | ||||||
|   isDarkTheme: true, |   isDarkTheme: true, | ||||||
|   display: { |   display: { | ||||||
|     brown: { fgColor: "#b69a6d" }, |     brown: { fgColor: "#b69a6d" }, | ||||||
| @@ -22,7 +23,7 @@ export default defineGithubTheme({ | |||||||
|     attention: "#d29922", |     attention: "#d29922", | ||||||
|     danger: "#f85149", |     danger: "#f85149", | ||||||
|     default: "#f0f6fc", |     default: "#f0f6fc", | ||||||
|     disabled: "#656c7699", |     disabled: "#656c76", | ||||||
|     done: "#ab7df8", |     done: "#ab7df8", | ||||||
|     muted: "#9198a1", |     muted: "#9198a1", | ||||||
|     neutral: "#9198a1", |     neutral: "#9198a1", | ||||||
| @@ -35,20 +36,20 @@ export default defineGithubTheme({ | |||||||
|   bgColor: { |   bgColor: { | ||||||
|     accent: { emphasis: "#1f6feb", muted: "#388bfd1a" }, |     accent: { emphasis: "#1f6feb", muted: "#388bfd1a" }, | ||||||
|     attention: { muted: "#bb800926" }, |     attention: { muted: "#bb800926" }, | ||||||
|     success: { emphasis: "#238636", muted: "#2ea04326" }, |  | ||||||
|     danger: { muted: "#f851491a" }, |     danger: { muted: "#f851491a" }, | ||||||
|     done: { emphasis: "#8957e5" }, |  | ||||||
|     default: "#0d1117", |     default: "#0d1117", | ||||||
|     inset: "#010409", |     done: { emphasis: "#8957e5" }, | ||||||
|     muted: "#151b23", |     muted: "#151b23", | ||||||
|     neutral: { muted: "#656c7633" }, |     neutral: { muted: "#656c7633" }, | ||||||
|  |     success: { emphasis: "#238636", muted: "#2ea04326" }, | ||||||
|  |     inset: "#010409", | ||||||
|   }, |   }, | ||||||
|   borderColor: { |   borderColor: { | ||||||
|     accent: { emphasis: "#1f6feb" }, |     accent: { emphasis: "#1f6feb" }, | ||||||
|     default: "#3d444d", |  | ||||||
|     attention: { emphasis: "#9e6a03" }, |     attention: { emphasis: "#9e6a03" }, | ||||||
|     success: { emphasis: "#238636" }, |     default: "#3d444d", | ||||||
|     done: { emphasis: "#8957e5" }, |     done: { emphasis: "#8957e5" }, | ||||||
|  |     success: { emphasis: "#238636" }, | ||||||
|     muted: "#3d444db3", |     muted: "#3d444db3", | ||||||
|     translucent: "#ffffff26", |     translucent: "#ffffff26", | ||||||
|   }, |   }, | ||||||
| @@ -69,4 +70,8 @@ export default defineGithubTheme({ | |||||||
|       borderColor: { num0: "#0104090d" }, |       borderColor: { num0: "#0104090d" }, | ||||||
|     }, |     }, | ||||||
|   }, |   }, | ||||||
| }); | }; | ||||||
|  |  | ||||||
|  | export const darkColors: ThemeColor = github2ThemeColor(darkGithubColors); | ||||||
|  |  | ||||||
|  | export default defineTheme(darkColors); | ||||||
|   | |||||||
| @@ -1,6 +1,7 @@ | |||||||
| import { defineGithubTheme } from "src/core/github"; | import { defineTheme, type ThemeColor } from "src"; | ||||||
|  | import { github2ThemeColor, type GithubColor } from "src/core/github"; | ||||||
|  |  | ||||||
| export default defineGithubTheme({ | export const lightGithubColors: GithubColor = { | ||||||
|   isDarkTheme: false, |   isDarkTheme: false, | ||||||
|   display: { |   display: { | ||||||
|     brown: { fgColor: "#755f43" }, |     brown: { fgColor: "#755f43" }, | ||||||
| @@ -35,20 +36,20 @@ export default defineGithubTheme({ | |||||||
|   bgColor: { |   bgColor: { | ||||||
|     accent: { emphasis: "#0969da", muted: "#ddf4ff" }, |     accent: { emphasis: "#0969da", muted: "#ddf4ff" }, | ||||||
|     attention: { muted: "#fff8c5" }, |     attention: { muted: "#fff8c5" }, | ||||||
|     success: { emphasis: "#1f883d", muted: "#dafbe1" }, |  | ||||||
|     danger: { muted: "#ffebe9" }, |     danger: { muted: "#ffebe9" }, | ||||||
|     done: { emphasis: "#8250df" }, |  | ||||||
|     default: "#ffffff", |     default: "#ffffff", | ||||||
|     inset: "#f6f8fa", |     done: { emphasis: "#8250df" }, | ||||||
|     muted: "#f6f8fa", |     muted: "#f6f8fa", | ||||||
|     neutral: { muted: "#818b981f" }, |     neutral: { muted: "#818b981f" }, | ||||||
|  |     success: { emphasis: "#1f883d", muted: "#dafbe1" }, | ||||||
|  |     inset: "#f6f8fa", | ||||||
|   }, |   }, | ||||||
|   borderColor: { |   borderColor: { | ||||||
|     accent: { emphasis: "#0969da" }, |     accent: { emphasis: "#0969da" }, | ||||||
|     default: "#d1d9e0", |  | ||||||
|     attention: { emphasis: "#9a6700" }, |     attention: { emphasis: "#9a6700" }, | ||||||
|     success: { emphasis: "#1a7f37" }, |     default: "#d1d9e0", | ||||||
|     done: { emphasis: "#8250df" }, |     done: { emphasis: "#8250df" }, | ||||||
|  |     success: { emphasis: "#1a7f37" }, | ||||||
|     muted: "#d1d9e0b3", |     muted: "#d1d9e0b3", | ||||||
|     translucent: "#1f232826", |     translucent: "#1f232826", | ||||||
|   }, |   }, | ||||||
| @@ -69,4 +70,8 @@ export default defineGithubTheme({ | |||||||
|       borderColor: { num0: "#1f23280d" }, |       borderColor: { num0: "#1f23280d" }, | ||||||
|     }, |     }, | ||||||
|   }, |   }, | ||||||
| }); | }; | ||||||
|  |  | ||||||
|  | export const lightColors: ThemeColor = github2ThemeColor(lightGithubColors); | ||||||
|  |  | ||||||
|  | export default defineTheme(lightColors); | ||||||
|   | |||||||
| @@ -1,17 +1,11 @@ | |||||||
| import { defineGithubTheme } from "src/core/github"; | import { defineTheme, type Chroma, type ThemeColor } from "src"; | ||||||
| import { prettylights2Chroma } from "src/core/prettylights"; | import { github2ThemeColor, type GithubColor } from "src/core/github"; | ||||||
|  | import { prettylights2Chroma, type prettylightsColor } from "src/core/prettylights"; | ||||||
|  | import { darkGithubColors } from "themes/dark"; | ||||||
|  |  | ||||||
| export default defineGithubTheme( | export const softDarkGithubColors: GithubColor = { | ||||||
|   { |  | ||||||
|   isDarkTheme: true, |   isDarkTheme: true, | ||||||
|     display: { |   display: darkGithubColors.display, | ||||||
|       brown: { fgColor: "#b69a6d" }, |  | ||||||
|       cyan: { fgColor: "#07ace4" }, |  | ||||||
|       indigo: { fgColor: "#9899ec" }, |  | ||||||
|       lemon: { fgColor: "#ba9b12" }, |  | ||||||
|       olive: { fgColor: "#a2a626" }, |  | ||||||
|       teal: { fgColor: "#1cb0ab" }, |  | ||||||
|     }, |  | ||||||
|   diffBlob: { |   diffBlob: { | ||||||
|     addtionNum: { bgColor: "#57ab5a4d" }, |     addtionNum: { bgColor: "#57ab5a4d" }, | ||||||
|     addtionWord: { bgColor: "#46954a66" }, |     addtionWord: { bgColor: "#46954a66" }, | ||||||
| @@ -37,20 +31,20 @@ export default defineGithubTheme( | |||||||
|   bgColor: { |   bgColor: { | ||||||
|     accent: { emphasis: "#316dca", muted: "#4184e41a" }, |     accent: { emphasis: "#316dca", muted: "#4184e41a" }, | ||||||
|     attention: { muted: "#ae7c1426" }, |     attention: { muted: "#ae7c1426" }, | ||||||
|       success: { emphasis: "#347d39", muted: "#46954a26" }, |  | ||||||
|     danger: { muted: "#e5534b1a" }, |     danger: { muted: "#e5534b1a" }, | ||||||
|       done: { emphasis: "#8256d0" }, |  | ||||||
|     default: "#212830", |     default: "#212830", | ||||||
|       inset: "#151b23", |     done: { emphasis: "#8256d0" }, | ||||||
|     muted: "#262c36", |     muted: "#262c36", | ||||||
|     neutral: { muted: "#656c7633" }, |     neutral: { muted: "#656c7633" }, | ||||||
|  |     success: { emphasis: "#347d39", muted: "#46954a26" }, | ||||||
|  |     inset: "#151b23", | ||||||
|   }, |   }, | ||||||
|   borderColor: { |   borderColor: { | ||||||
|     accent: { emphasis: "#316dca" }, |     accent: { emphasis: "#316dca" }, | ||||||
|       default: "#3d444d", |  | ||||||
|     attention: { emphasis: "#966600" }, |     attention: { emphasis: "#966600" }, | ||||||
|       success: { emphasis: "#347d39" }, |     default: "#3d444d", | ||||||
|     done: { emphasis: "#8256d0" }, |     done: { emphasis: "#8256d0" }, | ||||||
|  |     success: { emphasis: "#347d39" }, | ||||||
|     muted: "#3d444db3", |     muted: "#3d444db3", | ||||||
|     translucent: "#cdd9e526", |     translucent: "#cdd9e526", | ||||||
|   }, |   }, | ||||||
| @@ -71,8 +65,9 @@ export default defineGithubTheme( | |||||||
|       borderColor: { num0: "#0104090d" }, |       borderColor: { num0: "#0104090d" }, | ||||||
|     }, |     }, | ||||||
|   }, |   }, | ||||||
|   }, | }; | ||||||
|   prettylights2Chroma({ |  | ||||||
|  | export const softDarkPrettylights: prettylightsColor = { | ||||||
|   syntax: { |   syntax: { | ||||||
|     brackethighlighter: { angle: "#9198a1", unmatched: "#e5534b" }, |     brackethighlighter: { angle: "#9198a1", unmatched: "#e5534b" }, | ||||||
|     carriage: { return: { bg: "#ad2e2c", text: "#f0f6fc" } }, |     carriage: { return: { bg: "#ad2e2c", text: "#f0f6fc" } }, | ||||||
| @@ -100,5 +95,9 @@ export default defineGithubTheme( | |||||||
|     sublimelinterGutterMark: "#3d444d", |     sublimelinterGutterMark: "#3d444d", | ||||||
|     variable: "#f69d50", |     variable: "#f69d50", | ||||||
|   }, |   }, | ||||||
|   }) | }; | ||||||
| ); |  | ||||||
|  | export const softDarkColors: ThemeColor = github2ThemeColor(softDarkGithubColors); | ||||||
|  | export const softDarkChroma: Chroma = prettylights2Chroma(softDarkPrettylights); | ||||||
|  |  | ||||||
|  | export default defineTheme(softDarkColors, softDarkChroma); | ||||||
|   | |||||||
							
								
								
									
										45
									
								
								themes/tritanopia-dark.css.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,45 @@ | |||||||
|  | import { defineTheme, type Chroma, type ThemeColor } from "src"; | ||||||
|  | import { darkPrettylights } from "src/core/chroma"; | ||||||
|  | import { github2ThemeColor, type GithubColor } from "src/core/github"; | ||||||
|  | import { prettylights2Chroma, type prettylightsColor } from "src/core/prettylights"; | ||||||
|  | import { colorblindDarkGithubColors, colorblindDarkPrettylights } from "themes/colorblind-dark"; | ||||||
|  | import { darkGithubColors } from "themes/dark"; | ||||||
|  |  | ||||||
|  | export const tritanopiaDarkGithubColors: GithubColor = { | ||||||
|  |   ...colorblindDarkGithubColors, | ||||||
|  |   diffBlob: { | ||||||
|  |     ...colorblindDarkGithubColors.diffBlob, | ||||||
|  |     deletionNum: darkGithubColors.diffBlob.deletionNum, | ||||||
|  |     deletionWord: darkGithubColors.diffBlob.deletionWord, | ||||||
|  |   }, | ||||||
|  |   fgColor: { | ||||||
|  |     ...colorblindDarkGithubColors.fgColor, | ||||||
|  |     danger: darkGithubColors.fgColor.danger, | ||||||
|  |   }, | ||||||
|  |   bgColor: { | ||||||
|  |     ...colorblindDarkGithubColors.bgColor, | ||||||
|  |     danger: darkGithubColors.bgColor.danger, | ||||||
|  |   }, | ||||||
|  |   button: { | ||||||
|  |     ...colorblindDarkGithubColors.button, | ||||||
|  |     danger: darkGithubColors.button.danger, | ||||||
|  |   }, | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | export const tritanopiaDarkPrettylights: prettylightsColor = { | ||||||
|  |   syntax: { | ||||||
|  |     ...darkPrettylights.syntax, | ||||||
|  |     markup: { | ||||||
|  |       ...darkPrettylights.syntax.markup, | ||||||
|  |       changed: { bg: "#67060c", text: "#ffdcd7" }, | ||||||
|  |       inserted: colorblindDarkPrettylights.syntax.markup.inserted, | ||||||
|  |     }, | ||||||
|  |     stringRegexp: colorblindDarkPrettylights.syntax.stringRegexp, | ||||||
|  |     variable: "#ffa198", | ||||||
|  |   }, | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | export const tritanopiaDarkColors: ThemeColor = github2ThemeColor(tritanopiaDarkGithubColors); | ||||||
|  | export const tritanopiaDarkChroma: Chroma = prettylights2Chroma(tritanopiaDarkPrettylights); | ||||||
|  |  | ||||||
|  | export default defineTheme(tritanopiaDarkColors, tritanopiaDarkChroma); | ||||||
							
								
								
									
										45
									
								
								themes/tritanopia-light.css.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,45 @@ | |||||||
|  | import { defineTheme, type Chroma, type ThemeColor } from "src"; | ||||||
|  | import { lightPrettylights } from "src/core/chroma"; | ||||||
|  | import { github2ThemeColor, type GithubColor } from "src/core/github"; | ||||||
|  | import { prettylights2Chroma, type prettylightsColor } from "src/core/prettylights"; | ||||||
|  | import { colorblindLightGithubColors, colorblindLightPrettylights } from "themes/colorblind-light"; | ||||||
|  | import { lightGithubColors } from "themes/light"; | ||||||
|  |  | ||||||
|  | export const tritanopiaLightGithubColors: GithubColor = { | ||||||
|  |   ...colorblindLightGithubColors, | ||||||
|  |   diffBlob: { | ||||||
|  |     ...colorblindLightGithubColors.diffBlob, | ||||||
|  |     deletionNum: lightGithubColors.diffBlob.deletionNum, | ||||||
|  |     deletionWord: lightGithubColors.diffBlob.deletionWord, | ||||||
|  |   }, | ||||||
|  |   fgColor: { | ||||||
|  |     ...colorblindLightGithubColors.fgColor, | ||||||
|  |     danger: lightGithubColors.fgColor.danger, | ||||||
|  |   }, | ||||||
|  |   bgColor: { | ||||||
|  |     ...colorblindLightGithubColors.bgColor, | ||||||
|  |     danger: lightGithubColors.bgColor.danger, | ||||||
|  |   }, | ||||||
|  |   button: { | ||||||
|  |     ...colorblindLightGithubColors.button, | ||||||
|  |     danger: lightGithubColors.button.danger, | ||||||
|  |   }, | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | export const tritanopiaLightPrettylights: prettylightsColor = { | ||||||
|  |   syntax: { | ||||||
|  |     ...lightPrettylights.syntax, | ||||||
|  |     markup: { | ||||||
|  |       ...lightPrettylights.syntax.markup, | ||||||
|  |       changed: { bg: "#ffcecb", text: "#a40e26" }, | ||||||
|  |       inserted: colorblindLightPrettylights.syntax.markup.inserted, | ||||||
|  |     }, | ||||||
|  |     stringRegexp: colorblindLightPrettylights.syntax.stringRegexp, | ||||||
|  |     variable: "#a40e26", | ||||||
|  |   }, | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | export const tritanopiaLightColors: ThemeColor = github2ThemeColor(tritanopiaLightGithubColors); | ||||||
|  | export const tritanopiaLightChroma: Chroma = prettylights2Chroma(tritanopiaLightPrettylights); | ||||||
|  |  | ||||||
|  | export default defineTheme(tritanopiaLightColors, tritanopiaLightChroma); | ||||||