mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-01 01:59:56 +00:00
Set data-bs-theme based on the presence of "dark" in theme name (#2638)
This commit is contained in:
parent
e9ba38dedf
commit
e9c6e99165
6 changed files with 11901 additions and 50 deletions
11582
src/assets/css/themes/i386-dark.css
Normal file
11582
src/assets/css/themes/i386-dark.css
Normal file
File diff suppressed because it is too large
Load diff
|
@ -1,4 +1,4 @@
|
||||||
@import "variables.i386";
|
@import "variables.i386-dark";
|
||||||
@import "../../../../node_modules/bootstrap/scss/bootstrap";
|
@import "../../../../node_modules/bootstrap/scss/bootstrap";
|
||||||
|
|
||||||
.btn-outline-secondary {
|
.btn-outline-secondary {
|
File diff suppressed because it is too large
Load diff
|
@ -14,7 +14,7 @@ const themes: ReadonlyArray<string> = [
|
||||||
"litely-compact",
|
"litely-compact",
|
||||||
"vaporwave-dark",
|
"vaporwave-dark",
|
||||||
"vaporwave-light",
|
"vaporwave-light",
|
||||||
"i386",
|
"i386-dark",
|
||||||
];
|
];
|
||||||
|
|
||||||
export async function buildThemeList(): Promise<ReadonlyArray<string>> {
|
export async function buildThemeList(): Promise<ReadonlyArray<string>> {
|
||||||
|
|
|
@ -9,15 +9,7 @@ export default function dataBsTheme(siteResOrTheme?: GetSiteResponse | string) {
|
||||||
siteResOrTheme?.site_view.local_site.default_theme ??
|
siteResOrTheme?.site_view.local_site.default_theme ??
|
||||||
"browser");
|
"browser");
|
||||||
|
|
||||||
return (isDark() && theme === "browser") ||
|
return (isDark() && theme === "browser") || theme.includes("dark")
|
||||||
[
|
|
||||||
"darkly",
|
|
||||||
"darkly-red",
|
|
||||||
"darkly-pureblack",
|
|
||||||
"darkly-compact",
|
|
||||||
"i386",
|
|
||||||
"vaporwave-dark",
|
|
||||||
].includes(theme)
|
|
||||||
? "dark"
|
? "dark"
|
||||||
: "light";
|
: "light";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue