mirror of
https://github.com/lutinglt/gitea-github-theme.git
synced 2025-10-27 13:40:31 +00:00
action 页面同步
This commit is contained in:
@@ -14,11 +14,7 @@ const suffix = ".css.tsx";
|
||||
* @param mode 模式, 开发模式为 dev `vite build --mode dev`
|
||||
* @returns vite.rollupOptions.input 的配置
|
||||
*/
|
||||
export function themeInput(
|
||||
outDir: string,
|
||||
themeDir: string,
|
||||
mode: string
|
||||
): { [key: string]: string } {
|
||||
export function themeInput(outDir: string, themeDir: string, mode: string): { [key: string]: string } {
|
||||
const hash = crypto.randomBytes(6).toString("hex");
|
||||
const tmpDir = `${outDir}/tmp-${hash}`; // 输出目录下的临时目录
|
||||
fs.mkdirSync(tmpDir, { recursive: true });
|
||||
|
||||
@@ -1,30 +1,49 @@
|
||||
const ansiColor = {
|
||||
/** 黑色 */
|
||||
black: null,
|
||||
/** 红色 */
|
||||
red: null,
|
||||
/** 绿色 */
|
||||
green: null,
|
||||
/** 黄色 */
|
||||
yellow: null,
|
||||
/** 蓝色 */
|
||||
blue: null,
|
||||
/** 品红 */
|
||||
magenta: null,
|
||||
/** 青色 */
|
||||
cyan: null,
|
||||
/** 白色 */
|
||||
white: null,
|
||||
};
|
||||
|
||||
export const ansi = {
|
||||
/** 亮色 */
|
||||
bright: ansiColor,
|
||||
...ansiColor,
|
||||
};
|
||||
|
||||
export const console = {
|
||||
/** Action 页面日志部分字体颜色 */
|
||||
fg: {
|
||||
/** 亮色用于标题或步骤标题激活时 */
|
||||
self: null,
|
||||
/** 暗色用于副标题或步骤标题 */
|
||||
subtle: null,
|
||||
},
|
||||
/** Action 页面日志部分背景色 */
|
||||
bg: null,
|
||||
/** Action 页面日志部分边框色 */
|
||||
border: null,
|
||||
/** Action 页面日志部分步骤标题激活颜色 */
|
||||
activeBg: "color-console-active-bg",
|
||||
/** Action 页面日志部分步骤标题悬停颜色 */
|
||||
hoverBg: "color-console-hover-bg",
|
||||
/** Action 页面日志部分设置菜单颜色 */
|
||||
menu: {
|
||||
/** 菜单背景色 */
|
||||
bg: null,
|
||||
/** 菜单边框色 */
|
||||
border: null,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -1,56 +1,27 @@
|
||||
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,
|
||||
},
|
||||
},
|
||||
/** 用于 color 属性的颜色 */
|
||||
fgColor: {
|
||||
/** 强调色
|
||||
* @actions 右侧日志标题颜色
|
||||
*/
|
||||
accent: null,
|
||||
attention: null,
|
||||
danger: null,
|
||||
/** 默认的文本颜色
|
||||
* @diff 增加/删除代码块的文本颜色
|
||||
*/
|
||||
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,
|
||||
},
|
||||
/** 暗淡的文本颜色
|
||||
* @diff 折叠行的文本颜色
|
||||
*/
|
||||
muted: null,
|
||||
},
|
||||
/** 用于 background 属性的颜色 */
|
||||
bgColor: {
|
||||
accent: {
|
||||
/** 强调色
|
||||
* @diff 折叠/展开按钮的悬停颜色
|
||||
* @actions 左侧子作业激活伪元素颜色
|
||||
*/
|
||||
emphasis: null,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -12,6 +12,7 @@ export const other = {
|
||||
header: null,
|
||||
body: {
|
||||
self: null,
|
||||
/** diff 按钮行行色 */
|
||||
highlight: null,
|
||||
},
|
||||
},
|
||||
|
||||
@@ -1,12 +1,21 @@
|
||||
import type { MapLeafNodes } from "src/core/types";
|
||||
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>;
|
||||
/** Actions 日志 ANSI 颜色 */
|
||||
export type Ansi = MapLeafNodes<typeof color.ansi, string>;
|
||||
/** Actions 颜色 */
|
||||
export type Console = MapLeafNodes<typeof color.console, string>;
|
||||
/** 代码差异对比颜色 */
|
||||
export type Diff = MapLeafNodes<typeof color.diff, string>;
|
||||
/** 其他颜色 */
|
||||
export type Other = MapLeafNodes<typeof color.other, string>;
|
||||
/** 仅限本主题的 Github 颜色 */
|
||||
export type Github = MapLeafNodes<typeof color.github, string>;
|
||||
|
||||
@@ -18,6 +18,7 @@ const vars = {
|
||||
...color.named,
|
||||
primary: color.primary,
|
||||
secondary: color.secondary,
|
||||
/** Actions 日志 ANSI 颜色 */
|
||||
ansi: color.ansi,
|
||||
console: color.console,
|
||||
diff: color.diff,
|
||||
|
||||
Reference in New Issue
Block a user