0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-13 06:32:39 +00:00

Getting both renderers to play nice

This commit is contained in:
Scott Tolksdorf
2017-02-12 23:35:19 -05:00
parent b40e5bc4c4
commit 304cd0ffcd
22 changed files with 136 additions and 82 deletions

View File

@@ -53,7 +53,13 @@ const Homebrew = React.createClass({
return <PrintPage query={query}/>;
},
'/new' : <NewPage />,
'/changelog' : <SharePage />,
'/test' : <SharePage />,
'/test_old' : <SharePage />,
'*' : <HomePage />,
});
},

View File

@@ -18,19 +18,6 @@ const Store = require('homebrewery/brew.store.js');
const Headtags = require('vitreum/headtags');
const SharePage = React.createClass({
getDefaultProps: function() {
return {
brew : {
title : '',
text : '',
shareId : null,
createdAt : null,
updatedAt : null,
views : 0
}
};
},
componentDidMount: function() {
document.addEventListener('keydown', this.handleControlKeys);
},
@@ -78,7 +65,7 @@ const SharePage = React.createClass({
</Nav.section>
</Navbar>
<div className='content'>
<BrewRenderer brewText={brew.text} />
<BrewRenderer brew={brew} />
</div>
</div>
}

View File

@@ -10,12 +10,11 @@
@horizontalRule : #9c2b1b;
@headerText : #58180D;
@monsterStatBackground : #FDF1DC;
@page { margin: 0; }
body {
counter-reset : phb-page-numbers;
}
*{
-webkit-print-color-adjust : exact;
counter-reset : old-phb-page-numbers;
}
.useSansSerif(){
font-family : ScalySans;
@@ -42,8 +41,11 @@ body {
-moz-column-gap : 1cm;
}
.phb{
& *{
-webkit-print-color-adjust : exact;
}
.useColumns();
counter-increment : phb-page-numbers;
counter-increment : old-phb-page-numbers;
position : relative;
z-index : 15;
box-sizing : border-box;
@@ -299,7 +301,7 @@ body {
color : #c9ad6a;
text-align : center;
&.auto::after {
content : counter(phb-page-numbers);
content : counter(old-phb-page-numbers);
}
}
.footnote{