0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-05 21:02:43 +00:00

Themes are now compiled into separate css files and can be hot-swapped in the renderer as needed

This commit is contained in:
Trevor Buckner
2021-07-12 19:37:10 -04:00
parent 428ec8412f
commit 4f2ddfa020
42 changed files with 73 additions and 56 deletions

View File

@@ -176,7 +176,10 @@ const BrewRenderer = createClass({
</div>
: null}
<Frame initialContent={this.state.initialContent} style={{ width: '100%', height: '100%', visibility: this.state.visibility }} contentDidMount={this.frameDidMount}>
<Frame initialContent={this.state.initialContent}
head = <link href={`${this.props.renderer == 'legacy' ? '/themes/5ePhbLegacy.style.css' : '/themes/5ePhb.style.css'}`} rel='stylesheet'/>
style={{ width: '100%', height: '100%', visibility: this.state.visibility }}
contentDidMount={this.frameDidMount}>
<div className={'brewRenderer'}
onScroll={this.handleScroll}
style={{ height: this.state.height }}>
@@ -189,6 +192,7 @@ const BrewRenderer = createClass({
<div className='pages' ref='pages'>
{/* Apply CSS from Style tab */}
<div style={{ display: 'none' }} dangerouslySetInnerHTML={{ __html: `<style> ${this.props.style} </style>` }} />
{/* Render pages from Markdown tab */}