Set data-bs-theme based on the presence of "dark" in theme name (#2638)

This commit is contained in:
SleeplessOne1917 2024-07-29 13:11:05 +00:00 committed by GitHub
parent e9ba38dedf
commit e9c6e99165
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 11901 additions and 50 deletions

File diff suppressed because it is too large Load diff

View file

@ -1,4 +1,4 @@
@import "variables.i386";
@import "variables.i386-dark";
@import "../../../../node_modules/bootstrap/scss/bootstrap";
.btn-outline-secondary {

File diff suppressed because it is too large Load diff

View file

@ -14,7 +14,7 @@ const themes: ReadonlyArray<string> = [
"litely-compact",
"vaporwave-dark",
"vaporwave-light",
"i386",
"i386-dark",
];
export async function buildThemeList(): Promise<ReadonlyArray<string>> {

View file

@ -9,15 +9,7 @@ export default function dataBsTheme(siteResOrTheme?: GetSiteResponse | string) {
siteResOrTheme?.site_view.local_site.default_theme ??
"browser");
return (isDark() && theme === "browser") ||
[
"darkly",
"darkly-red",
"darkly-pureblack",
"darkly-compact",
"i386",
"vaporwave-dark",
].includes(theme)
return (isDark() && theme === "browser") || theme.includes("dark")
? "dark"
: "light";
}