mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-09 02:52:38 +00:00
Merge pull request #1410 from G-Ambatte/fixStyleInPrintFromNew
Style data not applied at Print from New Page
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
@import 'naturalcrit/styles/core.less';
|
@import 'naturalcrit/styles/core.less';
|
||||||
.homebrew{
|
.homebrew{
|
||||||
height : 100%;
|
height : 100%;
|
||||||
.page{
|
.sitePage{
|
||||||
display : flex;
|
display : flex;
|
||||||
height : 100%;
|
height : 100%;
|
||||||
background-color : @steel;
|
background-color : @steel;
|
||||||
|
|||||||
@@ -406,7 +406,7 @@ const EditPage = createClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
render : function(){
|
render : function(){
|
||||||
return <div className='editPage page'>
|
return <div className='editPage sitePage'>
|
||||||
<Meta name='robots' content='noindex, nofollow' />
|
<Meta name='robots' content='noindex, nofollow' />
|
||||||
{this.renderNavbar()}
|
{this.renderNavbar()}
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ const ErrorPage = createClass({
|
|||||||
text : '# Oops \n We could not find a brew with that id. **Sorry!**',
|
text : '# Oops \n We could not find a brew with that id. **Sorry!**',
|
||||||
|
|
||||||
render : function(){
|
render : function(){
|
||||||
return <div className='errorPage page'>
|
return <div className='errorPage sitePage'>
|
||||||
<Navbar ver={this.props.ver}>
|
<Navbar ver={this.props.ver}>
|
||||||
<Nav.section>
|
<Nav.section>
|
||||||
<Nav.item className='errorTitle'>
|
<Nav.item className='errorTitle'>
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ const HomePage = createClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
render : function(){
|
render : function(){
|
||||||
return <div className='homePage page'>
|
return <div className='homePage sitePage'>
|
||||||
<Meta name='google-site-verification' content='NwnAQSSJZzAT7N-p5MY6ydQ7Njm67dtbu73ZSyE5Fy4' />
|
<Meta name='google-site-verification' content='NwnAQSSJZzAT7N-p5MY6ydQ7Njm67dtbu73ZSyE5Fy4' />
|
||||||
{this.renderNavbar()}
|
{this.renderNavbar()}
|
||||||
|
|
||||||
|
|||||||
@@ -191,7 +191,7 @@ const NewPage = createClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
print : function(){
|
print : function(){
|
||||||
localStorage.setItem('print', this.state.brew.text);
|
localStorage.setItem('print', `<style>\n${this.state.brew.style}\n</style>\n\n${this.state.brew.text}`);
|
||||||
window.open('/print?dialog=true&local=print', '_blank');
|
window.open('/print?dialog=true&local=print', '_blank');
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -219,7 +219,7 @@ const NewPage = createClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
render : function(){
|
render : function(){
|
||||||
return <div className='newPage page'>
|
return <div className='newPage sitePage'>
|
||||||
{this.renderNavbar()}
|
{this.renderNavbar()}
|
||||||
<div className='content'>
|
<div className='content'>
|
||||||
<SplitPane onDragFinish={this.handleSplitMove} ref='pane'>
|
<SplitPane onDragFinish={this.handleSplitMove} ref='pane'>
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ const PrintPage = createClass({
|
|||||||
if(this.props.brew.renderer == 'legacy') {
|
if(this.props.brew.renderer == 'legacy') {
|
||||||
return _.map(this.state.brewText.split('\\page'), (page, index)=>{
|
return _.map(this.state.brewText.split('\\page'), (page, index)=>{
|
||||||
return <div
|
return <div
|
||||||
className='phb'
|
className='phb page'
|
||||||
id={`p${index + 1}`}
|
id={`p${index + 1}`}
|
||||||
dangerouslySetInnerHTML={{ __html: MarkdownLegacy.render(page) }}
|
dangerouslySetInnerHTML={{ __html: MarkdownLegacy.render(page) }}
|
||||||
key={index} />;
|
key={index} />;
|
||||||
@@ -47,7 +47,7 @@ const PrintPage = createClass({
|
|||||||
} else {
|
} else {
|
||||||
return _.map(this.state.brewText.split(/^\\page/gm), (page, index)=>{
|
return _.map(this.state.brewText.split(/^\\page/gm), (page, index)=>{
|
||||||
return <div
|
return <div
|
||||||
className='phb3'
|
className='phb3 page'
|
||||||
id={`p${index + 1}`}
|
id={`p${index + 1}`}
|
||||||
dangerouslySetInnerHTML={{ __html: Markdown.render(page) }}
|
dangerouslySetInnerHTML={{ __html: Markdown.render(page) }}
|
||||||
key={index} />;
|
key={index} />;
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ const SharePage = createClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
render : function(){
|
render : function(){
|
||||||
return <div className='sharePage page'>
|
return <div className='sharePage sitePage'>
|
||||||
<Meta name='robots' content='noindex, nofollow' />
|
<Meta name='robots' content='noindex, nofollow' />
|
||||||
<Navbar>
|
<Navbar>
|
||||||
<Nav.section>
|
<Nav.section>
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ const UserPage = createClass({
|
|||||||
render : function(){
|
render : function(){
|
||||||
const brews = this.getSortedBrews();
|
const brews = this.getSortedBrews();
|
||||||
|
|
||||||
return <div className='userPage page'>
|
return <div className='userPage sitePage'>
|
||||||
<Navbar>
|
<Navbar>
|
||||||
<Nav.section>
|
<Nav.section>
|
||||||
<NewBrew />
|
<NewBrew />
|
||||||
|
|||||||
Reference in New Issue
Block a user