mirror of
https://github.com/lutinglt/gitea-github-theme.git
synced 2025-10-27 05:31:04 +00:00
Compare commits
3 Commits
d2be94ee27
...
3d34619d79
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3d34619d79 | ||
|
|
7b363e3e9c | ||
|
|
e113d1c603 |
5
.gitattributes
vendored
Normal file
5
.gitattributes
vendored
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
.github/* linguist-vendored
|
||||||
|
.vscode/* linguist-vendored
|
||||||
|
screenshots/* linguist-vendored
|
||||||
|
scripts/* linguist-vendored
|
||||||
|
eslint.config.js linguist-vendored
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
import { rgba } from "polished";
|
import { rgba } from "polished";
|
||||||
import { scaleColorLight } from "src/functions";
|
import { scaleColorLight } from "src/functions";
|
||||||
import type { Ansi, Console, Diff, Message, Named, Other, Primary, Secondary } from "src/types";
|
import type { Ansi, Console, Diff, Github, Message, Named, Other, Primary, Secondary } from "src/types";
|
||||||
import { themeVars } from "src/types/vars";
|
import { themeVars } from "src/types/vars";
|
||||||
import type { Theme } from "./theme";
|
import type { Theme } from "./theme";
|
||||||
|
|
||||||
@@ -51,6 +51,8 @@ interface ColorTheme {
|
|||||||
diff: Diff;
|
diff: Diff;
|
||||||
/** 其他 */
|
/** 其他 */
|
||||||
other: Other;
|
other: Other;
|
||||||
|
/** 仅适用于本主题的全局变量, 取自 Github */
|
||||||
|
github: Github;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 定义颜色, 用于生成颜色主题
|
/** 定义颜色, 用于生成颜色主题
|
||||||
@@ -349,5 +351,6 @@ export function defineTheme(theme: ColorTheme): Theme {
|
|||||||
...message,
|
...message,
|
||||||
...theme.other,
|
...theme.other,
|
||||||
},
|
},
|
||||||
|
github: theme.github,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
56
src/types/color/github.ts
Normal file
56
src/types/color/github.ts
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
export const github = {
|
||||||
|
display: {
|
||||||
|
brown: { fgColor: null },
|
||||||
|
cyan: { fgColor: null },
|
||||||
|
indigo: { fgColor: null },
|
||||||
|
lemon: { fgColor: null },
|
||||||
|
olive: { fgColor: null },
|
||||||
|
teal: { fgColor: null },
|
||||||
|
},
|
||||||
|
diffBlob: {
|
||||||
|
addtionNum: {
|
||||||
|
bgColor: null,
|
||||||
|
},
|
||||||
|
addtionWord: {
|
||||||
|
bgColor: null,
|
||||||
|
},
|
||||||
|
deletionNum: {
|
||||||
|
bgColor: null,
|
||||||
|
},
|
||||||
|
deletionWord: {
|
||||||
|
bgColor: null,
|
||||||
|
},
|
||||||
|
hunkNum: {
|
||||||
|
/** diff 按钮色 */
|
||||||
|
bgColorRest: null,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
fgColor: {
|
||||||
|
accent: null,
|
||||||
|
attention: null,
|
||||||
|
danger: null,
|
||||||
|
default: null,
|
||||||
|
disabled: null,
|
||||||
|
done: null,
|
||||||
|
neutral: null,
|
||||||
|
severe: null,
|
||||||
|
sponsors: null,
|
||||||
|
success: null,
|
||||||
|
black: null,
|
||||||
|
white: null,
|
||||||
|
},
|
||||||
|
bgColor: {
|
||||||
|
accent: {
|
||||||
|
emphasis: null,
|
||||||
|
muted: null,
|
||||||
|
},
|
||||||
|
black: null,
|
||||||
|
success: {
|
||||||
|
muted: null,
|
||||||
|
},
|
||||||
|
danger: {
|
||||||
|
muted: null,
|
||||||
|
},
|
||||||
|
muted: null,
|
||||||
|
},
|
||||||
|
};
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
export { ansi, console } from "./console";
|
export { ansi, console } from "./console";
|
||||||
export { diff } from "./diff";
|
export { diff } from "./diff";
|
||||||
|
export { github } from "./github";
|
||||||
export { primary, secondary } from "./main";
|
export { primary, secondary } from "./main";
|
||||||
export { message } from "./message";
|
export { message } from "./message";
|
||||||
export { named } from "./named";
|
export { named } from "./named";
|
||||||
|
|||||||
@@ -9,3 +9,4 @@ export type Ansi = MapLeafNodes<typeof color.ansi, string>;
|
|||||||
export type Console = MapLeafNodes<typeof color.console, string>;
|
export type Console = MapLeafNodes<typeof color.console, string>;
|
||||||
export type Diff = MapLeafNodes<typeof color.diff, string>;
|
export type Diff = MapLeafNodes<typeof color.diff, string>;
|
||||||
export type Other = MapLeafNodes<typeof color.other, string>;
|
export type Other = MapLeafNodes<typeof color.other, string>;
|
||||||
|
export type Github = MapLeafNodes<typeof color.github, string>;
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ const vars = {
|
|||||||
console: color.console,
|
console: color.console,
|
||||||
diff: color.diff,
|
diff: color.diff,
|
||||||
},
|
},
|
||||||
|
github: color.github,
|
||||||
};
|
};
|
||||||
|
|
||||||
const otherVars = {
|
const otherVars = {
|
||||||
|
|||||||
@@ -1,42 +0,0 @@
|
|||||||
// Made by Luting ^-^
|
|
||||||
.added-code,
|
|
||||||
.removed-code {
|
|
||||||
color: #fff !important;
|
|
||||||
border-radius: 0.1875rem;
|
|
||||||
|
|
||||||
* {
|
|
||||||
color: #fff !important;
|
|
||||||
border-radius: 0.1875rem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.code-diff-unified {
|
|
||||||
.add-code {
|
|
||||||
.lines-num,
|
|
||||||
.lines-escape {
|
|
||||||
background-color: #1c4428;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.del-code {
|
|
||||||
.lines-num,
|
|
||||||
.lines-escape {
|
|
||||||
background-color: #542426;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.code-diff-unified .tag-code td,
|
|
||||||
.diff-file-body tr.tag-code:last-child > td {
|
|
||||||
background-color: #121d2f;
|
|
||||||
}
|
|
||||||
|
|
||||||
.code-expander-button,
|
|
||||||
.code-diff-unified .tag-code .lines-num,
|
|
||||||
.code-diff-unified .tag-code .lines-escape,
|
|
||||||
.diff-file-body tr.tag-code:last-child > td.lines-num,
|
|
||||||
.diff-file-body tr.tag-code:last-child > td.lines-escape {
|
|
||||||
background-color: #0c2d6b;
|
|
||||||
}
|
|
||||||
|
|
||||||
.code-expander-button:hover {
|
|
||||||
background: #1f6feb;
|
|
||||||
}
|
|
||||||
43
styles/components/diff.tsx
Normal file
43
styles/components/diff.tsx
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
import { css, themeVars } from "src";
|
||||||
|
|
||||||
|
export const diff = css`
|
||||||
|
/* 间隔行多余的颜色 */
|
||||||
|
.tag-code {
|
||||||
|
background-color: unset;
|
||||||
|
|
||||||
|
.code-inner {
|
||||||
|
color: ${themeVars.github.fgColor.neutral};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* 增加/删除行多余的颜色 */
|
||||||
|
.code-diff-unified {
|
||||||
|
.del-code,
|
||||||
|
.add-code {
|
||||||
|
background: unset;
|
||||||
|
border-color: unset;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* 增加/删除相关代码背景色圆角 */
|
||||||
|
.added-code,
|
||||||
|
.removed-code {
|
||||||
|
border-radius: 0.1875rem;
|
||||||
|
color: ${themeVars.github.fgColor.default};
|
||||||
|
/* 覆盖掉 chroma 的颜色 */
|
||||||
|
* {
|
||||||
|
color: ${themeVars.github.fgColor.default} !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* 展开/收缩按钮 */
|
||||||
|
.code-expander-button {
|
||||||
|
height: 24px !important;
|
||||||
|
line-height: 24px;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background: ${themeVars.github.bgColor.accent.emphasis};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* 行号居中 */
|
||||||
|
.lines-num {
|
||||||
|
text-align: center !important;
|
||||||
|
}
|
||||||
|
`;
|
||||||
1
styles/components/index.tsx
Normal file
1
styles/components/index.tsx
Normal file
@@ -0,0 +1 @@
|
|||||||
|
import "./diff"
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
import "./public"
|
||||||
|
import "./components"
|
||||||
@@ -1,274 +0,0 @@
|
|||||||
// Made by Rainnny <3
|
|
||||||
.chroma {
|
|
||||||
background-color: var(--color-code-bg);
|
|
||||||
|
|
||||||
.lntd {
|
|
||||||
vertical-align: top;
|
|
||||||
border: 0;
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.lntable {
|
|
||||||
border-spacing: 0;
|
|
||||||
border: 0;
|
|
||||||
width: auto;
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
display: block;
|
|
||||||
overflow: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hl {
|
|
||||||
width: 100%;
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.lnt,
|
|
||||||
.ln {
|
|
||||||
margin-right: 0.4em;
|
|
||||||
padding: 0 0.4em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.gs {
|
|
||||||
font-weight: var(--font-weight-semibold);
|
|
||||||
}
|
|
||||||
|
|
||||||
.gl {
|
|
||||||
text-decoration: underline;
|
|
||||||
}
|
|
||||||
|
|
||||||
.bp {
|
|
||||||
color: #fabd2f;
|
|
||||||
}
|
|
||||||
|
|
||||||
.c,
|
|
||||||
.c1,
|
|
||||||
.ch,
|
|
||||||
.cm {
|
|
||||||
color: #777e94;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cp {
|
|
||||||
color: #8ec07c;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cpf {
|
|
||||||
color: #79c0ff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cs {
|
|
||||||
color: #9075cd;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dl {
|
|
||||||
color: #79c0ff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.gd {
|
|
||||||
color: #fff;
|
|
||||||
background-color: #5f3737;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ge {
|
|
||||||
color: #ddee30;
|
|
||||||
}
|
|
||||||
|
|
||||||
.gh {
|
|
||||||
color: #ffaa10;
|
|
||||||
}
|
|
||||||
|
|
||||||
.gi {
|
|
||||||
color: #fff;
|
|
||||||
background-color: #3a523a;
|
|
||||||
}
|
|
||||||
|
|
||||||
.go {
|
|
||||||
color: #777e94;
|
|
||||||
}
|
|
||||||
|
|
||||||
.gp {
|
|
||||||
color: #ebdbb2;
|
|
||||||
}
|
|
||||||
|
|
||||||
.gr {
|
|
||||||
color: #f43;
|
|
||||||
}
|
|
||||||
|
|
||||||
.gs {
|
|
||||||
color: #ebdbb2;
|
|
||||||
}
|
|
||||||
|
|
||||||
.gt {
|
|
||||||
color: #7ee787;
|
|
||||||
}
|
|
||||||
|
|
||||||
.gu {
|
|
||||||
color: #a5d6ff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.il {
|
|
||||||
color: #79c0ff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.k {
|
|
||||||
color: #ff7b72;
|
|
||||||
}
|
|
||||||
|
|
||||||
.kc {
|
|
||||||
color: #79c0ff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.kd {
|
|
||||||
color: #ff7b72;
|
|
||||||
}
|
|
||||||
|
|
||||||
.kn {
|
|
||||||
color: #ff7b72;
|
|
||||||
}
|
|
||||||
|
|
||||||
.kp {
|
|
||||||
color: #5f8700;
|
|
||||||
}
|
|
||||||
|
|
||||||
.kr {
|
|
||||||
color: #7ee787;
|
|
||||||
}
|
|
||||||
|
|
||||||
.kt {
|
|
||||||
color: #ff7b72;
|
|
||||||
}
|
|
||||||
|
|
||||||
.m,
|
|
||||||
.mb,
|
|
||||||
.mf,
|
|
||||||
.mh,
|
|
||||||
.mi,
|
|
||||||
.mo {
|
|
||||||
color: #79c0ff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.n {
|
|
||||||
color: #c9d1d9;
|
|
||||||
}
|
|
||||||
|
|
||||||
.na {
|
|
||||||
color: #d2a8ff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nb {
|
|
||||||
color: #a5d6ff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nc {
|
|
||||||
color: #e6edf3;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nd {
|
|
||||||
color: #79c0ff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ne {
|
|
||||||
color: #7ee787;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nf,
|
|
||||||
.ni {
|
|
||||||
color: #d2a8ff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nl {
|
|
||||||
color: #7ee787;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nn {
|
|
||||||
color: #e6edf3;
|
|
||||||
}
|
|
||||||
|
|
||||||
.no {
|
|
||||||
color: #79c0ff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nt {
|
|
||||||
color: #7ee787;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nv {
|
|
||||||
color: #ebdbb2;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nx {
|
|
||||||
color: #b6bac5;
|
|
||||||
}
|
|
||||||
|
|
||||||
.o {
|
|
||||||
color: #7ee787;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ow {
|
|
||||||
color: #5f8700;
|
|
||||||
}
|
|
||||||
|
|
||||||
.p {
|
|
||||||
color: #d2d4db;
|
|
||||||
}
|
|
||||||
|
|
||||||
.s,
|
|
||||||
.s1,
|
|
||||||
.s2 {
|
|
||||||
color: #a5d6ff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.sa {
|
|
||||||
color: #79c0ff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.sb {
|
|
||||||
color: #a5d6ff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.sc {
|
|
||||||
color: #79c0ff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.sd {
|
|
||||||
color: #777e94;
|
|
||||||
}
|
|
||||||
|
|
||||||
.se {
|
|
||||||
color: #7ee787;
|
|
||||||
}
|
|
||||||
|
|
||||||
.sh {
|
|
||||||
color: #79c0ff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.si {
|
|
||||||
color: #ffaa10;
|
|
||||||
}
|
|
||||||
|
|
||||||
.sr {
|
|
||||||
color: #9075cd;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ss {
|
|
||||||
color: #7ee787;
|
|
||||||
}
|
|
||||||
|
|
||||||
.sx {
|
|
||||||
color: #ffaa10;
|
|
||||||
}
|
|
||||||
|
|
||||||
.vc {
|
|
||||||
color: #7ee787;
|
|
||||||
}
|
|
||||||
|
|
||||||
.vg,
|
|
||||||
.vi {
|
|
||||||
color: #ffaa10;
|
|
||||||
}
|
|
||||||
|
|
||||||
.w {
|
|
||||||
color: #7f8699;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
277
styles/public/chroma.tsx
Normal file
277
styles/public/chroma.tsx
Normal file
@@ -0,0 +1,277 @@
|
|||||||
|
import { css } from "src";
|
||||||
|
|
||||||
|
export const chroma = css`
|
||||||
|
.chroma {
|
||||||
|
background-color: var(--color-code-bg);
|
||||||
|
|
||||||
|
.lntd {
|
||||||
|
vertical-align: top;
|
||||||
|
border: 0;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lntable {
|
||||||
|
border-spacing: 0;
|
||||||
|
border: 0;
|
||||||
|
width: auto;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
display: block;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hl {
|
||||||
|
width: 100%;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lnt,
|
||||||
|
.ln {
|
||||||
|
margin-right: 0.4em;
|
||||||
|
padding: 0 0.4em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.gs {
|
||||||
|
font-weight: var(--font-weight-semibold);
|
||||||
|
}
|
||||||
|
|
||||||
|
.gl {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bp {
|
||||||
|
color: #fabd2f;
|
||||||
|
}
|
||||||
|
|
||||||
|
.c,
|
||||||
|
.c1,
|
||||||
|
.ch,
|
||||||
|
.cm {
|
||||||
|
color: #777e94;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cp {
|
||||||
|
color: #8ec07c;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cpf {
|
||||||
|
color: #79c0ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cs {
|
||||||
|
color: #9075cd;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dl {
|
||||||
|
color: #79c0ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.gd {
|
||||||
|
color: #fff;
|
||||||
|
background-color: #5f3737;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ge {
|
||||||
|
color: #ddee30;
|
||||||
|
}
|
||||||
|
|
||||||
|
.gh {
|
||||||
|
color: #ffaa10;
|
||||||
|
}
|
||||||
|
|
||||||
|
.gi {
|
||||||
|
color: #fff;
|
||||||
|
background-color: #3a523a;
|
||||||
|
}
|
||||||
|
|
||||||
|
.go {
|
||||||
|
color: #777e94;
|
||||||
|
}
|
||||||
|
|
||||||
|
.gp {
|
||||||
|
color: #ebdbb2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.gr {
|
||||||
|
color: #f43;
|
||||||
|
}
|
||||||
|
|
||||||
|
.gs {
|
||||||
|
color: #ebdbb2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.gt {
|
||||||
|
color: #7ee787;
|
||||||
|
}
|
||||||
|
|
||||||
|
.gu {
|
||||||
|
color: #a5d6ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.il {
|
||||||
|
color: #79c0ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.k {
|
||||||
|
color: #ff7b72;
|
||||||
|
}
|
||||||
|
|
||||||
|
.kc {
|
||||||
|
color: #79c0ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.kd {
|
||||||
|
color: #ff7b72;
|
||||||
|
}
|
||||||
|
|
||||||
|
.kn {
|
||||||
|
color: #ff7b72;
|
||||||
|
}
|
||||||
|
|
||||||
|
.kp {
|
||||||
|
color: #5f8700;
|
||||||
|
}
|
||||||
|
|
||||||
|
.kr {
|
||||||
|
color: #7ee787;
|
||||||
|
}
|
||||||
|
|
||||||
|
.kt {
|
||||||
|
color: #ff7b72;
|
||||||
|
}
|
||||||
|
|
||||||
|
.m,
|
||||||
|
.mb,
|
||||||
|
.mf,
|
||||||
|
.mh,
|
||||||
|
.mi,
|
||||||
|
.mo {
|
||||||
|
color: #79c0ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.n {
|
||||||
|
color: #c9d1d9;
|
||||||
|
}
|
||||||
|
|
||||||
|
.na {
|
||||||
|
color: #d2a8ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nb {
|
||||||
|
color: #a5d6ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nc {
|
||||||
|
color: #e6edf3;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nd {
|
||||||
|
color: #79c0ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ne {
|
||||||
|
color: #7ee787;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nf,
|
||||||
|
.ni {
|
||||||
|
color: #d2a8ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nl {
|
||||||
|
color: #7ee787;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nn {
|
||||||
|
color: #e6edf3;
|
||||||
|
}
|
||||||
|
|
||||||
|
.no {
|
||||||
|
color: #79c0ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nt {
|
||||||
|
color: #7ee787;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nv {
|
||||||
|
color: #ebdbb2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nx {
|
||||||
|
color: #b6bac5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.o {
|
||||||
|
color: #7ee787;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ow {
|
||||||
|
color: #5f8700;
|
||||||
|
}
|
||||||
|
|
||||||
|
.p {
|
||||||
|
color: #d2d4db;
|
||||||
|
}
|
||||||
|
|
||||||
|
.s,
|
||||||
|
.s1,
|
||||||
|
.s2 {
|
||||||
|
color: #a5d6ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sa {
|
||||||
|
color: #79c0ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sb {
|
||||||
|
color: #a5d6ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sc {
|
||||||
|
color: #79c0ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sd {
|
||||||
|
color: #777e94;
|
||||||
|
}
|
||||||
|
|
||||||
|
.se {
|
||||||
|
color: #7ee787;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sh {
|
||||||
|
color: #79c0ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.si {
|
||||||
|
color: #ffaa10;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sr {
|
||||||
|
color: #9075cd;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ss {
|
||||||
|
color: #7ee787;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sx {
|
||||||
|
color: #ffaa10;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vc {
|
||||||
|
color: #7ee787;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vg,
|
||||||
|
.vi {
|
||||||
|
color: #ffaa10;
|
||||||
|
}
|
||||||
|
|
||||||
|
.w {
|
||||||
|
color: #7f8699;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`;
|
||||||
1
styles/public/index.tsx
Normal file
1
styles/public/index.tsx
Normal file
@@ -0,0 +1 @@
|
|||||||
|
import "./chroma"
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
/* Made by Luting ^-^ */
|
|
||||||
@use "public";
|
|
||||||
@use "components";
|
|
||||||
@@ -10,6 +10,24 @@ const github = {
|
|||||||
olive: { fgColor: "#a2a626" },
|
olive: { fgColor: "#a2a626" },
|
||||||
teal: { fgColor: "#1cb0ab" },
|
teal: { fgColor: "#1cb0ab" },
|
||||||
},
|
},
|
||||||
|
diffBlob: {
|
||||||
|
addtionNum: {
|
||||||
|
bgColor: "#3fb9504d",
|
||||||
|
},
|
||||||
|
addtionWord: {
|
||||||
|
bgColor: "#2ea04366",
|
||||||
|
},
|
||||||
|
deletionNum: {
|
||||||
|
bgColor: "#f851494d",
|
||||||
|
},
|
||||||
|
deletionWord: {
|
||||||
|
bgColor: "#f8514966",
|
||||||
|
},
|
||||||
|
hunkNum: {
|
||||||
|
/** diff 按钮色 */
|
||||||
|
bgColorRest: "#0c2d6b",
|
||||||
|
},
|
||||||
|
},
|
||||||
fgColor: {
|
fgColor: {
|
||||||
accent: "#4493f8",
|
accent: "#4493f8",
|
||||||
attention: "#d29922",
|
attention: "#d29922",
|
||||||
@@ -25,7 +43,18 @@ const github = {
|
|||||||
white: "#ffffff",
|
white: "#ffffff",
|
||||||
},
|
},
|
||||||
bgColor: {
|
bgColor: {
|
||||||
|
accent: {
|
||||||
|
emphasis: "#1f6feb",
|
||||||
|
muted: "#388bfd1a",
|
||||||
|
},
|
||||||
black: "#010409",
|
black: "#010409",
|
||||||
|
success: {
|
||||||
|
muted: "#2ea04326",
|
||||||
|
},
|
||||||
|
danger: {
|
||||||
|
muted: "#f851491a",
|
||||||
|
},
|
||||||
|
muted: "#151b23",
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -47,26 +76,26 @@ const console: Console = {
|
|||||||
const diff: Diff = {
|
const diff: Diff = {
|
||||||
added: {
|
added: {
|
||||||
linenum: {
|
linenum: {
|
||||||
bg: "#1c4428",
|
bg: github.diffBlob.addtionNum.bgColor,
|
||||||
},
|
},
|
||||||
row: {
|
row: {
|
||||||
bg: "#12261e",
|
bg: github.bgColor.success.muted,
|
||||||
border: "#314a37",
|
border: github.bgColor.success.muted,
|
||||||
},
|
},
|
||||||
word: {
|
word: {
|
||||||
bg: "#1d572d",
|
bg: github.diffBlob.addtionWord.bgColor,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
removed: {
|
removed: {
|
||||||
linenum: {
|
linenum: {
|
||||||
bg: "#542426",
|
bg: github.diffBlob.deletionNum.bgColor,
|
||||||
},
|
},
|
||||||
row: {
|
row: {
|
||||||
bg: "#25171c",
|
bg: github.bgColor.danger.muted,
|
||||||
border: "#634343",
|
border: github.bgColor.danger.muted,
|
||||||
},
|
},
|
||||||
word: {
|
word: {
|
||||||
bg: "#792e2d",
|
bg: github.diffBlob.deletionWord.bgColor,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
moved: {
|
moved: {
|
||||||
@@ -75,7 +104,7 @@ const diff: Diff = {
|
|||||||
border: "#bcca6f",
|
border: "#bcca6f",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
inactive: "#353846",
|
inactive: github.bgColor.muted,
|
||||||
};
|
};
|
||||||
|
|
||||||
const other: Other = {
|
const other: Other = {
|
||||||
@@ -85,11 +114,12 @@ const other: Other = {
|
|||||||
header: "#151b23",
|
header: "#151b23",
|
||||||
body: {
|
body: {
|
||||||
self: "#0d1117",
|
self: "#0d1117",
|
||||||
highlight: "#262c36",
|
/** diff 按钮行行色 */
|
||||||
|
highlight: github.bgColor.accent.muted,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
text: {
|
text: {
|
||||||
self: "#dce2e7",
|
self: github.fgColor.default,
|
||||||
dark: "#dbe0ea",
|
dark: "#dbe0ea",
|
||||||
light: {
|
light: {
|
||||||
self: "#a6aab5",
|
self: "#a6aab5",
|
||||||
@@ -135,7 +165,7 @@ const other: Other = {
|
|||||||
opaque: "#00000080",
|
opaque: "#00000080",
|
||||||
},
|
},
|
||||||
secondaryBg: "#ffffff26",
|
secondaryBg: "#ffffff26",
|
||||||
expandButton: "#3c404d",
|
expandButton: github.diffBlob.hunkNum.bgColorRest,
|
||||||
placeholderText: "#8a8e99",
|
placeholderText: "#8a8e99",
|
||||||
editorLineHighlight: themeVars.color.primary.light.num5,
|
editorLineHighlight: themeVars.color.primary.light.num5,
|
||||||
projectColumnBg: themeVars.color.secondary.light.num2,
|
projectColumnBg: themeVars.color.secondary.light.num2,
|
||||||
@@ -194,4 +224,5 @@ export default defineTheme({
|
|||||||
console,
|
console,
|
||||||
diff,
|
diff,
|
||||||
other,
|
other,
|
||||||
|
github,
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user