mirror of
https://github.com/lutinglt/gitea-github-theme.git
synced 2025-10-26 13:00:31 +00:00
update md
This commit is contained in:
@@ -59,7 +59,7 @@ type ThemeColor = {
|
||||
/** 定义颜色, 用于生成颜色主题
|
||||
* @example
|
||||
* 文件名: "dark.css.ts"
|
||||
* import type { Console, Diff, Other } from "src/types";
|
||||
* import type { Console, Diff, Other, Github } from "src/types";
|
||||
* import { defineTheme, themeVars } from "src";
|
||||
*
|
||||
* const console: Console = {
|
||||
@@ -78,6 +78,7 @@ type ThemeColor = {
|
||||
* console,
|
||||
* diff,
|
||||
* other,
|
||||
* github,
|
||||
* })
|
||||
*/
|
||||
export function defineTheme(themeColor: ThemeColor, chroma: Chroma | null = null): Theme {
|
||||
|
||||
@@ -1,6 +1,12 @@
|
||||
import type { CSSVarFunction } from "src/core/types";
|
||||
|
||||
type CSSFallbackVar = `var(--${string}, ${string})`;
|
||||
/**
|
||||
* 设置 CSS 变量的回退值
|
||||
* @param cssvar `var(--${string})`
|
||||
* @param fallback
|
||||
* @returns `var(--${string}, fallback)`
|
||||
*/
|
||||
export function fallbackVar(cssvar: CSSVarFunction, fallback: string): CSSFallbackVar {
|
||||
const var_name = cssvar.replace("var(--", "").replace(")", "");
|
||||
return `var(--${var_name}, ${fallback})`;
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
export { defineTheme } from "./core/color";
|
||||
export type { Chroma, Console, Diff, Other } from "./types";
|
||||
export { themeVars } from "./types/vars";
|
||||
export type { Theme } from "./core/theme";
|
||||
export type { Chroma, Console, Diff, Github, Other } from "./types";
|
||||
export { otherThemeVars, themeVars } from "./types/vars";
|
||||
|
||||
@@ -201,17 +201,17 @@ export const github = {
|
||||
/** 热力图 */
|
||||
contribution: {
|
||||
default: {
|
||||
/** 热力图方块的颜色 */
|
||||
bgColor: {
|
||||
num0: null,
|
||||
num1: null,
|
||||
num2: null,
|
||||
num3: null,
|
||||
num4: null,
|
||||
/** github 无此颜色需自行计算
|
||||
* @example 可参考这个颜色 `--color-prettylights-syntax-string-regexp`
|
||||
*/
|
||||
/** github 无此颜色需自行计算 */
|
||||
num5: null,
|
||||
},
|
||||
/** 热力图方块的内边框颜色 */
|
||||
borderColor: {
|
||||
num0: null,
|
||||
num1: null,
|
||||
|
||||
Reference in New Issue
Block a user