1
0
Fork 0

Always show an info block image placeholder

This commit is contained in:
Gregory Eremin 2015-03-14 22:53:12 +07:00
parent 71d403bc36
commit b9be987470
2 changed files with 5 additions and 2 deletions

View File

@ -181,10 +181,10 @@ var SelectOrg = React.createClass({
var InfoBlock = React.createClass({
render: function() {
var img = <div className="img" style={{backgroundImage: "url("+ this.props.image +")"}} />;
return (
<div className="info-block">
{ this.props.image ? img : null }
<div className={'img'+ (this.props.image ? '' : ' empty')}
style={{backgroundImage: "url("+ (this.props.image || '') +")"}} />
<h1>{this.props.title}</h1>
<p>{this.props.text}</p>
</div>

View File

@ -85,6 +85,9 @@ section {
margin-right: 20px;
border-radius: 3px;
}
.info-block .img.empty {
background-color: #ddd;
}
.info-block h1 {
font-size: 32px;