mirror of
https://github.com/lutinglt/gitea-github-theme.git
synced 2025-10-26 13:00:31 +00:00
更新变量和注释
This commit is contained in:
15
.github/release.md
vendored
15
.github/release.md
vendored
@@ -2,10 +2,17 @@
|
|||||||
|
|
||||||
#### 更符合 GitHub 风格
|
#### 更符合 GitHub 风格
|
||||||
|
|
||||||
- 优化侧边栏间隔
|
- 差异对比折叠行文本颜色同步
|
||||||
- 优化下拉菜单项目边距
|
- 差异对比行号位置同步
|
||||||
- 关闭工单按钮为紫色
|
- 差异对比按钮和折叠行高度同步
|
||||||
|
- Actions 日志页面标题颜色同步
|
||||||
|
- Actions 日志页面设置菜单背景色同步
|
||||||
|
- 菜单背景色同步当前最新颜色
|
||||||
|
|
||||||
|
## 🎈 Perf
|
||||||
|
|
||||||
|
- Actions 日志页面标题间隔优化
|
||||||
|
|
||||||
## 🐞 Fix
|
## 🐞 Fix
|
||||||
|
|
||||||
- 分支按钮高度
|
- 修复差异对比分列视图下颜色丢失
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
export { css } from "@linaria/core";
|
|
||||||
export { defineTheme } from "./core/color";
|
export { defineTheme } from "./core/color";
|
||||||
export type { Console, Diff, Other } from "./types";
|
export type { Console, Diff, Other } from "./types";
|
||||||
export { themeVars } from "./types/vars";
|
export { themeVars } from "./types/vars";
|
||||||
|
|||||||
@@ -9,8 +9,10 @@ export const other = {
|
|||||||
timeline: null,
|
timeline: null,
|
||||||
/** 一些盒子颜色, 比如仓库文件列表 */
|
/** 一些盒子颜色, 比如仓库文件列表 */
|
||||||
box: {
|
box: {
|
||||||
|
/** 仓库文件列表最后一次提交, 头行背景色 */
|
||||||
header: null,
|
header: null,
|
||||||
body: {
|
body: {
|
||||||
|
/** 仓库文件列表背景色 */
|
||||||
self: null,
|
self: null,
|
||||||
/** diff 按钮行行色 */
|
/** diff 按钮行行色 */
|
||||||
highlight: null,
|
highlight: null,
|
||||||
@@ -18,19 +20,27 @@ export const other = {
|
|||||||
},
|
},
|
||||||
/** 文本 */
|
/** 文本 */
|
||||||
text: {
|
text: {
|
||||||
|
/** 主文本/主标题颜色 */
|
||||||
self: null,
|
self: null,
|
||||||
light: {
|
light: {
|
||||||
|
/** 普通basic按钮的文本颜色 */
|
||||||
self: null,
|
self: null,
|
||||||
|
/** 仓库文件列表的commit信息和时间文本 */
|
||||||
num1: null,
|
num1: null,
|
||||||
|
/** 副标题颜色 */
|
||||||
num2: null,
|
num2: null,
|
||||||
|
/** git 提交图里的提交时间文本 */
|
||||||
num3: null,
|
num3: null,
|
||||||
},
|
},
|
||||||
|
/** 弹窗标题色/一些激活的标题色 */
|
||||||
dark: null,
|
dark: null,
|
||||||
},
|
},
|
||||||
/** 输入框 */
|
/** 输入框 */
|
||||||
input: {
|
input: {
|
||||||
|
/** 选中时的文字颜色 */
|
||||||
text: null,
|
text: null,
|
||||||
background: null,
|
background: null,
|
||||||
|
/** 找不到, 不知道啥玩意, 似乎是和复选框有关的东西 */
|
||||||
toggleBackgound: "color-input-toggle-background",
|
toggleBackgound: "color-input-toggle-background",
|
||||||
border: {
|
border: {
|
||||||
self: null,
|
self: null,
|
||||||
@@ -38,16 +48,24 @@ export const other = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
light: {
|
light: {
|
||||||
|
/** 多行下交替行的强调色, 例提交历史 */
|
||||||
self: null,
|
self: null,
|
||||||
|
/** 不知道什么用, gitea css 中没有使用这个属性的 */
|
||||||
mimicEnabled: "color-light-mimic-enabled",
|
mimicEnabled: "color-light-mimic-enabled",
|
||||||
|
/** 基础按钮/标签的边框色 */
|
||||||
border: null,
|
border: null,
|
||||||
},
|
},
|
||||||
hover: {
|
hover: {
|
||||||
|
/** 按钮悬停背景色 */
|
||||||
self: null,
|
self: null,
|
||||||
|
/** 仓库文件列表悬停背景色 */
|
||||||
opaque: null,
|
opaque: null,
|
||||||
},
|
},
|
||||||
|
/** 设置页面菜单项当前项的背景色 */
|
||||||
active: null,
|
active: null,
|
||||||
|
/** 菜单背景色 */
|
||||||
menu: null,
|
menu: null,
|
||||||
|
/** 卡片背景色, 但是找不到元素, 可能是个人 README */
|
||||||
card: null,
|
card: null,
|
||||||
markup: {
|
markup: {
|
||||||
tableRow: "color-markup-table-row",
|
tableRow: "color-markup-table-row",
|
||||||
|
|||||||
@@ -34,3 +34,5 @@ const otherVars = {
|
|||||||
|
|
||||||
export const themeVars = createGlobalThemeContract(vars, varMapper);
|
export const themeVars = createGlobalThemeContract(vars, varMapper);
|
||||||
export const otherThemeVars = createGlobalThemeContract(otherVars, varMapper);
|
export const otherThemeVars = createGlobalThemeContract(otherVars, varMapper);
|
||||||
|
|
||||||
|
export { css } from "@linaria/core";
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { css, themeVars } from "src";
|
import { css, otherThemeVars, themeVars } from "src/types/vars";
|
||||||
import { otherThemeVars } from "src/types/vars";
|
|
||||||
|
|
||||||
|
// 仓库 Actions 页面
|
||||||
export const actions = css`
|
export const actions = css`
|
||||||
.page-content.repository.actions .ui.grid {
|
.page-content.repository.actions .ui.grid {
|
||||||
.four.wide {
|
.four.wide {
|
||||||
@@ -143,7 +143,7 @@ export const actionViewLeft = css`
|
|||||||
|
|
||||||
&.selected {
|
&.selected {
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color: ${themeVars.color.hover.self};
|
background-color: ${themeVars.color.console.hoverBg};
|
||||||
}
|
}
|
||||||
|
|
||||||
&:after {
|
&:after {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { css, themeVars } from "src";
|
import { css, themeVars } from "src/types/vars";
|
||||||
|
|
||||||
export const diff = css`
|
export const diff = css`
|
||||||
/* 折叠行多余的颜色 */
|
/* 折叠行多余的颜色 */
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { css } from "src";
|
import { css } from "src/types/vars";
|
||||||
|
|
||||||
export const chroma = css`
|
export const chroma = css`
|
||||||
.chroma {
|
.chroma {
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
import type { Console, Diff, Other } from "src";
|
import type { Console, Diff, Other } from "src";
|
||||||
import { defineTheme, themeVars } from "src";
|
import { defineTheme, themeVars } from "src";
|
||||||
|
|
||||||
|
const isDarkTheme = true;
|
||||||
|
|
||||||
const github = {
|
const github = {
|
||||||
display: {
|
display: {
|
||||||
brown: { fgColor: "#b69a6d" },
|
brown: { fgColor: "#b69a6d" },
|
||||||
@@ -40,25 +42,28 @@ const github = {
|
|||||||
attention: {
|
attention: {
|
||||||
muted: "#bb800926",
|
muted: "#bb800926",
|
||||||
},
|
},
|
||||||
black: "#010409",
|
|
||||||
success: {
|
success: {
|
||||||
muted: "#2ea04326",
|
muted: "#2ea04326",
|
||||||
},
|
},
|
||||||
danger: {
|
danger: {
|
||||||
muted: "#f851491a",
|
muted: "#f851491a",
|
||||||
},
|
},
|
||||||
|
default: "#0d1117",
|
||||||
inset: "#010409",
|
inset: "#010409",
|
||||||
muted: "#151b23",
|
muted: "#151b23",
|
||||||
},
|
},
|
||||||
borderColor: {
|
borderColor: {
|
||||||
|
default: "#3d444d",
|
||||||
muted: "#3d444db3",
|
muted: "#3d444db3",
|
||||||
},
|
},
|
||||||
control: {
|
control: {
|
||||||
bgColor: {
|
bgColor: {
|
||||||
active: "#2a313c",
|
active: "#2a313c",
|
||||||
|
hover: "#262c36",
|
||||||
},
|
},
|
||||||
transparent: {
|
transparent: {
|
||||||
bgColor: {
|
bgColor: {
|
||||||
|
selected: "#656c761a",
|
||||||
hover: "#656c7633",
|
hover: "#656c7633",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -116,47 +121,47 @@ const diff: Diff = {
|
|||||||
|
|
||||||
const other: Other = {
|
const other: Other = {
|
||||||
git: "#f05133",
|
git: "#f05133",
|
||||||
body: "#0d1117",
|
body: github.bgColor.default,
|
||||||
box: {
|
box: {
|
||||||
header: "#151b23",
|
header: github.bgColor.muted,
|
||||||
body: {
|
body: {
|
||||||
self: "#0d1117",
|
self: themeVars.color.body,
|
||||||
highlight: github.bgColor.accent.muted,
|
highlight: github.bgColor.accent.muted,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
text: {
|
text: {
|
||||||
self: github.fgColor.default,
|
self: github.fgColor.default,
|
||||||
dark: "#dbe0ea",
|
|
||||||
light: {
|
light: {
|
||||||
self: "#a6aab5",
|
self: github.fgColor.default,
|
||||||
num1: "rgb(125, 133, 144)",
|
num1: github.fgColor.muted,
|
||||||
num2: "#8a8e99",
|
num2: github.fgColor.muted,
|
||||||
num3: "#707687",
|
num3: github.fgColor.muted,
|
||||||
},
|
},
|
||||||
|
dark: github.fgColor.default,
|
||||||
},
|
},
|
||||||
footer: github.bgColor.black,
|
footer: github.bgColor.inset,
|
||||||
timeline: "#4c525e",
|
timeline: github.borderColor.muted,
|
||||||
input: {
|
input: {
|
||||||
text: "#d5dbe6",
|
text: themeVars.color.text.self,
|
||||||
background: "#2c2f35",
|
background: themeVars.color.body,
|
||||||
toggleBackgound: "#454a57",
|
toggleBackgound: themeVars.color.body,
|
||||||
border: {
|
border: {
|
||||||
self: themeVars.color.light.border,
|
self: themeVars.color.light.border,
|
||||||
hover: themeVars.color.light.border,
|
hover: themeVars.color.light.border,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
light: {
|
light: {
|
||||||
self: "#00000028",
|
self: themeVars.color.body,
|
||||||
mimicEnabled: "rgba(0, 0, 0, calc(40 / 255 * 222 / 255 / var(--opacity-disabled)))",
|
mimicEnabled: "rgba(0, 0, 0, calc(40 / 255 * 222 / 255 / var(--opacity-disabled)))",
|
||||||
border: "#3d444d",
|
border: github.borderColor.default,
|
||||||
},
|
},
|
||||||
hover: {
|
hover: {
|
||||||
self: "#656c7633",
|
self: github.control.bgColor.hover,
|
||||||
opaque: "#656c7666",
|
opaque: themeVars.color.box.header,
|
||||||
},
|
},
|
||||||
active: "#161a21",
|
active: github.control.transparent.bgColor.selected,
|
||||||
menu: "#0d1117",
|
menu: github.bgColor.inset,
|
||||||
card: "#0d1117",
|
card: github.bgColor.inset,
|
||||||
markup: {
|
markup: {
|
||||||
tableRow: "#ffffff06",
|
tableRow: "#ffffff06",
|
||||||
code: {
|
code: {
|
||||||
@@ -186,7 +191,7 @@ const other: Other = {
|
|||||||
bg: "#000000f0",
|
bg: "#000000f0",
|
||||||
},
|
},
|
||||||
nav: {
|
nav: {
|
||||||
bg: github.bgColor.black,
|
bg: github.bgColor.inset,
|
||||||
hoverBg: themeVars.color.hover.self,
|
hoverBg: themeVars.color.hover.self,
|
||||||
text: themeVars.color.text.self,
|
text: themeVars.color.text.self,
|
||||||
},
|
},
|
||||||
@@ -207,7 +212,7 @@ const other: Other = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export default defineTheme({
|
export default defineTheme({
|
||||||
isDarkTheme: true,
|
isDarkTheme,
|
||||||
primary: github.fgColor.accent,
|
primary: github.fgColor.accent,
|
||||||
primaryContrast: github.fgColor.default,
|
primaryContrast: github.fgColor.default,
|
||||||
secondary: "#3d444d",
|
secondary: "#3d444d",
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ export default defineConfig(({ mode }) => {
|
|||||||
preprocessor: (_selector, cssText) => sass.compileString(cssText).css, // 默认为全局样式并使用 sass-embedded 预处理 css
|
preprocessor: (_selector, cssText) => sass.compileString(cssText).css, // 默认为全局样式并使用 sass-embedded 预处理 css
|
||||||
tagResolver: (source, tag) =>
|
tagResolver: (source, tag) =>
|
||||||
// 识别从 src 导出的 css 标签,使用 @linaria/core/processors/css 处理
|
// 识别从 src 导出的 css 标签,使用 @linaria/core/processors/css 处理
|
||||||
source === "src" && tag === "css" ? require.resolve("@linaria/core/processors/css") : null,
|
source === "src/types/vars" && tag === "css" ? require.resolve("@linaria/core/processors/css") : null,
|
||||||
}),
|
}),
|
||||||
react(),
|
react(),
|
||||||
vanillaExtractPlugin(),
|
vanillaExtractPlugin(),
|
||||||
|
|||||||
Reference in New Issue
Block a user