mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-15 17:02:38 +00:00
Handle some statics
This commit is contained in:
@@ -277,7 +277,7 @@ const api = {
|
|||||||
getBrewThemeWithCSS : async (req, res)=>{
|
getBrewThemeWithCSS : async (req, res)=>{
|
||||||
const brew = req.brew;
|
const brew = req.brew;
|
||||||
splitTextStyleAndMetadata(brew);
|
splitTextStyleAndMetadata(brew);
|
||||||
res.set('Content-Type', 'text/css');
|
res.setHeader('Content-Type', 'text/css');
|
||||||
const staticTheme = `/css/${req.brew.renderer}/${req.brew.theme}`;
|
const staticTheme = `/css/${req.brew.renderer}/${req.brew.theme}`;
|
||||||
const userTheme = `/css/${req.brew.theme.slice(1)}`;
|
const userTheme = `/css/${req.brew.theme.slice(1)}`;
|
||||||
const parentThemeImport = `@import url(\"${req.brew.theme[0] != '#' ? staticTheme : userTheme}\");\n\n/* From Brew: ${req.brew.title}*/\n\n`;
|
const parentThemeImport = `@import url(\"${req.brew.theme[0] != '#' ? staticTheme : userTheme}\");\n\n/* From Brew: ${req.brew.title}*/\n\n`;
|
||||||
|
|||||||
Reference in New Issue
Block a user