emoji 迁移

This commit is contained in:
lutinglt
2025-07-03 18:23:22 +08:00
parent 7bc47d0720
commit c61d8f1506
3 changed files with 31 additions and 36 deletions

View File

@@ -13,12 +13,41 @@ function stringToBoolean(str: string, name: string): boolean {
} }
} }
const dark_emoji = `
.emoji[aria-label="check mark"],
.emoji[aria-label="currency exchange"],
.emoji[aria-label="TOP arrow"],
.emoji[aria-label="END arrow"],
.emoji[aria-label="ON! arrow"],
.emoji[aria-label="SOON arrow"],
.emoji[aria-label="heavy dollar sign"],
.emoji[aria-label="copyright"],
.emoji[aria-label="registered"],
.emoji[aria-label="trade mark"],
.emoji[aria-label="multiply"],
.emoji[aria-label="plus"],
.emoji[aria-label="minus"],
.emoji[aria-label="divide"],
.emoji[aria-label="curly loop"],
.emoji[aria-label="double curly loop"],
.emoji[aria-label="wavy dash"],
.emoji[aria-label="paw prints"],
.emoji[aria-label="musical note"],
.emoji[aria-label="musical notes"]
`;
export function createTheme(theme: Theme): void { export function createTheme(theme: Theme): void {
const isDarkTheme = stringToBoolean(theme.isDarkTheme, "isDarkTheme");
if (isDarkTheme) {
globalStyle(`${dark_emoji}`, {
filter: "invert(100%) hue-rotate(180deg)",
});
}
createGlobalTheme(":root", themeVars, theme); createGlobalTheme(":root", themeVars, theme);
createGlobalTheme(":root", otherThemeVars, { createGlobalTheme(":root", otherThemeVars, {
git: "#f05133", git: "#f05133",
light: { light: {
mimicEnabled: theme.isDarkTheme mimicEnabled: isDarkTheme
? "rgba(0, 0, 0, calc(40 / 255 * 222 / 255 / var(--opacity-disabled)))" ? "rgba(0, 0, 0, calc(40 / 255 * 222 / 255 / var(--opacity-disabled)))"
: "rgba(0, 0, 0, calc(6 / 255 * 222 / 255 / var(--opacity-disabled)))", : "rgba(0, 0, 0, calc(6 / 255 * 222 / 255 / var(--opacity-disabled)))",
}, },
@@ -28,6 +57,6 @@ export function createTheme(theme: Theme): void {
}); });
globalStyle(":root", { globalStyle(":root", {
accentColor: themeVars.color.accent, accentColor: themeVars.color.accent,
colorScheme: stringToBoolean(theme.isDarkTheme, "isDarkTheme") ? "dark" : "light", colorScheme: isDarkTheme ? "dark" : "light",
}); });
} }

View File

@@ -1,23 +0,0 @@
// Made by Luting ^-^
.emoji[aria-label="check\\ mark"],
.emoji[aria-label="currency\\ exchange"],
.emoji[aria-label="TOP\\ arrow"],
.emoji[aria-label="END\\ arrow"],
.emoji[aria-label="ON! arrow"],
.emoji[aria-label="SOON\\ arrow"],
.emoji[aria-label="heavy dollar sign"],
.emoji[aria-label="copyright"],
.emoji[aria-label="registered"],
.emoji[aria-label="trade\\ mark"],
.emoji[aria-label="multiply"],
.emoji[aria-label="plus"],
.emoji[aria-label="minus"],
.emoji[aria-label="divide"],
.emoji[aria-label="curly\\ loop"],
.emoji[aria-label="double curly loop"],
.emoji[aria-label="wavy\\ dash"],
.emoji[aria-label="paw\\ prints"],
.emoji[aria-label="musical\\ note"],
.emoji[aria-label="musical\\ notes"] {
filter: invert(100%) hue-rotate(180deg);
}

View File

@@ -1,11 +0,0 @@
// Made by Luting ^-^
.lines-num span:after {
color: var(--color-text);
}
.ui.cards > .card,
.ui.card {
> .extra a:not(.ui):hover {
color: var(--color-blue);
}
}