mirror of
https://github.com/lutinglt/gitea-github-theme.git
synced 2025-10-27 13:40:31 +00:00
颜色变量计算&颜色主题迁移
This commit is contained in:
@@ -28,13 +28,13 @@ export const based = {
|
||||
},
|
||||
/** 输入框 */
|
||||
input: {
|
||||
text: null,
|
||||
background: null,
|
||||
toggleBackgound: "color-input-toggle-background",
|
||||
border: {
|
||||
self: null,
|
||||
hover: null,
|
||||
},
|
||||
text: null,
|
||||
toggleBackgound: "color-input-toggle-background",
|
||||
},
|
||||
light: {
|
||||
self: null,
|
||||
@@ -86,12 +86,8 @@ export const based = {
|
||||
label: {
|
||||
text: null,
|
||||
bg: null,
|
||||
hover: {
|
||||
bg: null,
|
||||
},
|
||||
active: {
|
||||
bg: null,
|
||||
},
|
||||
hoverBg: "color-label-hover-bg",
|
||||
activeBg: "color-label-active-bg",
|
||||
},
|
||||
accent: null,
|
||||
smallAccent: "color-small-accent",
|
||||
|
||||
@@ -2,5 +2,5 @@ export { based } from "./based";
|
||||
export { ansi, console } from "./console";
|
||||
export { diff } from "./diff";
|
||||
export { primary, secondary } from "./main";
|
||||
export { error, info, success, warning } from "./message";
|
||||
export { message } from "./message";
|
||||
export { named } from "./named";
|
||||
|
||||
@@ -4,7 +4,7 @@ const msg = {
|
||||
text: null,
|
||||
};
|
||||
|
||||
export const error = {
|
||||
const error = {
|
||||
...msg,
|
||||
bg: {
|
||||
self: null,
|
||||
@@ -13,13 +13,20 @@ export const error = {
|
||||
},
|
||||
};
|
||||
|
||||
export const success = {
|
||||
const success = {
|
||||
...msg,
|
||||
};
|
||||
|
||||
export const warning = {
|
||||
const warning = {
|
||||
...msg,
|
||||
};
|
||||
export const info = {
|
||||
const info = {
|
||||
...msg,
|
||||
};
|
||||
|
||||
export const message = {
|
||||
error,
|
||||
success,
|
||||
warning,
|
||||
info,
|
||||
};
|
||||
|
||||
@@ -4,3 +4,8 @@ import * as color from "./color";
|
||||
export type Primary = MapLeafNodes<typeof color.primary, string>;
|
||||
export type Secondary = MapLeafNodes<typeof color.secondary, string>;
|
||||
export type Named = MapLeafNodes<typeof color.named, string>;
|
||||
export type Message = MapLeafNodes<typeof color.message, string>;
|
||||
export type Ansi = MapLeafNodes<typeof color.ansi, string>;
|
||||
export type Console = MapLeafNodes<typeof color.console, string>;
|
||||
export type Diff = MapLeafNodes<typeof color.diff, string>;
|
||||
export type Based = MapLeafNodes<typeof color.based, string>;
|
||||
|
||||
@@ -14,19 +14,14 @@ const vars = {
|
||||
/** 用于标识当前是否为暗色主题: `"true"` 暗色 `"false"` 亮色 */
|
||||
isDarkTheme: "is-dark-theme",
|
||||
color: {
|
||||
...color.message,
|
||||
...color.based,
|
||||
...color.named,
|
||||
primary: color.primary,
|
||||
secondary: color.secondary,
|
||||
self: {
|
||||
...color.based,
|
||||
...color.named,
|
||||
},
|
||||
ansi: color.ansi,
|
||||
console: color.console,
|
||||
diff: color.diff,
|
||||
error: color.error,
|
||||
success: color.success,
|
||||
warning: color.warning,
|
||||
info: color.info,
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user