mirror of
https://github.com/lutinglt/gitea-github-theme.git
synced 2025-10-26 21:20:31 +00:00
Compare commits
27 Commits
fc4e6f43bb
...
v1.24.4.25
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d7722cde2f | ||
|
|
e3366a8406 | ||
|
|
f6fc6a9702 | ||
|
|
12d5636fb7 | ||
|
|
10c06dad60 | ||
|
|
c80dd09828 | ||
|
|
8f2f45406a | ||
|
|
c46d9333ff | ||
|
|
7039041d9d | ||
|
|
9949bdc7bd | ||
|
|
1b81b6ad93 | ||
|
|
62bc2afa2a | ||
|
|
60e873b0e0 | ||
|
|
00737f5203 | ||
|
|
a90b72896b | ||
|
|
f90c488d45 | ||
|
|
56c284aec2 | ||
|
|
0df107a166 | ||
|
|
c5c1ca4a6b | ||
|
|
6bbc304a7c | ||
|
|
5c95add059 | ||
|
|
2efaeead6b | ||
|
|
29122e946c | ||
|
|
81be016be3 | ||
|
|
2ffdf501b3 | ||
|
|
9f2e5df49c | ||
|
|
00eda68f00 |
4
.github/release-template.md
vendored
4
.github/release-template.md
vendored
@@ -1,3 +1,5 @@
|
||||
## 🎉
|
||||
|
||||
## ✨ Feature
|
||||
|
||||
#### CSS 变量
|
||||
@@ -6,6 +8,4 @@
|
||||
|
||||
#### 更符合 GitHub 风格
|
||||
|
||||
## 🎈 Perf
|
||||
|
||||
## 🐞 Fix
|
||||
|
||||
39
.github/release.md
vendored
39
.github/release.md
vendored
@@ -1,21 +1,36 @@
|
||||
## ✨ Feature
|
||||
## 🎉 项目已毕业! (这是最后一版开发版本)
|
||||
|
||||
- 支持自动颜色主题 (跟随系统)
|
||||
- 支持亮色主题
|
||||
- 支持柔和的暗色主题 (dark-dimmed)
|
||||
目前项目的主要功能开发已全部完成, 进入维护阶段.
|
||||
|
||||
维护阶段项目发版频率与 Gitea 发版频率保持一致, 版本号将与 Gitea 保持一致(不再附带时间戳).
|
||||
|
||||
每逢 Gitea 大版本更新时, 项目中间如有修复, 会发布当前版本的最后一个 `.latest` 版本. 之后会发布适配第一个大版本的 `.rc`
|
||||
预发布版本, 问题不多时会发布正式版本, 正式版本之后的修复会等 Gitea 发布下一个小版本时再发布.
|
||||
|
||||
## 🌈 Style
|
||||
|
||||
- 优化创建仓库/派生仓库/迁移仓库/创建组织页面的样式与设置页面的样式一致
|
||||
- 优化消息右上角小图标样式
|
||||
- 优化组织页面下的 RSS 订阅按钮样式
|
||||
|
||||
#### 更符合 GitHub 风格
|
||||
|
||||
- 同步查看文件内容时的代码高亮色 (由于词法分析器的差异和解析问题, 只能实现大概相似, 目前观察到在 TypeScript 下词法分析器表现非常糟糕)
|
||||
|
||||
## 🎈 Perf
|
||||
|
||||
- 优化差异对比的代码折叠/展开按钮的高度和动画效果
|
||||
- 同步代码编辑器背景色和字体大小 (修复亮色模式下编辑器背景色问题) #12
|
||||
- 同步查看代码文件内容页面/文件树样式 (包括滚动时固定的导航栏, 尽量与 GitHub 一致)
|
||||
- 同步分页菜单样式
|
||||
- 同步登录/注册页面样式
|
||||
- 同步 Issue/PR 列表样式
|
||||
- 同步 Issue/PR 详细页面侧边栏样式
|
||||
- 同步仓库代码文件页 README 导航栏样式
|
||||
- 同步用户点星仓库列表样式
|
||||
- 优化私有标签样式
|
||||
- 优化热力图和动态样式
|
||||
- 优化仪表板仓库/组织列表样式
|
||||
- 略微增加仓库代码文件列表的单行高度
|
||||
|
||||
## 🐞 Fix
|
||||
|
||||
- 修复仓库页面与探索页面下仓库主题标签字重不一致的问题
|
||||
- 修复发布页面下的分支按钮点击时高度变化问题
|
||||
- 修复首页/登录页/注册页下导航栏右侧按钮样式问题 #10
|
||||
- Action 作业步骤页面标题选中时滚动固定的高度
|
||||
- 用户公开活动页动态布局
|
||||
- 顶部导航栏工单管理/请求合并页面搜索框旁的选择下拉框按钮内容过窄
|
||||
- 手机页面下注册/登录页导航栏注册按钮换行
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
## 版本号说明
|
||||
|
||||
主题版本号格式: `Gitea 版本号.时间戳`
|
||||
主题版本号与 Gitea 版本号保持一致
|
||||
|
||||
Gitea 版本号格式: `1.大版本号.小版本号`
|
||||
|
||||
@@ -19,6 +19,8 @@ Gitea 理论上小版本号变更不会修改前端布局, 所以主题的小版
|
||||
|
||||
仅维护项目发布中的最新的 Gitea 版本, 其他旧版本主题不接受 Issue 和 PR.
|
||||
|
||||
> 开发阶段的主题版本号格式: `1.大版本号.小版本号.时间戳`
|
||||
|
||||
## 安装
|
||||
|
||||
1. 在发布页下载最新的 CSS 主题文件放入 `gitea/public/assets/css` 目录下
|
||||
|
||||
14
TODO.md
14
TODO.md
@@ -1,14 +0,0 @@
|
||||
### 重大
|
||||
|
||||
- gitea issue 暗色模式下默认标签颜色匹配使用 github 样式
|
||||
- issue/PR 列表样式 github 布局
|
||||
- 用户动态仪表板样式优化
|
||||
- 分页样式优化
|
||||
- 工单管理中搜索框精细按钮的宽度修复
|
||||
- 仓库文件列表的单行高度调整
|
||||
- 仓库文件列表页 README 导航栏样式
|
||||
- 色盲主题支持
|
||||
- 打开文件时的文件导航树样式和滚动高度
|
||||
- 私有库标签大小, 组织页面下的RSS订阅按钮样式
|
||||
- 登录/注册页面样式
|
||||
- 创建仓库页面样式 ? (待验证)
|
||||
@@ -39,107 +39,40 @@ export type GithubColor = {
|
||||
muted: string;
|
||||
};
|
||||
bgColor: {
|
||||
accent: {
|
||||
emphasis: string;
|
||||
muted: string;
|
||||
};
|
||||
attention: {
|
||||
muted: string;
|
||||
};
|
||||
success: {
|
||||
emphasis: string;
|
||||
muted: string;
|
||||
};
|
||||
danger: {
|
||||
muted: string;
|
||||
};
|
||||
done: {
|
||||
emphasis: string;
|
||||
};
|
||||
accent: { emphasis: string; muted: string };
|
||||
attention: { muted: string };
|
||||
success: { emphasis: string; muted: string };
|
||||
danger: { muted: string };
|
||||
done: { emphasis: string };
|
||||
default: string;
|
||||
inset: string;
|
||||
muted: string;
|
||||
neutral: {
|
||||
muted: string;
|
||||
};
|
||||
neutral: { muted: string };
|
||||
};
|
||||
borderColor: {
|
||||
accent: {
|
||||
emphasis: string;
|
||||
};
|
||||
attention: {
|
||||
emphasis: string;
|
||||
};
|
||||
accent: { emphasis: string };
|
||||
attention: { emphasis: string };
|
||||
default: string;
|
||||
success: {
|
||||
emphasis: string;
|
||||
};
|
||||
done: {
|
||||
emphasis: string;
|
||||
};
|
||||
success: { emphasis: string };
|
||||
done: { emphasis: string };
|
||||
muted: string;
|
||||
translucent: string;
|
||||
};
|
||||
button: {
|
||||
primary: {
|
||||
fgColor: {
|
||||
rest: string;
|
||||
};
|
||||
bgColor: {
|
||||
hover: string;
|
||||
};
|
||||
};
|
||||
danger: {
|
||||
fgColor: {
|
||||
rest: string;
|
||||
hover: string;
|
||||
};
|
||||
bgColor: {
|
||||
hover: string;
|
||||
};
|
||||
};
|
||||
primary: { fgColor: { rest: string }; bgColor: { hover: string } };
|
||||
danger: { fgColor: { rest: string; hover: string }; bgColor: { hover: string } };
|
||||
};
|
||||
control: {
|
||||
bgColor: {
|
||||
active: string;
|
||||
hover: string;
|
||||
rest: string;
|
||||
};
|
||||
transparent: {
|
||||
bgColor: {
|
||||
active: string;
|
||||
hover: string;
|
||||
selected: string;
|
||||
};
|
||||
};
|
||||
};
|
||||
shadow: {
|
||||
floating: {
|
||||
small: string;
|
||||
};
|
||||
};
|
||||
overlay: {
|
||||
backdrop: {
|
||||
bgColor: string;
|
||||
};
|
||||
};
|
||||
underlineNav: {
|
||||
borderColor: {
|
||||
active: string;
|
||||
};
|
||||
bgColor: { active: string; hover: string; rest: string };
|
||||
transparent: { bgColor: { active: string; hover: string; selected: string } };
|
||||
};
|
||||
shadow: { floating: { small: string } };
|
||||
overlay: { backdrop: { bgColor: string } };
|
||||
underlineNav: { borderColor: { active: string } };
|
||||
contribution: {
|
||||
default: {
|
||||
bgColor: {
|
||||
num0: string;
|
||||
num1: string;
|
||||
num2: string;
|
||||
num3: string;
|
||||
num4: string;
|
||||
};
|
||||
borderColor: {
|
||||
num0: string;
|
||||
};
|
||||
bgColor: { num0: string; num1: string; num2: string; num3: string; num4: string };
|
||||
borderColor: { num0: string };
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -2,47 +2,22 @@ import type { Chroma } from "src/types";
|
||||
|
||||
export type prettylightsColor = {
|
||||
syntax: {
|
||||
brackethighlighter: {
|
||||
angle: string;
|
||||
unmatched: string;
|
||||
};
|
||||
carriage: {
|
||||
return: {
|
||||
bg: string;
|
||||
text: string;
|
||||
};
|
||||
};
|
||||
brackethighlighter: { angle: string; unmatched: string };
|
||||
carriage: { return: { bg: string; text: string } };
|
||||
comment: string;
|
||||
constant: string;
|
||||
constantOtherReferenceLink: string;
|
||||
entity: string;
|
||||
entityTag: string;
|
||||
invalid: {
|
||||
illegal: {
|
||||
bg: string;
|
||||
text: string;
|
||||
};
|
||||
};
|
||||
invalid: { illegal: { bg: string; text: string } };
|
||||
keyword: string;
|
||||
markup: {
|
||||
bold: string;
|
||||
changed: {
|
||||
bg: string;
|
||||
text: string;
|
||||
};
|
||||
deleted: {
|
||||
bg: string;
|
||||
text: string;
|
||||
};
|
||||
changed: { bg: string; text: string };
|
||||
deleted: { bg: string; text: string };
|
||||
heading: string;
|
||||
ignored: {
|
||||
bg: string;
|
||||
text: string;
|
||||
};
|
||||
inserted: {
|
||||
bg: string;
|
||||
text: string;
|
||||
};
|
||||
ignored: { bg: string; text: string };
|
||||
inserted: { bg: string; text: string };
|
||||
italic: string;
|
||||
list: string;
|
||||
};
|
||||
|
||||
@@ -39,9 +39,7 @@ export function createTheme(theme: Theme): void {
|
||||
}
|
||||
createGlobalTheme(":root", themeVars, theme);
|
||||
createGlobalTheme(":root", otherThemeVars, {
|
||||
border: {
|
||||
radius: "6px",
|
||||
},
|
||||
border: { radius: "6px" },
|
||||
color: {
|
||||
git: "#f05133",
|
||||
light: {
|
||||
|
||||
@@ -29,6 +29,7 @@ export const github = {
|
||||
* @release `releaseTagMenu` 顶部栏左侧按钮激活背景色
|
||||
* @navbar `navbarRight` 头像管理员标识背景颜色
|
||||
* @dropdown `dropdown` emoji 的悬停背景色
|
||||
* @menu `paginationMenu` 分页菜单的激活背景色
|
||||
*/
|
||||
emphasis: null,
|
||||
/** 暗淡的背景颜色
|
||||
@@ -175,6 +176,10 @@ export const github = {
|
||||
* @menu `menu` 菜单项的悬停背景颜色
|
||||
* @repo `repoHeader` 仓库标题的悬停背景颜色
|
||||
* @commit `commit` 提交信息的 Action 按钮的悬停背景颜色
|
||||
* @filelist `repoFiles` README 栏的按钮的悬停背景颜色
|
||||
* @issue `issueSidebar` 操作按钮的悬停背景颜色
|
||||
* @issue `issueList` 头部菜单左侧开启关闭菜单的悬停背景颜色
|
||||
* @dashboard `dashboard` 仓库列表项目的悬停背景颜色
|
||||
*/
|
||||
hover: null,
|
||||
},
|
||||
@@ -194,6 +199,7 @@ export const github = {
|
||||
/** 下划线导航栏的边框颜色
|
||||
* @clone `clone` 按钮组的按钮下划线颜色
|
||||
* @menu `secondaryMenu` 二级菜单按钮的下划线颜色
|
||||
* @filelist `repoFiles` README 栏的左边按钮下划线颜色
|
||||
*/
|
||||
active: null,
|
||||
},
|
||||
|
||||
@@ -1,12 +1,4 @@
|
||||
const num = {
|
||||
num1: null,
|
||||
num2: null,
|
||||
num3: null,
|
||||
num4: null,
|
||||
num5: null,
|
||||
num6: null,
|
||||
num7: null,
|
||||
};
|
||||
const num = { num1: null, num2: null, num3: null, num4: null, num5: null, num6: null, num7: null };
|
||||
|
||||
const alpha = {
|
||||
num10: null,
|
||||
@@ -20,33 +12,12 @@ const alpha = {
|
||||
num90: null,
|
||||
};
|
||||
|
||||
export const primary = {
|
||||
self: null,
|
||||
contrast: null,
|
||||
dark: num,
|
||||
light: num,
|
||||
alpha: alpha,
|
||||
hover: null,
|
||||
active: null,
|
||||
};
|
||||
export const primary = { self: null, contrast: null, dark: num, light: num, alpha: alpha, hover: null, active: null };
|
||||
|
||||
export const secondary = {
|
||||
self: null,
|
||||
dark: {
|
||||
num8: null,
|
||||
num9: null,
|
||||
num10: null,
|
||||
num11: null,
|
||||
num12: null,
|
||||
num13: null,
|
||||
...num,
|
||||
},
|
||||
light: {
|
||||
num1: null,
|
||||
num2: null,
|
||||
num3: null,
|
||||
num4: null,
|
||||
},
|
||||
dark: { num8: null, num9: null, num10: null, num11: null, num12: null, num13: null, ...num },
|
||||
light: { num1: null, num2: null, num3: null, num4: null },
|
||||
alpha: alpha,
|
||||
button: null,
|
||||
hover: null,
|
||||
|
||||
@@ -1,32 +1,8 @@
|
||||
const msg = {
|
||||
bg: null,
|
||||
border: null,
|
||||
text: null,
|
||||
};
|
||||
const msg = { bg: null, border: null, text: null };
|
||||
|
||||
const error = {
|
||||
...msg,
|
||||
bg: {
|
||||
self: null,
|
||||
active: null,
|
||||
hover: null,
|
||||
},
|
||||
};
|
||||
const error = { ...msg, bg: { self: null, active: null, hover: null } };
|
||||
const success = { ...msg };
|
||||
const warning = { ...msg };
|
||||
const info = { ...msg };
|
||||
|
||||
const success = {
|
||||
...msg,
|
||||
};
|
||||
|
||||
const warning = {
|
||||
...msg,
|
||||
};
|
||||
const info = {
|
||||
...msg,
|
||||
};
|
||||
|
||||
export const message = {
|
||||
error,
|
||||
success,
|
||||
warning,
|
||||
info,
|
||||
};
|
||||
export const message = { error, success, warning, info };
|
||||
|
||||
@@ -1,11 +1,4 @@
|
||||
const baseColor = {
|
||||
self: null,
|
||||
light: null,
|
||||
dark: {
|
||||
num1: null,
|
||||
num2: null,
|
||||
},
|
||||
};
|
||||
const baseColor = { self: null, light: null, dark: { num1: null, num2: null } };
|
||||
|
||||
const commitColor = {
|
||||
/** 提交哈希值颜色 */
|
||||
@@ -23,26 +16,14 @@ const commitColor = {
|
||||
|
||||
export const named = {
|
||||
/** 红色/提交警告签名颜色 */
|
||||
red: {
|
||||
...commitColor,
|
||||
...baseColor,
|
||||
},
|
||||
red: { ...commitColor, ...baseColor },
|
||||
/** 橙色/提交未匹配签名颜色 */
|
||||
orange: {
|
||||
...commitColor,
|
||||
...baseColor,
|
||||
},
|
||||
orange: { ...commitColor, ...baseColor },
|
||||
/** 黄色/提交未信任签名颜色 */
|
||||
yellow: {
|
||||
...commitColor,
|
||||
...baseColor,
|
||||
},
|
||||
yellow: { ...commitColor, ...baseColor },
|
||||
olive: baseColor,
|
||||
/** 绿色/提交信任签名颜色 */
|
||||
green: {
|
||||
...commitColor,
|
||||
...baseColor,
|
||||
},
|
||||
green: { ...commitColor, ...baseColor },
|
||||
teal: baseColor,
|
||||
blue: baseColor,
|
||||
violet: baseColor,
|
||||
@@ -50,10 +31,7 @@ export const named = {
|
||||
pink: baseColor,
|
||||
brown: baseColor,
|
||||
black: baseColor,
|
||||
grey: {
|
||||
self: null,
|
||||
light: null,
|
||||
},
|
||||
grey: { self: null, light: null },
|
||||
gold: null,
|
||||
white: null,
|
||||
};
|
||||
|
||||
@@ -8,9 +8,7 @@ function varMapper(prefix: string | null = null) {
|
||||
path = path.map(item => item.replace(/^num/, ""));
|
||||
value = path.join("-");
|
||||
}
|
||||
if (prefix) {
|
||||
value = `${prefix}-${value}`;
|
||||
}
|
||||
if (prefix) value = `${prefix}-${value}`;
|
||||
return value;
|
||||
};
|
||||
}
|
||||
@@ -32,26 +30,13 @@ const vars = {
|
||||
github: color.github,
|
||||
};
|
||||
|
||||
const otherVars = {
|
||||
border: {
|
||||
radius: null,
|
||||
},
|
||||
color: {
|
||||
...color.otherAuto,
|
||||
},
|
||||
};
|
||||
const otherVars = { border: { radius: null }, color: { ...color.otherAuto } };
|
||||
|
||||
const customVars = {
|
||||
cloneMenuWidth: "clone-menu-width",
|
||||
explore: {
|
||||
repolistColumns: "explore-repolist-columns",
|
||||
userlistColumns: "explore-userlist-columns",
|
||||
},
|
||||
explore: { repolistColumns: "explore-repolist-columns", userlistColumns: "explore-userlist-columns" },
|
||||
userRepolistColumns: "user-repolist-columns",
|
||||
org: {
|
||||
repolistColumns: "org-repolist-columns",
|
||||
userlistColumns: "org-userlist-columns",
|
||||
},
|
||||
org: { repolistColumns: "org-repolist-columns", userlistColumns: "org-userlist-columns" },
|
||||
};
|
||||
|
||||
export const themeVars = createGlobalThemeContract(vars, varMapper());
|
||||
|
||||
@@ -203,7 +203,7 @@ export const actionViewRight = css`
|
||||
|
||||
.job-info-header {
|
||||
padding: 16px 12px 16px 24px;
|
||||
height: auto;
|
||||
height: 80px;
|
||||
|
||||
.job-info-header-title {
|
||||
color: ${themeVars.github.fgColor.accent};
|
||||
@@ -220,6 +220,11 @@ export const actionViewRight = css`
|
||||
color: ${themeVars.color.console.fg.subtle};
|
||||
padding: 8px 10px;
|
||||
|
||||
&.selected {
|
||||
// 滚动时固定在顶部的高度与 job-info-header 高度相同
|
||||
top: 80px;
|
||||
}
|
||||
|
||||
&.step-expandable:hover {
|
||||
color: ${themeVars.color.console.fg.subtle};
|
||||
}
|
||||
|
||||
@@ -1,15 +1,66 @@
|
||||
import { css } from "src/types/vars";
|
||||
import { css, otherThemeVars, themeVars } from "src/types/vars";
|
||||
|
||||
export const dashboard = css`
|
||||
.page-content.dashboard {
|
||||
// 动态的右侧 svg 图标
|
||||
.flex-item .flex-item-trailing svg {
|
||||
height: 20px;
|
||||
width: 20px;
|
||||
}
|
||||
// 仓库列表的仓库/组织切换按钮
|
||||
.ui.two.item.menu {
|
||||
background-color: unset;
|
||||
box-shadow: ${themeVars.github.shadow.floating.small};
|
||||
border: unset;
|
||||
border-radius: 12px;
|
||||
margin-bottom: 8px;
|
||||
> .item {
|
||||
&:first-child {
|
||||
border-radius: 12px 0 0 12px;
|
||||
}
|
||||
&:last-child {
|
||||
border-radius: 0 12px 12px 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
// 仓库/组织列表标题
|
||||
.ui.top.attached.header {
|
||||
border: 0;
|
||||
font-size: 20px;
|
||||
font-weight: 400;
|
||||
background-color: unset !important;
|
||||
margin-bottom: 0.25rem;
|
||||
}
|
||||
// 仓库/组织列表
|
||||
.ui.attached.segment {
|
||||
background-color: ${themeVars.color.menu};
|
||||
border: unset !important;
|
||||
box-shadow: ${themeVars.github.shadow.floating.small};
|
||||
&.repos-search {
|
||||
border-top-left-radius: 12px;
|
||||
border-top-right-radius: 12px;
|
||||
}
|
||||
&.table {
|
||||
&:last-child {
|
||||
border-bottom-left-radius: 12px !important;
|
||||
border-bottom-right-radius: 12px !important;
|
||||
}
|
||||
ul {
|
||||
padding: 8px;
|
||||
li {
|
||||
border-radius: ${otherThemeVars.border.radius};
|
||||
&:not(:last-child) {
|
||||
border-bottom: 0;
|
||||
}
|
||||
&:hover {
|
||||
background: ${themeVars.github.control.transparent.bgColor.hover};
|
||||
}
|
||||
a.muted:hover {
|
||||
color: inherit;
|
||||
text-decoration-line: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// 组织列表
|
||||
.ui.tab.dashboard-orgs .ui.attached.segment.table {
|
||||
border-top-left-radius: 12px;
|
||||
border-top-right-radius: 12px;
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
20
styles/components/editor.ts
Normal file
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
@@ -13,7 +13,8 @@ export const repoList = css`
|
||||
.page-content.user.profile > .ui.container > .ui.stackable > .ui.twelve,
|
||||
// 探索
|
||||
.page-content.explore.repositories > .ui.container {
|
||||
> .flex-list {
|
||||
// 排除用户的公开活动页
|
||||
> .flex-list:not(#activity-feed) {
|
||||
display: grid;
|
||||
> .flex-item {
|
||||
border: 1px solid ${themeVars.color.light.border};
|
||||
@@ -37,10 +38,6 @@ export const repoList = css`
|
||||
&:not(a) {
|
||||
color: ${themeVars.color.text.light.num1};
|
||||
}
|
||||
// 仓库类型和状态标签
|
||||
> .label-list .label {
|
||||
padding: 3px 6px;
|
||||
}
|
||||
}
|
||||
// 仓库语言, 星标
|
||||
> .flex-item-trailing {
|
||||
@@ -77,7 +74,8 @@ export const repoList = css`
|
||||
gap: min(${orgRepoVar} * 8px, 16px);
|
||||
}
|
||||
// 用户
|
||||
.page-content.user.profile > .ui.container > .ui.stackable > .ui.twelve > .flex-list {
|
||||
// 排除用户的公开活动页
|
||||
.page-content.user.profile > .ui.container > .ui.stackable > .ui.twelve > .flex-list:not(#activity-feed) {
|
||||
grid-template-columns: repeat(${userRepoVar}, 1fr);
|
||||
gap: min(${userRepoVar} * 8px, 16px);
|
||||
}
|
||||
@@ -111,7 +109,6 @@ export const userList = css`
|
||||
// 用户标签
|
||||
> .label {
|
||||
font-size: 12px;
|
||||
padding: 3px 6px;
|
||||
}
|
||||
}
|
||||
// 用户描述
|
||||
@@ -152,7 +149,8 @@ export const mobileList = css`
|
||||
.page-content.organization.members >.ui.container,
|
||||
// 探索的用户和组织列表
|
||||
.page-content.explore.users >.ui.container {
|
||||
> .flex-list {
|
||||
// 排除用户的公开活动页
|
||||
> .flex-list:not(#activity-feed) {
|
||||
grid-template-columns: 1fr;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { css, themeVars } from "src/types/vars";
|
||||
import { css, otherThemeVars, themeVars } from "src/types/vars";
|
||||
|
||||
// 文件列表页面下的分支按钮
|
||||
export const branchButton = css`
|
||||
@@ -75,6 +75,7 @@ export const repoFiles = css`
|
||||
// 文件列表
|
||||
.repo-file-item {
|
||||
.repo-file-cell {
|
||||
height: 40px;
|
||||
&.name {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -87,6 +88,39 @@ export const repoFiles = css`
|
||||
}
|
||||
}
|
||||
}
|
||||
#readme {
|
||||
.file-header {
|
||||
background: ${themeVars.color.body};
|
||||
svg {
|
||||
color: ${themeVars.color.text.light.num1};
|
||||
}
|
||||
.file-header-left {
|
||||
padding: 6px 8px !important;
|
||||
&:hover {
|
||||
background: ${themeVars.github.control.transparent.bgColor.hover};
|
||||
border-radius: ${otherThemeVars.border.radius};
|
||||
}
|
||||
&:after {
|
||||
content: "";
|
||||
background: ${themeVars.github.underlineNav.borderColor.active};
|
||||
border-radius: ${otherThemeVars.border.radius};
|
||||
bottom: 0;
|
||||
height: 2px;
|
||||
position: absolute;
|
||||
left: 12px;
|
||||
width: 113px;
|
||||
}
|
||||
a.muted:hover {
|
||||
color: inherit;
|
||||
text-decoration-line: none;
|
||||
}
|
||||
}
|
||||
.file-header-right:hover {
|
||||
background: ${themeVars.github.control.transparent.bgColor.hover};
|
||||
border-radius: ${otherThemeVars.border.radius};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -113,12 +147,66 @@ export const repoFilesMobile = css`
|
||||
// 仓库打开文件时的视图
|
||||
export const repoFileView = css`
|
||||
.page-content.repository.file.list {
|
||||
> .ui.container.fluid {
|
||||
max-width: calc(100% - calc(2 * 16px));
|
||||
}
|
||||
.repo-view-container {
|
||||
// 左侧文件树
|
||||
.repo-view-file-tree-container {
|
||||
height: 100vh;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
&:after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: -14px;
|
||||
right: 0;
|
||||
width: 1px;
|
||||
height: calc(100% + 14px);
|
||||
background: ${themeVars.color.secondary.self};
|
||||
}
|
||||
> .repo-button-row {
|
||||
height: 32px;
|
||||
margin: 16px 0;
|
||||
&:after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 32px + 32px;
|
||||
left: -16px;
|
||||
width: calc(100% + 16px);
|
||||
height: 1px;
|
||||
background: ${themeVars.color.secondary.self};
|
||||
}
|
||||
}
|
||||
}
|
||||
// 右侧文件视图内容
|
||||
.repo-view-content {
|
||||
.repo-button-row {
|
||||
align-items: center;
|
||||
background: ${themeVars.color.box.header};
|
||||
border: 1px solid ${themeVars.color.secondary.self};
|
||||
border-radius: ${otherThemeVars.border.radius};
|
||||
height: 46px;
|
||||
min-height: 46px;
|
||||
padding: 8px;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 1;
|
||||
}
|
||||
.non-diff-file-content {
|
||||
// 避免分支菜单遮挡
|
||||
position: relative;
|
||||
z-index: 0;
|
||||
h4.file-header {
|
||||
position: sticky;
|
||||
top: 46px;
|
||||
z-index: 1;
|
||||
}
|
||||
}
|
||||
// 头部提交信息
|
||||
#repo-file-commit-box {
|
||||
.ui.segment#repo-file-commit-box {
|
||||
padding: 8px 12px;
|
||||
margin-bottom: 8px !important;
|
||||
> .latest-commit {
|
||||
gap: 8px;
|
||||
}
|
||||
@@ -133,6 +221,24 @@ export const repoFileView = css`
|
||||
}
|
||||
`;
|
||||
|
||||
// 避免手机/平板下路径容器过长导致换行, 取消固定
|
||||
export const repoFileViewMobile = css`
|
||||
@media (max-width: 1023.98px) {
|
||||
.page-content.repository.file.list .repo-view-container .repo-view-content {
|
||||
.repo-button-row {
|
||||
height: auto;
|
||||
position: static;
|
||||
z-index: 0;
|
||||
}
|
||||
.non-diff-file-content {
|
||||
h4.file-header {
|
||||
top: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
// 仓库代码布局调整, 侧边栏宽度调整
|
||||
export const repoGrid = css`
|
||||
.repo-grid-filelist-sidebar {
|
||||
|
||||
@@ -1,50 +1,88 @@
|
||||
import { css, themeVars } from "src/types/vars";
|
||||
import { css, otherThemeVars, themeVars } from "src/types/vars";
|
||||
|
||||
export const heatmap = css`
|
||||
.vch__container {
|
||||
// 覆盖热力图和图例的背景色
|
||||
.vch__day__square,
|
||||
.vch__legend__wrapper rect {
|
||||
// 圆角
|
||||
rx: 2.5px;
|
||||
ry: 2.5px;
|
||||
// hover 时的圆角
|
||||
border-radius: 0.75px;
|
||||
// 宽度和高度可以用来控制间隔
|
||||
width: 9px;
|
||||
height: 9px;
|
||||
// 边框
|
||||
outline: 0.5px solid ${themeVars.github.contribution.default.borderColor.num0};
|
||||
// 边框向内偏移
|
||||
outline-offset: -0.5px;
|
||||
#user-heatmap {
|
||||
.total-contributions {
|
||||
left: 25px + 20px;
|
||||
bottom: 0 + 12px;
|
||||
}
|
||||
.total-contributions,
|
||||
.vch__legend-right {
|
||||
color: ${themeVars.color.text.light.num1};
|
||||
}
|
||||
.vch__container {
|
||||
padding: 12px 20px;
|
||||
border: 1px solid ${themeVars.color.secondary.self};
|
||||
border-radius: ${otherThemeVars.border.radius};
|
||||
// 覆盖热力图和图例的背景色
|
||||
.vch__day__square,
|
||||
.vch__legend__wrapper rect {
|
||||
// 圆角
|
||||
rx: 2.5px;
|
||||
ry: 2.5px;
|
||||
// hover 时的圆角
|
||||
border-radius: 0.75px;
|
||||
// 宽度和高度可以用来控制间隔
|
||||
width: 9px;
|
||||
height: 9px;
|
||||
// 边框
|
||||
outline: 0.5px solid ${themeVars.github.contribution.default.borderColor.num0};
|
||||
// 边框向内偏移
|
||||
outline-offset: -0.5px;
|
||||
|
||||
&[style="fill: var(--color-secondary-alpha-60);"] {
|
||||
fill: ${themeVars.github.contribution.default.bgColor.num0} !important;
|
||||
}
|
||||
&[style="fill: var(--color-secondary-alpha-60);"] {
|
||||
fill: ${themeVars.github.contribution.default.bgColor.num0} !important;
|
||||
}
|
||||
|
||||
&[style="fill: var(--color-primary-light-4);"] {
|
||||
fill: ${themeVars.github.contribution.default.bgColor.num1} !important;
|
||||
outline-color: ${themeVars.github.contribution.default.borderColor.num1};
|
||||
}
|
||||
&[style="fill: var(--color-primary-light-4);"] {
|
||||
fill: ${themeVars.github.contribution.default.bgColor.num1} !important;
|
||||
outline-color: ${themeVars.github.contribution.default.borderColor.num1};
|
||||
}
|
||||
|
||||
&[style="fill: var(--color-primary-light-2);"] {
|
||||
fill: ${themeVars.github.contribution.default.bgColor.num2} !important;
|
||||
outline-color: ${themeVars.github.contribution.default.borderColor.num2};
|
||||
}
|
||||
&[style="fill: var(--color-primary-light-2);"] {
|
||||
fill: ${themeVars.github.contribution.default.bgColor.num2} !important;
|
||||
outline-color: ${themeVars.github.contribution.default.borderColor.num2};
|
||||
}
|
||||
|
||||
&[style="fill: var(--color-primary);"] {
|
||||
fill: ${themeVars.github.contribution.default.bgColor.num3} !important;
|
||||
outline-color: ${themeVars.github.contribution.default.borderColor.num3};
|
||||
}
|
||||
&[style="fill: var(--color-primary);"] {
|
||||
fill: ${themeVars.github.contribution.default.bgColor.num3} !important;
|
||||
outline-color: ${themeVars.github.contribution.default.borderColor.num3};
|
||||
}
|
||||
|
||||
&[style="fill: var(--color-primary-dark-2);"] {
|
||||
fill: ${themeVars.github.contribution.default.bgColor.num4} !important;
|
||||
outline-color: ${themeVars.github.contribution.default.borderColor.num4};
|
||||
}
|
||||
&[style="fill: var(--color-primary-dark-2);"] {
|
||||
fill: ${themeVars.github.contribution.default.bgColor.num4} !important;
|
||||
outline-color: ${themeVars.github.contribution.default.borderColor.num4};
|
||||
}
|
||||
|
||||
&[style="fill: var(--color-primary-dark-4);"] {
|
||||
fill: ${themeVars.github.contribution.default.bgColor.num5} !important;
|
||||
outline-color: ${themeVars.github.contribution.default.borderColor.num5};
|
||||
&[style="fill: var(--color-primary-dark-4);"] {
|
||||
fill: ${themeVars.github.contribution.default.bgColor.num5} !important;
|
||||
outline-color: ${themeVars.github.contribution.default.borderColor.num5};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
// 动态
|
||||
export const activity = css`
|
||||
#activity-feed {
|
||||
.flex-item {
|
||||
gap: 12px;
|
||||
padding: 16px 0;
|
||||
&:first-child {
|
||||
padding-top: 6px;
|
||||
}
|
||||
> .flex-item-main {
|
||||
gap: 8px !important;
|
||||
|
||||
relative-time {
|
||||
color: ${themeVars.color.text.light.num1};
|
||||
}
|
||||
}
|
||||
// 动态的右侧 svg 图标
|
||||
.flex-item-trailing svg {
|
||||
height: 20px;
|
||||
width: 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,6 +8,11 @@ import "./filelist";
|
||||
import "./heatmap";
|
||||
import "./issue";
|
||||
import "./newrepo";
|
||||
import "./org";
|
||||
import "./release";
|
||||
import "./repo";
|
||||
import "./setting";
|
||||
import "./signin";
|
||||
import "./user";
|
||||
import "./chroma";
|
||||
import "./editor"
|
||||
@@ -1,6 +1,115 @@
|
||||
import { css, otherThemeVars, themeVars } from "src/types/vars";
|
||||
import { activeItemAfterStyle } from "styles/public/menu";
|
||||
|
||||
// 工单&PR 列表
|
||||
export const issueList = css`
|
||||
.page-content.repository.issue-list {
|
||||
// 头部筛选菜单栏
|
||||
.issue-list-toolbar {
|
||||
align-items: center;
|
||||
align-content: center;
|
||||
background-color: ${themeVars.color.box.header};
|
||||
border: 1px solid ${themeVars.color.light.border};
|
||||
border-bottom: 0;
|
||||
border-top-left-radius: ${otherThemeVars.border.radius};
|
||||
border-top-right-radius: ${otherThemeVars.border.radius};
|
||||
height: 48px;
|
||||
padding: 8px;
|
||||
.issue-list-toolbar-left {
|
||||
// 复选框
|
||||
input {
|
||||
margin: 0 8px !important;
|
||||
}
|
||||
> .ui.compact.menu {
|
||||
align-items: center;
|
||||
border: 0;
|
||||
> .item {
|
||||
background: unset !important;
|
||||
border-radius: ${otherThemeVars.border.radius};
|
||||
color: ${themeVars.color.text.light.num1};
|
||||
padding: 0px 8px;
|
||||
height: 30px;
|
||||
&:before {
|
||||
display: none;
|
||||
}
|
||||
&:hover {
|
||||
background: ${themeVars.github.control.transparent.bgColor.hover} !important;
|
||||
}
|
||||
&.active {
|
||||
color: ${themeVars.color.text.self};
|
||||
font-weight: 700;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.issue-list-toolbar-right > .ui.menu {
|
||||
align-items: center;
|
||||
> .item {
|
||||
color: ${themeVars.color.text.light.num1};
|
||||
}
|
||||
> .ui.button {
|
||||
padding: 0 12px;
|
||||
height: 32px;
|
||||
}
|
||||
}
|
||||
}
|
||||
// Issue 列表
|
||||
.flex-list#issue-list {
|
||||
border: 1px solid ${themeVars.color.light.border};
|
||||
border-bottom-left-radius: ${otherThemeVars.border.radius};
|
||||
border-bottom-right-radius: ${otherThemeVars.border.radius};
|
||||
> .flex-item {
|
||||
align-items: center;
|
||||
padding: 0;
|
||||
&:last-child {
|
||||
border-bottom-left-radius: ${otherThemeVars.border.radius};
|
||||
border-bottom-right-radius: ${otherThemeVars.border.radius};
|
||||
}
|
||||
&:hover {
|
||||
background-color: ${themeVars.color.hover.opaque};
|
||||
}
|
||||
> .flex-item-icon {
|
||||
display: flex;
|
||||
gap: 4px;
|
||||
margin-left: 8px;
|
||||
// 复选框
|
||||
input {
|
||||
background: unset;
|
||||
margin-top: 14px;
|
||||
margin-left: 8px;
|
||||
margin-right: 8px !important;
|
||||
}
|
||||
svg {
|
||||
margin-top: 14px;
|
||||
}
|
||||
}
|
||||
> .flex-item-main {
|
||||
gap: 4px;
|
||||
.flex-item-header {
|
||||
padding-top: 8px;
|
||||
}
|
||||
.flex-item-body {
|
||||
font-size: 12px;
|
||||
padding-bottom: 8px;
|
||||
}
|
||||
}
|
||||
> .flex-item-trailing {
|
||||
margin-right: 32px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
// 避免手机/平板下菜单错位
|
||||
export const issueListMobile = css`
|
||||
@media (max-width: 1023.98px) {
|
||||
.page-content.repository.issue-list .issue-list-toolbar {
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const button = css`
|
||||
.issue-content-left .field.footer {
|
||||
// 关闭工单按钮
|
||||
@@ -18,6 +127,11 @@ export const button = css`
|
||||
color: ${themeVars.github.fgColor.success};
|
||||
}
|
||||
}
|
||||
// 工单&PR标题右侧按钮
|
||||
.repository.view.issue .issue-title-buttons > .ui.button {
|
||||
padding: 0 12px;
|
||||
height: 32px;
|
||||
}
|
||||
`;
|
||||
|
||||
export const babel = css`
|
||||
@@ -103,6 +217,7 @@ export const comment = css`
|
||||
}
|
||||
.comment-header {
|
||||
padding: 4px 4px 4px 16px;
|
||||
min-height: 38px;
|
||||
}
|
||||
.comment-header-right {
|
||||
> .item,
|
||||
@@ -330,3 +445,111 @@ export const timeline = css`
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
const sidebarPadding = {
|
||||
padding: "4px 8px",
|
||||
};
|
||||
|
||||
// 侧边栏
|
||||
export const issueSidebar = css`
|
||||
.issue-content {
|
||||
gap: 24px;
|
||||
.issue-content-right {
|
||||
border: 0;
|
||||
font-size: 12px;
|
||||
padding: 0;
|
||||
.ui.button {
|
||||
font-size: 12px;
|
||||
}
|
||||
.ui.form,
|
||||
a.fixed-text.muted,
|
||||
span.text,
|
||||
// 列表项为空时的文字
|
||||
span.item.empty-list,
|
||||
p {
|
||||
color: ${themeVars.color.text.light.num1};
|
||||
font-size: 12px;
|
||||
}
|
||||
.ui.dropdown.select-branch,
|
||||
.ui.form,
|
||||
a.fixed-text.muted,
|
||||
span.text,
|
||||
.ui.watching > div,
|
||||
.ui.depending > div,
|
||||
.flex-text-block,
|
||||
.ui.list,
|
||||
p {
|
||||
${sidebarPadding};
|
||||
}
|
||||
.issue-sidebar-combo {
|
||||
.ui.dropdown > a.fixed-text.muted {
|
||||
align-items: center;
|
||||
border-radius: ${otherThemeVars.border.radius};
|
||||
text-decoration-line: none;
|
||||
height: 28px;
|
||||
&:hover {
|
||||
background: ${themeVars.github.control.transparent.bgColor.hover};
|
||||
}
|
||||
}
|
||||
.ui.list {
|
||||
margin-top: 0 !important;
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
}
|
||||
// 时间追踪
|
||||
> div:not([class]):not([id]) > .ui.dropdown.jump > a.fixed-text.muted {
|
||||
align-items: center;
|
||||
border-radius: ${otherThemeVars.border.radius};
|
||||
text-decoration-line: none;
|
||||
height: 28px;
|
||||
&:hover {
|
||||
background: ${themeVars.github.control.transparent.bgColor.hover};
|
||||
}
|
||||
}
|
||||
// 选中日期颜色
|
||||
.ui.form .due-date {
|
||||
color: ${themeVars.color.text.self};
|
||||
}
|
||||
.divider {
|
||||
margin: 12px 0 12px 8px;
|
||||
width: calc(100% - 16px);
|
||||
}
|
||||
// 订阅按钮
|
||||
.ui.watching .ui.button {
|
||||
padding: 0px 8px;
|
||||
height: 28px;
|
||||
svg {
|
||||
margin: 0 !important;
|
||||
}
|
||||
}
|
||||
// PIN 按钮
|
||||
.form-fetch-action.single-button-form .ui.button,
|
||||
// 底部操作按钮
|
||||
.ui.show-modal.button {
|
||||
border: 0;
|
||||
background: unset;
|
||||
font-weight: 400;
|
||||
${sidebarPadding};
|
||||
// 好像是浏览器 BUG, 最后不生效, 必须 !important
|
||||
margin: 0 !important;
|
||||
justify-content: left;
|
||||
&:hover {
|
||||
background: ${themeVars.github.control.transparent.bgColor.hover};
|
||||
}
|
||||
}
|
||||
.ui.show-modal.button[data-modal="#sidebar-delete-issue"] {
|
||||
color: ${themeVars.color.red.self};
|
||||
svg {
|
||||
color: ${themeVars.color.red.self};
|
||||
}
|
||||
&:hover {
|
||||
background-color: ${themeVars.color.red.badge.bg};
|
||||
color: ${themeVars.color.red.light};
|
||||
svg {
|
||||
color: ${themeVars.color.red.light};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
21
styles/components/org.ts
Normal file
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};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
@@ -76,33 +76,3 @@ export const label = css`
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
// 设置右面板的内容
|
||||
export const content = css`
|
||||
.user-main-content,
|
||||
.repo-setting-content,
|
||||
.user-setting-content,
|
||||
.org-setting-content,
|
||||
.admin-setting-content {
|
||||
.ui.top.attached.header {
|
||||
border: 0;
|
||||
font-size: 1.5rem;
|
||||
font-weight: 400;
|
||||
background-color: unset !important;
|
||||
margin-bottom: 0.25rem;
|
||||
}
|
||||
|
||||
.ui.attached.segment {
|
||||
background-color: unset;
|
||||
border-radius: 0.5rem !important;
|
||||
}
|
||||
|
||||
.ui.attached.segment:not(.error) {
|
||||
border: 1px solid ${themeVars.color.light.border} !important;
|
||||
}
|
||||
|
||||
.ui.attached.segment.error {
|
||||
border: 1px solid ${themeVars.color.error.border} !important;
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
49
styles/components/signin.ts
Normal file
49
styles/components/signin.ts
Normal file
@@ -0,0 +1,49 @@
|
||||
import { css } from "src/types/vars";
|
||||
|
||||
// 注册/登录界面
|
||||
export const signIn = css`
|
||||
.page-content.user.signin {
|
||||
.ui.grid > .column {
|
||||
width: 384px;
|
||||
padding: 16px;
|
||||
> .ui.container {
|
||||
max-width: unset;
|
||||
}
|
||||
}
|
||||
.ui.top.attached.header {
|
||||
border: 0;
|
||||
font-size: 20px;
|
||||
font-weight: 600;
|
||||
background-color: unset !important;
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
.ui.attached.segment {
|
||||
border: 0;
|
||||
padding: 16px 0 0 0;
|
||||
.field:not(.inline) {
|
||||
label {
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
}
|
||||
input {
|
||||
background: unset;
|
||||
padding: 5px 12px;
|
||||
height: 40px;
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
.button {
|
||||
height: 40px;
|
||||
}
|
||||
}
|
||||
.ui.top.attached.header.segment {
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
gap: 16px;
|
||||
.signin-passkey {
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
62
styles/components/user.ts
Normal file
62
styles/components/user.ts
Normal file
@@ -0,0 +1,62 @@
|
||||
import { css, themeVars } from "src/types/vars";
|
||||
|
||||
// 用户点星仓库列表
|
||||
export const stars = css`
|
||||
.page-content.user.profile {
|
||||
.stars {
|
||||
> .flex-list {
|
||||
> .flex-item {
|
||||
padding: 24px 0;
|
||||
&:first-child {
|
||||
padding-top: 14px;
|
||||
}
|
||||
// 仓库头像
|
||||
> .flex-item-leading {
|
||||
img,
|
||||
svg {
|
||||
color: ${themeVars.color.text.light.num1};
|
||||
}
|
||||
}
|
||||
// 仓库信息
|
||||
> .flex-item-main {
|
||||
// 仓库标题
|
||||
> .flex-item-header {
|
||||
// 仓库名称
|
||||
> .flex-item-title {
|
||||
font-size: 20px;
|
||||
gap: 8px;
|
||||
// 仓库中间的间隔线
|
||||
&:not(a) {
|
||||
color: ${themeVars.color.primary.self};
|
||||
}
|
||||
}
|
||||
// 仓库语言, 星标
|
||||
> .flex-item-trailing {
|
||||
color: ${themeVars.color.text.light.num1};
|
||||
gap: 16px;
|
||||
font-size: 12px;
|
||||
> .flex-text-inline .color-icon {
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
margin-right: 0 !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
// 描述和更新时间
|
||||
> .flex-item-body {
|
||||
margin-top: 10px;
|
||||
// 更新时间
|
||||
&:last-child {
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
// 主题标签
|
||||
> .label-list {
|
||||
margin-top: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
36
styles/public/attached.ts
Normal file
36
styles/public/attached.ts
Normal file
@@ -0,0 +1,36 @@
|
||||
import { css, themeVars, otherThemeVars } from "src/types/vars";
|
||||
|
||||
export const attached = css`
|
||||
// 设置右面板的内容
|
||||
.user-main-content,
|
||||
.repo-setting-content,
|
||||
.user-setting-content,
|
||||
.org-setting-content,
|
||||
.admin-setting-content,
|
||||
// 新建页面内容
|
||||
.page-content.repository.new-repo,
|
||||
.page-content.repository.new.migrate,
|
||||
.page-content.repository.new.fork,
|
||||
.page-content.organization.new.org {
|
||||
.ui.top.attached.header {
|
||||
border: 0;
|
||||
font-size: 20px;
|
||||
font-weight: 400;
|
||||
background-color: unset !important;
|
||||
margin-bottom: 0.25rem;
|
||||
}
|
||||
|
||||
.ui.attached.segment {
|
||||
background-color: unset;
|
||||
border-radius: ${otherThemeVars.border.radius} !important;
|
||||
}
|
||||
|
||||
.ui.attached.segment:not(.error) {
|
||||
border: 1px solid ${themeVars.color.light.border} !important;
|
||||
}
|
||||
|
||||
.ui.attached.segment.error {
|
||||
border: 1px solid ${themeVars.color.error.border} !important;
|
||||
}
|
||||
}
|
||||
`;
|
||||
@@ -120,6 +120,10 @@ export const selectionDropdown = css`
|
||||
${activeItemAfterStyle};
|
||||
}
|
||||
}
|
||||
// 修复顶部导航栏工单管理/请求合并页面搜索框旁的选择下拉框按钮内容过窄
|
||||
.list-header-search .ui.action.input > .dropdown.small {
|
||||
padding: 8px 40px 8px 16px;
|
||||
}
|
||||
// 发布版本页面的分支按钮, 覆盖 Gitea 的样式, 避免按钮元素高度不一致
|
||||
.repository.new.release .target .selection.dropdown {
|
||||
padding-top: 8px;
|
||||
|
||||
@@ -5,7 +5,6 @@ import "./radius"; // 圆角, 此样式为基础样式, 确保在其他样式之
|
||||
import "./transition"; // 过渡效果
|
||||
import "./text"; // 文本或 SVG 的基本颜色
|
||||
import "./button"; // 按钮
|
||||
import "./chroma"; // 代码高亮
|
||||
import "./dropdown"; // 下拉框
|
||||
import "./input"; // 输入框
|
||||
import "./label"; // 标签
|
||||
@@ -13,3 +12,4 @@ import "./menu"; // 菜单
|
||||
import "./modal"; // 弹窗
|
||||
import "./tippy"; // 提示框
|
||||
import "./navbar"; // 导航栏
|
||||
import "./attached"; // 附加样式
|
||||
|
||||
@@ -166,12 +166,19 @@ export const taskStatusLabel = css`
|
||||
// 仓库标签 (私有/公开/内部)
|
||||
export const repoLabel = css`
|
||||
span,
|
||||
// 用户切换面板的标签
|
||||
.org-visibility div {
|
||||
&.ui.basic.label {
|
||||
background-color: unset;
|
||||
color: ${themeVars.color.text.light.num1};
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
padding: 3px 6px;
|
||||
}
|
||||
}
|
||||
.org-visibility span.ui.basic.label {
|
||||
font-size: 14px;
|
||||
}
|
||||
`;
|
||||
|
||||
// 软件包列表
|
||||
|
||||
@@ -193,3 +193,46 @@ export const secondaryMenu = css`
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
// 分页菜单
|
||||
export const paginationMenu = css`
|
||||
.ui.borderless.pagination.menu {
|
||||
align-items: center;
|
||||
background-color: unset;
|
||||
border: 0;
|
||||
gap: 4px;
|
||||
.item {
|
||||
border-radius: ${otherThemeVars.border.radius};
|
||||
min-width: 32px;
|
||||
min-height: 32px;
|
||||
height: 32px;
|
||||
justify-content: center;
|
||||
// 避免一些 hover 效果调整内容
|
||||
padding: 5px 10px !important;
|
||||
&.active {
|
||||
background: ${themeVars.github.bgColor.accent.emphasis};
|
||||
color: ${themeVars.color.white};
|
||||
}
|
||||
// 设置透明边框线避免 hover 时元素大小变化
|
||||
&:not(.active) {
|
||||
border: 1px solid #ffffff00;
|
||||
&:hover {
|
||||
background: unset;
|
||||
border-color: ${themeVars.color.secondary.self};
|
||||
}
|
||||
}
|
||||
&.navigation {
|
||||
&:not(.disabled) {
|
||||
span,
|
||||
svg {
|
||||
color: ${themeVars.color.primary.self};
|
||||
}
|
||||
}
|
||||
// 对齐文字
|
||||
svg {
|
||||
margin-top: 2px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -77,14 +77,27 @@ export const navbarRight = css`
|
||||
left: 22px;
|
||||
}
|
||||
}
|
||||
// 通知和计时器的圆点
|
||||
a.item {
|
||||
.notification_count,
|
||||
.header-stopwatch-dot {
|
||||
background-color: ${themeVars.github.bgColor.accent.emphasis};
|
||||
border-radius: 25px;
|
||||
color: ${themeVars.color.white};
|
||||
font-size: 8px;
|
||||
font-weight: 600;
|
||||
top: -14px;
|
||||
left: 12px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// 手机下的创建菜单按钮
|
||||
@media (max-width: 767.98px) {
|
||||
#navbar .navbar-right > .item:not(:last-child) {
|
||||
#navbar .navbar-right:has(.user-menu) > .item:not(:last-child) {
|
||||
display: none;
|
||||
}
|
||||
#navbar.navbar-menu-open .navbar-right > .item:not(:last-child) {
|
||||
#navbar.navbar-menu-open .navbar-right:has(.user-menu) > .item:not(:last-child) {
|
||||
display: grid;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,18 @@ import { css } from "src/types/vars";
|
||||
|
||||
// 简单的渐变过渡
|
||||
export const transition = css`
|
||||
// 差异对比的代码折叠按钮
|
||||
.code-expander-button,
|
||||
// 仓库 README 头部的按钮
|
||||
.file-header-left,
|
||||
.file-header-right,
|
||||
// 仪表板仓库列表
|
||||
.ui.attached.segment.table ul li,
|
||||
// Issue 列表
|
||||
.issue-list-toolbar .item,
|
||||
.flex-list#issue-list > .flex-item,
|
||||
// 分页菜单
|
||||
.ui.borderless.pagination.menu .item,
|
||||
// 迁移的元素
|
||||
#navbar .item,
|
||||
.header-wrapper .ui.tabular.menu .item,
|
||||
@@ -9,8 +21,6 @@ export const transition = css`
|
||||
.job-step-logs,
|
||||
.job-brief-item,
|
||||
.repo-file-cell,
|
||||
// 差异对比的代码折叠按钮
|
||||
.code-expander-button,
|
||||
.tippy-box .flex-items-block .item,
|
||||
.clone-panel-tab .item,
|
||||
.ui.form select,
|
||||
|
||||
Reference in New Issue
Block a user