0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 16:22:44 +00:00

Merge pull request #1597 from naturalcrit/WrapperColsDiv

Add wrapper to .page to improve `wide` behavior with columns
This commit is contained in:
Trevor Buckner
2021-08-23 23:04:47 -04:00
committed by GitHub
3 changed files with 20 additions and 5 deletions

View File

@@ -130,8 +130,14 @@ const BrewRenderer = createClass({
renderPage : function(pageText, index){
if(this.props.renderer == 'legacy')
return <div className='phb page' id={`p${index + 1}`} dangerouslySetInnerHTML={{ __html: MarkdownLegacy.render(pageText) }} key={index} />;
else
return <div className='phb3 page' id={`p${index + 1}`} dangerouslySetInnerHTML={{ __html: Markdown.render(pageText) }} key={index} />;
else {
pageText += `\n\\column\n&nbsp;`; //Artificial column break at page end to emulate column-fill:auto (until `wide` is used, when column-fill:balance will reappear)
return (
<div className='pageWrapper' id={`p${index + 1}`} key={index} >
<div className='page' dangerouslySetInnerHTML={{ __html: Markdown.render(pageText) }} />
</div>
);
}
},
renderPages : function(){

View File

@@ -11,6 +11,12 @@
margin-left : auto;
box-shadow : 1px 4px 14px #000;
}
&>.pageWrapper{
margin-right : auto;
margin-bottom : 30px;
margin-left : auto;
box-shadow : 1px 4px 14px #000;
}
}
}
.pane{

View File

@@ -46,8 +46,7 @@ body {
-webkit-column-gap : 0.9cm;
-moz-column-gap : 0.9cm;
}
.page{
.useColumns();
.pageWrapper{
counter-increment : phb-page-numbers;
position : relative;
z-index : 15;
@@ -55,9 +54,13 @@ body {
overflow : hidden;
height : 279.4mm;
width : 215.9mm;
padding : 1.4cm 1.9cm 1.7cm;
background-color : @background;
background-image : @backgroundImage;
}
.page{
.useColumns();
max-height : 100%;
padding : 1.4cm 1.9cm 1.7cm;
font-family : BookInsanityRemake;
font-size : 0.34cm;
text-rendering : optimizeLegibility;