Massive improvement to animation out
This commit is contained in:
parent
9b8cedfe14
commit
ca5b31d946
2 changed files with 14 additions and 14 deletions
|
@ -5,23 +5,20 @@ var Col = ReactBootstrap.Col;
|
|||
|
||||
var projectImage = React.createClass({
|
||||
render: function () {
|
||||
var contents = this.props.isHovered ?
|
||||
(
|
||||
<div className="animated zoomIn">
|
||||
<h4>{this.props.data.title}</h4>
|
||||
<p>{this.props.data.text}</p>
|
||||
<a href={this.props.data.link} className="btn btn-default">
|
||||
Find out more
|
||||
</a>
|
||||
</div>
|
||||
) : null;
|
||||
var animationClass = this.props.isHovered ? 'zoomIn' : 'zoomOut';
|
||||
return (
|
||||
<Col sm={4}>
|
||||
<div className="wrapper" >
|
||||
<div className={"project " + this.props.data.className}
|
||||
onMouseOver={this.props.onHover}
|
||||
onMouseLeave={this.props.onLeave} >
|
||||
{ contents }
|
||||
<div className={"animated " + animationClass}>
|
||||
<h4>{this.props.data.title}</h4>
|
||||
<p>{this.props.data.text}</p>
|
||||
<a href={this.props.data.link} className="btn btn-default btn-small">
|
||||
Find out more
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Col>
|
||||
|
|
|
@ -120,13 +120,16 @@ ol , ul{
|
|||
}
|
||||
|
||||
& .project {
|
||||
padding: 18px;
|
||||
padding: 25px;
|
||||
.transition(~"opacity 0.5s ease-in");
|
||||
opacity: 0;
|
||||
background-color: rgba(0,0,0,0.6);
|
||||
|
||||
h2 {
|
||||
margin-top: 0;
|
||||
p, a.btn {
|
||||
font-size: 12px;
|
||||
}
|
||||
h4 {
|
||||
font-size: 23px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue