mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-26 06:11:15 +00:00
parent
87c30705ef
commit
31715ca75c
13 changed files with 8 additions and 257 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -71,29 +71,18 @@ server.get("/css/themes/:name", async (req, res) => {
|
||||||
res.sendFile(customTheme);
|
res.sendFile(customTheme);
|
||||||
} else {
|
} else {
|
||||||
const internalTheme = path.resolve(`./dist/assets/css/themes/${theme}`);
|
const internalTheme = path.resolve(`./dist/assets/css/themes/${theme}`);
|
||||||
res.sendFile(internalTheme);
|
|
||||||
|
// If the theme doesn't exist, just send litely
|
||||||
|
if (fs.existsSync(internalTheme)) {
|
||||||
|
res.sendFile(internalTheme);
|
||||||
|
} else {
|
||||||
|
res.sendFile(path.resolve("./dist/assets/css/themes/litely.css"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
function buildThemeList(): string[] {
|
function buildThemeList(): string[] {
|
||||||
let themes = [
|
let themes = ["darkly", "darkly-red", "litely", "litely-red"];
|
||||||
"litera",
|
|
||||||
"materia",
|
|
||||||
"minty",
|
|
||||||
"solar",
|
|
||||||
"united",
|
|
||||||
"cyborg",
|
|
||||||
"darkly",
|
|
||||||
"darkly-red",
|
|
||||||
"journal",
|
|
||||||
"sketchy",
|
|
||||||
"vaporwave",
|
|
||||||
"vaporwave-dark",
|
|
||||||
"i386",
|
|
||||||
"litely",
|
|
||||||
"litely-red",
|
|
||||||
"nord",
|
|
||||||
];
|
|
||||||
if (fs.existsSync(extraThemesFolder)) {
|
if (fs.existsSync(extraThemesFolder)) {
|
||||||
let dirThemes = fs.readdirSync(extraThemesFolder);
|
let dirThemes = fs.readdirSync(extraThemesFolder);
|
||||||
let cssThemes = dirThemes
|
let cssThemes = dirThemes
|
||||||
|
|
Loading…
Reference in a new issue