mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2025-12-28 09:12:45 +00:00
Support snippet compilation
Original handling of snippets only worked if the current selected theme was a staticTheme. This now fully merges all snippets through the theme chain no matter what the top-level theme is. So user themes built on 5ePHB can benefit from 5ePHB snippets too. User input of user snippets will be a later PR, but merging them into static snippets is now supported.
This commit is contained in:
@@ -285,8 +285,9 @@ const api = {
|
||||
}
|
||||
//=== Static Themes ===//
|
||||
else {
|
||||
// NOTE: This currently makes NO attempt to do anything with Static theme Snippets. Loading of static snippets remains unchanged.
|
||||
const localStyle = `@import url(\"/themes/${req.params.renderer}/${req.params.id}/style.css\");`;
|
||||
const localSnippets = `${req.params.renderer}_${req.params.id}`; // Just log the name for loading on client
|
||||
const localStyle = `@import url(\"/themes/${req.params.renderer}/${req.params.id}/style.css\");`;
|
||||
completeSnippets.push(localSnippets);
|
||||
completeStyles.push(`/* From Theme ${req.params.id} */\n\n${localStyle}`);
|
||||
|
||||
req.params.id = Themes[req.params.renderer][req.params.id].baseTheme;
|
||||
|
||||
Reference in New Issue
Block a user