mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-05 12:22:44 +00:00
Test code to reduce duplicate theme loading
This shorts out loading of 5ePHB and/or blank from getBrewThemeParent
This commit is contained in:
@@ -290,6 +290,8 @@ const api = {
|
|||||||
getBrewThemeParent : async (req, res)=>{
|
getBrewThemeParent : async (req, res)=>{
|
||||||
const brew = req.brew;
|
const brew = req.brew;
|
||||||
splitTextStyleAndMetadata(brew);
|
splitTextStyleAndMetadata(brew);
|
||||||
|
// Test Hard Ignoring 5ePHB and 5eBlank due to being used for editor theming.
|
||||||
|
if((req.brew.theme == '5ePHB') ||(req.brew.theme == 'Blank')) return res.status(200).send('');
|
||||||
res.setHeader('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)}`;
|
||||||
|
|||||||
Reference in New Issue
Block a user