Always show an info block image placeholder
This commit is contained in:
parent
71d403bc36
commit
b9be987470
|
@ -181,10 +181,10 @@ var SelectOrg = React.createClass({
|
||||||
|
|
||||||
var InfoBlock = React.createClass({
|
var InfoBlock = React.createClass({
|
||||||
render: function() {
|
render: function() {
|
||||||
var img = <div className="img" style={{backgroundImage: "url("+ this.props.image +")"}} />;
|
|
||||||
return (
|
return (
|
||||||
<div className="info-block">
|
<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>
|
<h1>{this.props.title}</h1>
|
||||||
<p>{this.props.text}</p>
|
<p>{this.props.text}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -85,6 +85,9 @@ section {
|
||||||
margin-right: 20px;
|
margin-right: 20px;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
}
|
}
|
||||||
|
.info-block .img.empty {
|
||||||
|
background-color: #ddd;
|
||||||
|
}
|
||||||
|
|
||||||
.info-block h1 {
|
.info-block h1 {
|
||||||
font-size: 32px;
|
font-size: 32px;
|
||||||
|
|
Loading…
Reference in New Issue