mirror of
https://github.com/lutinglt/gitea-github-theme.git
synced 2025-10-26 21:20:31 +00:00
声明全部颜色变量
This commit is contained in:
103
src/types/color/based.ts
Normal file
103
src/types/color/based.ts
Normal file
@@ -0,0 +1,103 @@
|
||||
export const based = {
|
||||
/** 未知 */
|
||||
git: null,
|
||||
/** 主要背景色 */
|
||||
body: null,
|
||||
/** 页面底部状态栏背景色 */
|
||||
footer: null,
|
||||
/** Issue 等页面时间线的线颜色 */
|
||||
timeline: null,
|
||||
/** 一些盒子颜色, 比如仓库文件列表 */
|
||||
box: {
|
||||
header: null,
|
||||
body: {
|
||||
self: null,
|
||||
highlight: null,
|
||||
},
|
||||
},
|
||||
/** 文本 */
|
||||
text: {
|
||||
self: null,
|
||||
light: {
|
||||
self: null,
|
||||
num1: null,
|
||||
num2: null,
|
||||
num3: null,
|
||||
},
|
||||
dark: null,
|
||||
},
|
||||
/** 输入框 */
|
||||
input: {
|
||||
background: null,
|
||||
border: {
|
||||
self: null,
|
||||
hover: null,
|
||||
},
|
||||
text: null,
|
||||
toggleBackgound: "color-input-toggle-background",
|
||||
},
|
||||
light: {
|
||||
self: null,
|
||||
mimicEnabled: "color-light-mimic-enabled",
|
||||
border: null,
|
||||
},
|
||||
hover: {
|
||||
self: null,
|
||||
opaque: null,
|
||||
},
|
||||
active: null,
|
||||
menu: null,
|
||||
card: null,
|
||||
markup: {
|
||||
tableRow: "color-markup-table-row",
|
||||
code: {
|
||||
block: null,
|
||||
inline: null,
|
||||
},
|
||||
},
|
||||
button: null,
|
||||
codeBg: "color-code-bg",
|
||||
shadow: {
|
||||
self: null,
|
||||
opaque: null,
|
||||
},
|
||||
secondaryBg: "color-secondary-bg",
|
||||
expandButton: "color-expand-button",
|
||||
placeholderText: "color-placeholder-text",
|
||||
editorLineHighlight: "color-editor-line-highlight",
|
||||
projectColumnBg: "color-project-column-bg",
|
||||
caret: null,
|
||||
reaction: {
|
||||
bg: null,
|
||||
hoverBg: "color-reaction-hover-bg",
|
||||
activeBg: "color-reaction-active-bg",
|
||||
},
|
||||
tooltip: {
|
||||
text: null,
|
||||
bg: null,
|
||||
},
|
||||
nav: {
|
||||
bg: null,
|
||||
hoverBg: "color-nav-hover-bg",
|
||||
text: null,
|
||||
},
|
||||
secondaryNavBg: "color-secondary-nav-bg",
|
||||
/** 标签 */
|
||||
label: {
|
||||
text: null,
|
||||
bg: null,
|
||||
hover: {
|
||||
bg: null,
|
||||
},
|
||||
active: {
|
||||
bg: null,
|
||||
},
|
||||
},
|
||||
accent: null,
|
||||
smallAccent: "color-small-accent",
|
||||
highlight: {
|
||||
bg: null,
|
||||
fg: null,
|
||||
},
|
||||
overlayBackdrop: "color-overlay-backdrop",
|
||||
};
|
||||
@@ -1,5 +1,6 @@
|
||||
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 { self } from "./named";
|
||||
export { named } from "./named";
|
||||
|
||||
@@ -48,4 +48,7 @@ export const secondary = {
|
||||
num4: null,
|
||||
},
|
||||
alpha: alpha,
|
||||
button: null,
|
||||
hover: null,
|
||||
active: null,
|
||||
};
|
||||
|
||||
@@ -21,7 +21,7 @@ const commitColor = {
|
||||
},
|
||||
};
|
||||
|
||||
export const self = {
|
||||
export const named = {
|
||||
/** 红色/提交警告签名颜色 */
|
||||
red: {
|
||||
...commitColor,
|
||||
@@ -35,13 +35,13 @@ export const self = {
|
||||
/** 黄色/提交未信任签名颜色 */
|
||||
yellow: {
|
||||
...commitColor,
|
||||
...baseColor
|
||||
...baseColor,
|
||||
},
|
||||
olive: baseColor,
|
||||
/** 绿色/提交信任签名颜色 */
|
||||
green: {
|
||||
...commitColor,
|
||||
...baseColor
|
||||
...baseColor,
|
||||
},
|
||||
teal: baseColor,
|
||||
blue: baseColor,
|
||||
|
||||
@@ -3,4 +3,4 @@ import * as color from "./color";
|
||||
|
||||
export type Primary = MapLeafNodes<typeof color.primary, string>;
|
||||
export type Secondary = MapLeafNodes<typeof color.secondary, string>;
|
||||
export type Self = MapLeafNodes<typeof color.self, string>;
|
||||
export type Named = MapLeafNodes<typeof color.named, string>;
|
||||
|
||||
@@ -14,8 +14,19 @@ const vars = {
|
||||
/** 用于标识当前是否为暗色主题: `"true"` 暗色 `"false"` 亮色 */
|
||||
isDarkTheme: "is-dark-theme",
|
||||
color: {
|
||||
blue: null,
|
||||
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