mirror of
				https://github.com/lutinglt/gitea-github-theme.git
				synced 2025-10-27 22:40:30 +00:00 
			
		
		
		
	Compare commits
	
		
			9 Commits
		
	
	
		
			v1.24.4.25
			...
			0711f1e67d
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|   | 0711f1e67d | ||
|   | 25ab06cf11 | ||
|   | d0b177fe7e | ||
|   | 8792a43644 | ||
|   | 453fc5383d | ||
|   | 4fa1d4ff18 | ||
|   | efe5e6ecbb | ||
|   | 1c05717011 | ||
|   | 9804a4e5c6 | 
							
								
								
									
										8
									
								
								.github/release.md
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										8
									
								
								.github/release.md
									
									
									
									
										vendored
									
									
								
							| @@ -2,11 +2,11 @@ | |||||||
|  |  | ||||||
| #### 更符合 GitHub 风格 | #### 更符合 GitHub 风格 | ||||||
|  |  | ||||||
|  | - 同步 PR 的合并提交操作面板样式 | ||||||
|  | - 同步 Issue/PR 的时间线样式 | ||||||
|  |  | ||||||
| ## 🎈 Perf | ## 🎈 Perf | ||||||
|  |  | ||||||
| - 优化提交中 Action 状态标签的位置 | - 优化全局按钮样式 | ||||||
| - 优化按钮和菜单下的图标颜色 |  | ||||||
| - 优化仓库发布中的分支选择按钮样式 |  | ||||||
| - 优化向上弹窗的菜单动画 |  | ||||||
|  |  | ||||||
| ## 🐞 Fix | ## 🐞 Fix | ||||||
|   | |||||||
| @@ -350,6 +350,9 @@ export function defineGithubTheme(githubColor: GithubColor): Theme { | |||||||
|       }, |       }, | ||||||
|     }, |     }, | ||||||
|     control: { |     control: { | ||||||
|  |       bgColor: { | ||||||
|  |         rest: githubColor.control.bgColor.rest, | ||||||
|  |       }, | ||||||
|       transparent: { |       transparent: { | ||||||
|         bgColor: { |         bgColor: { | ||||||
|           hover: githubColor.control.transparent.bgColor.hover, |           hover: githubColor.control.transparent.bgColor.hover, | ||||||
|   | |||||||
| @@ -41,6 +41,7 @@ export const github = { | |||||||
|     success: { |     success: { | ||||||
|       /** 成功的背景颜色 |       /** 成功的背景颜色 | ||||||
|        * @issue `babel` 重新开启图标背景颜色 |        * @issue `babel` 重新开启图标背景颜色 | ||||||
|  |        * @issue `prMerge` 合并提交的图标背景色 | ||||||
|        */ |        */ | ||||||
|       emphasis: null, |       emphasis: null, | ||||||
|     }, |     }, | ||||||
| @@ -157,6 +158,12 @@ export const github = { | |||||||
|     }, |     }, | ||||||
|   }, |   }, | ||||||
|   control: { |   control: { | ||||||
|  |     bgColor: { | ||||||
|  |       /** 背景色 | ||||||
|  |        * @issue `timeline` 时间线标签背景色 | ||||||
|  |        */ | ||||||
|  |       rest: null, | ||||||
|  |     }, | ||||||
|     transparent: { |     transparent: { | ||||||
|       bgColor: { |       bgColor: { | ||||||
|         /** 悬停色 |         /** 悬停色 | ||||||
|   | |||||||
| @@ -16,16 +16,6 @@ export const branchButton = css` | |||||||
|   } |   } | ||||||
| `; | `; | ||||||
|  |  | ||||||
| // 仓库按钮 |  | ||||||
| export const repoButton = css` |  | ||||||
|   .page-content.repository.file.list { |  | ||||||
|     // clone 按钮调整 |  | ||||||
|     .repo-button-row .repo-button-row-right .ui.primary.button span { |  | ||||||
|       margin: 0px 3px; |  | ||||||
|     } |  | ||||||
|   } |  | ||||||
| `; |  | ||||||
|  |  | ||||||
| // 仓库文件列表 | // 仓库文件列表 | ||||||
| export const repoFiles = css` | export const repoFiles = css` | ||||||
|   .repository.file.list { |   .repository.file.list { | ||||||
| @@ -198,7 +188,7 @@ export const repoSidebarBottom = css` | |||||||
|         .color-icon { |         .color-icon { | ||||||
|           height: 8px; |           height: 8px; | ||||||
|           width: 8px; |           width: 8px; | ||||||
|           margin-right: 6px; |           margin-right: 8px; | ||||||
|         } |         } | ||||||
|         .tw-font-semibold { |         .tw-font-semibold { | ||||||
|           color: ${themeVars.color.text.self}; |           color: ${themeVars.color.text.self}; | ||||||
|   | |||||||
| @@ -1,4 +1,4 @@ | |||||||
| import { css, 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"; | ||||||
|  |  | ||||||
| export const button = css` | export const button = css` | ||||||
| @@ -26,17 +26,14 @@ export const babel = css` | |||||||
|       // 时间线打开状态标签 |       // 时间线打开状态标签 | ||||||
|       &.tw-bg-green { |       &.tw-bg-green { | ||||||
|         background-color: ${themeVars.github.bgColor.success.emphasis} !important; |         background-color: ${themeVars.github.bgColor.success.emphasis} !important; | ||||||
|         border-color: ${themeVars.github.bgColor.success.emphasis} !important; |  | ||||||
|       } |       } | ||||||
|       // 时间线关闭状态标签 |       // 时间线关闭状态标签 | ||||||
|       &.tw-bg-red { |       &.tw-bg-red { | ||||||
|         background-color: ${themeVars.github.bgColor.done.emphasis} !important; |         background-color: ${themeVars.github.bgColor.done.emphasis} !important; | ||||||
|         border-color: ${themeVars.github.bgColor.done.emphasis} !important; |  | ||||||
|       } |       } | ||||||
|       // 时间线合并状态标签 |       // 时间线合并状态标签 | ||||||
|       &.tw-bg-purple { |       &.tw-bg-purple { | ||||||
|         background-color: ${themeVars.github.bgColor.done.emphasis} !important; |         background-color: ${themeVars.github.bgColor.done.emphasis} !important; | ||||||
|         border-color: ${themeVars.github.bgColor.done.emphasis} !important; |  | ||||||
|       } |       } | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
| @@ -121,3 +118,114 @@ export const dropdown = css` | |||||||
|     } |     } | ||||||
|   } |   } | ||||||
| `; | `; | ||||||
|  |  | ||||||
|  | // PR 界面的 PR 操作评论 | ||||||
|  | export const prMerge = css` | ||||||
|  |   .repository.view.issue .comment-list .timeline-item.pull-merge-box { | ||||||
|  |     // 头像 | ||||||
|  |     .timeline-avatar.green { | ||||||
|  |       background-color: ${themeVars.github.bgColor.success.emphasis}; | ||||||
|  |       color: ${themeVars.color.text.self} !important; | ||||||
|  |       border-radius: ${otherThemeVars.border.radius}; | ||||||
|  |       width: 40px; | ||||||
|  |       height: 40px; | ||||||
|  |       display: flex; | ||||||
|  |       align-items: center; | ||||||
|  |       justify-content: center; | ||||||
|  |       svg { | ||||||
|  |         width: 24px; | ||||||
|  |         height: 24px; | ||||||
|  |       } | ||||||
|  |     } | ||||||
|  |     // 检查状态 | ||||||
|  |     .commit-status-panel { | ||||||
|  |       .commit-status-header { | ||||||
|  |         background: ${themeVars.color.body}; | ||||||
|  |         padding: 16px; | ||||||
|  |         font-size: 16px; | ||||||
|  |         font-weight: 600; | ||||||
|  |         .ui.right { | ||||||
|  |           color: ${themeVars.color.text.light.num1}; | ||||||
|  |           font-size: 14px; | ||||||
|  |           font-weight: 400; | ||||||
|  |         } | ||||||
|  |       } | ||||||
|  |       // 检查状态列表 | ||||||
|  |       .commit-status-list { | ||||||
|  |         background: ${themeVars.color.menu}; | ||||||
|  |         .commit-status-item { | ||||||
|  |           border-radius: ${otherThemeVars.border.radius}; | ||||||
|  |           padding: 2px 8px; | ||||||
|  |           margin: 0px 8px; | ||||||
|  |           height: 37px; | ||||||
|  |           &:first-child { | ||||||
|  |             margin-top: 8px; | ||||||
|  |           } | ||||||
|  |           &:last-child { | ||||||
|  |             margin-bottom: 8px; | ||||||
|  |           } | ||||||
|  |           &:hover { | ||||||
|  |             background-color: ${themeVars.color.hover.opaque}; | ||||||
|  |           } | ||||||
|  |         } | ||||||
|  |       } | ||||||
|  |     } | ||||||
|  |     // 合并信息和操作 | ||||||
|  |     .merge-section { | ||||||
|  |       color: ${themeVars.color.text.light.num1}; | ||||||
|  |       padding: 16px; | ||||||
|  |       display: grid; | ||||||
|  |       gap: 8px; | ||||||
|  |     } | ||||||
|  |   } | ||||||
|  | `; | ||||||
|  |  | ||||||
|  | // 时间线 | ||||||
|  | export const timeline = css` | ||||||
|  |   .repository.view.issue { | ||||||
|  |     .comment-list { | ||||||
|  |       .timeline-item, | ||||||
|  |       .timeline-item-group { | ||||||
|  |         padding: 16px 0; | ||||||
|  |         // 事件 | ||||||
|  |         &.event { | ||||||
|  |           // 修复覆盖后的位置问题 | ||||||
|  |           padding-left: 15px; | ||||||
|  |           .avatar { | ||||||
|  |             width: 20px; | ||||||
|  |             height: 20px; | ||||||
|  |           } | ||||||
|  |           .badge { | ||||||
|  |             border: 2px solid ${themeVars.color.body}; | ||||||
|  |           } | ||||||
|  |           // 仅匹配只有 badge | ||||||
|  |           .badge:not([class*=" "]) { | ||||||
|  |             background-color: ${themeVars.github.control.bgColor.rest}; | ||||||
|  |             svg { | ||||||
|  |               color: ${themeVars.color.text.light.num1}; | ||||||
|  |             } | ||||||
|  |           } | ||||||
|  |         } | ||||||
|  |         // 提交 | ||||||
|  |         &.commits-list { | ||||||
|  |           // 每个提交之间的间隔 | ||||||
|  |           .flex-text-block { | ||||||
|  |             padding-top: 4px; | ||||||
|  |           } | ||||||
|  |           .badge svg { | ||||||
|  |             color: ${themeVars.color.text.light.num1}; | ||||||
|  |           } | ||||||
|  |           // 仅覆盖左侧 commit 不覆盖右侧 SHA | ||||||
|  |           a.muted { | ||||||
|  |             font-size: 12px; | ||||||
|  |             color: ${themeVars.color.text.light.num1}; | ||||||
|  |             text-decoration-line: underline; | ||||||
|  |             &:hover { | ||||||
|  |               color: ${themeVars.color.primary.self}; | ||||||
|  |             } | ||||||
|  |           } | ||||||
|  |         } | ||||||
|  |       } | ||||||
|  |     } | ||||||
|  |   } | ||||||
|  | `; | ||||||
|   | |||||||
| @@ -6,10 +6,6 @@ export const repoHeader = css` | |||||||
|     // 点星/关注/克隆/RSS 按钮 |     // 点星/关注/克隆/RSS 按钮 | ||||||
|     .ui.compact.button { |     .ui.compact.button { | ||||||
|       padding: 3px 12px; |       padding: 3px 12px; | ||||||
|       // 文本跟图标间隔, 文本在手机下不显示 |  | ||||||
|       span { |  | ||||||
|         margin-left: 0.5rem; |  | ||||||
|       } |  | ||||||
|     } |     } | ||||||
|     // 仓库图标 |     // 仓库图标 | ||||||
|     img.ui.avatar { |     img.ui.avatar { | ||||||
|   | |||||||
| @@ -18,14 +18,25 @@ export const baseButton = css` | |||||||
|     min-height: 30px; |     min-height: 30px; | ||||||
|     font-weight: 500; |     font-weight: 500; | ||||||
|     padding: 9px 16px; |     padding: 9px 16px; | ||||||
|  |     &.ui { | ||||||
|  |       gap: 8px; | ||||||
|  |     } | ||||||
|   } |   } | ||||||
|   .ui.button:not(.primary):not(.red) svg { |   .ui.button:not(.primary):not(.red) svg { | ||||||
|     color: ${themeVars.color.text.light.num1}; |     color: ${themeVars.color.text.light.num1}; | ||||||
|   } |   } | ||||||
|   .ui.primary.button { |   // 主色调按钮保持白色 | ||||||
|     ${primaryStyle} |   .ui.primary.buttons .button svg { | ||||||
|     &:hover { |     color: ${themeVars.color.text.self}; | ||||||
|       ${primaryHoverStyle} |   } | ||||||
|  |   .ui.primary { | ||||||
|  |     &.button, | ||||||
|  |     // 按钮组, PR 里的压缩合并按钮 | ||||||
|  |     &.buttons .button { | ||||||
|  |       ${primaryStyle} | ||||||
|  |       &:hover { | ||||||
|  |         ${primaryHoverStyle} | ||||||
|  |       } | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
|   // 主色调基本按钮和普通按钮一样 |   // 主色调基本按钮和普通按钮一样 | ||||||
|   | |||||||
| @@ -1,7 +1,9 @@ | |||||||
|  | import { animationDown } from "src/core/theme"; | ||||||
| import { css, themeVars } from "src/types/vars"; | import { css, themeVars } from "src/types/vars"; | ||||||
|  |  | ||||||
| export const modal = css` | export const modal = css` | ||||||
|   .ui.modal { |   .ui.modal { | ||||||
|  |     animation: ${animationDown}; | ||||||
|     border: 1.5px solid ${themeVars.color.light.border}; |     border: 1.5px solid ${themeVars.color.light.border}; | ||||||
|  |  | ||||||
|     > .header { |     > .header { | ||||||
|   | |||||||
| @@ -37,7 +37,6 @@ | |||||||
| textarea, | textarea, | ||||||
| .ui.form input, | .ui.form input, | ||||||
| .menu .item, | .menu .item, | ||||||
| .ui.modal, |  | ||||||
| .job-step-summary, | .job-step-summary, | ||||||
| .job-step-logs, | .job-step-logs, | ||||||
| .job-brief-item { | .job-brief-item { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user