mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2025-12-26 13:52:38 +00:00
Initial functionality pass
This commit is contained in:
@@ -188,6 +188,12 @@ const BrewRenderer = (props)=>{
|
||||
}));
|
||||
};
|
||||
|
||||
const styleObject = { height: state.height };
|
||||
|
||||
if(global.config.deployment) {
|
||||
styleObject.backgroundImage = `url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' version='1.1' height='40px' width='200px'><text x='0' y='15' fill='white' font-size='20'>${global.config.deployment}</text></svg>")`
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
{/*render dummy page while iFrame is mounting.*/}
|
||||
@@ -213,11 +219,11 @@ const BrewRenderer = (props)=>{
|
||||
contentDidMount={frameDidMount}
|
||||
onClick={()=>{emitClick();}}
|
||||
>
|
||||
<div className={'brewRenderer'}
|
||||
<div className={`brewRenderer ${global.config.deployment && 'deployment'}`}
|
||||
onScroll={getCurrentPage}
|
||||
onKeyDown={handleControlKeys}
|
||||
tabIndex={-1}
|
||||
style={{ height: state.height }}>
|
||||
style={ styleObject }>
|
||||
|
||||
{/* Apply CSS from Style tab and render pages from Markdown tab */}
|
||||
{state.isMounted
|
||||
|
||||
@@ -4,6 +4,9 @@
|
||||
overflow-y : scroll;
|
||||
will-change : transform;
|
||||
padding-top : 30px;
|
||||
&.deployment {
|
||||
background-color: darkred;
|
||||
}
|
||||
:where(.pages) {
|
||||
margin : 30px 0px;
|
||||
& > :where(.page) {
|
||||
|
||||
@@ -448,7 +448,8 @@ const renderPage = async (req, res)=>{
|
||||
const configuration = {
|
||||
local : isLocalEnvironment,
|
||||
publicUrl : config.get('publicUrl') ?? '',
|
||||
environment : nodeEnv
|
||||
environment : nodeEnv,
|
||||
deployment : config.get('heroku_app_name') ?? ''
|
||||
};
|
||||
const props = {
|
||||
version : require('./../package.json').version,
|
||||
|
||||
Reference in New Issue
Block a user