mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-04 12:32:39 +00:00
Moving phb styling to be stand alone, removed all unneeded assets
This commit is contained in:
28
client/homebrew/pageContainer/pageContainer.jsx
Normal file
28
client/homebrew/pageContainer/pageContainer.jsx
Normal file
@@ -0,0 +1,28 @@
|
||||
var React = require('react');
|
||||
var _ = require('lodash');
|
||||
var cx = require('classnames');
|
||||
|
||||
var Markdown = require('marked');
|
||||
|
||||
var PageContainer = React.createClass({
|
||||
getDefaultProps: function() {
|
||||
return {
|
||||
text : ""
|
||||
};
|
||||
},
|
||||
|
||||
renderPages : function(){
|
||||
return _.map(this.props.text.split('\\page'), (pageText, index) => {
|
||||
return <div className='phb' dangerouslySetInnerHTML={{__html:Markdown(pageText)}} key={index} />
|
||||
})
|
||||
},
|
||||
|
||||
render : function(){
|
||||
var self = this;
|
||||
return <div className="pageContainer">
|
||||
{this.renderPages()}
|
||||
</div>;
|
||||
}
|
||||
});
|
||||
|
||||
module.exports = PageContainer;
|
||||
12
client/homebrew/pageContainer/pageContainer.less
Normal file
12
client/homebrew/pageContainer/pageContainer.less
Normal file
@@ -0,0 +1,12 @@
|
||||
@import (less) './client/homebrew/phb/phb.style.less';
|
||||
|
||||
.pageContainer{
|
||||
padding : 30px 0px;
|
||||
background-color : @steel;
|
||||
&>.phb{
|
||||
margin-right : auto;
|
||||
margin-bottom : 30px;
|
||||
margin-left : auto;
|
||||
box-shadow : 1px 4px 14px #000;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user