0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 22:52:40 +00:00
Commit Graph

7 Commits

Author SHA1 Message Date
David Bolack
d2afa7adea Move fetchThemeBundle into /shared/helpers
This might not be the best rework - I was unsure if the *this* that would be available when called would see the appropriate object so I assumed not and pass it as a parameter.
Works, but may be bad form.
2024-07-23 22:17:52 -05:00
David Bolack
ade819c70c A not so light rework.
This removes the existing endpoints and replaces them with /theme.

/theme/:id - return a theme bundle containing all styling from this USER theme and any parents.
/theme/:engine/:id - return a theme bundle containing all styling from this STATIC theme and any parents

The theme bundle returns a marshalled JSON object containing:
  styles - an array of strings representing the collected styles in loading order
  snippets - an array ( currently empty ) of collected snippets.

The various bits of theme rendering code for <style> an style <link> have been swapped out with an 'onDidMount' call that loads the thendpoint and appends a series of <style> blocks to the brewRender's head.

This loses some caching advantages, but probably won't matter in the long run.
2024-07-13 12:12:05 -05:00
Trevor Buckner
8a55658bd7 Rename printPage function to printCurrentBrew()
Avoid confusion with other "page" components.
2024-05-28 16:11:18 -04:00
Trevor Buckner
01d60c4520 lint 2024-05-28 13:22:33 -04:00
Trevor Buckner
ac3168e365 Move "printPage()" to helpers.js for reuse in multiple pages 2024-05-24 19:28:02 -04:00
Trevor Buckner
e62e185214 Lint a bunch of things 2024-05-21 17:32:17 -04:00
Víctor Losada Hernández
f93af38fa6 split-style-and-metadata moved to helpers.js 2024-03-06 18:09:26 +01:00