Finally working - separated fixed and flexi height parallaxing to pull it off
This commit is contained in:
@ -56,8 +56,10 @@ export default class Parallax extends React.Component{
|
||||
if (this.state.loaded){
|
||||
class_name += " parallax--loaded";
|
||||
}
|
||||
if (this.props.boxed){
|
||||
class_name += " parallax--boxed";
|
||||
if (this.props.fixedHeight){
|
||||
class_name += " parallax--fixed-height";
|
||||
} else {
|
||||
class_name += " parallax--flexible-height";
|
||||
}
|
||||
|
||||
var style = {};
|
||||
@ -67,8 +69,10 @@ export default class Parallax extends React.Component{
|
||||
|
||||
return (
|
||||
<div className={class_name}>
|
||||
<div className="parallax__image" style={style}></div>
|
||||
<div className="parallax__overlay"></div>
|
||||
<div className="parallax__layer">
|
||||
<div className="parallax__image" style={style}></div>
|
||||
<div className="parallax__overlay"></div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@ -307,7 +307,7 @@ class Artist extends React.Component{
|
||||
<div className="view artist-view preserve-3d">
|
||||
<div className="intro preserve-3d">
|
||||
|
||||
<Parallax image={image} boxed />
|
||||
<Parallax image={image} fixedHeight />
|
||||
|
||||
<div className="liner">
|
||||
<h1>{this.props.artist ? this.props.artist.name : null}</h1>
|
||||
|
||||
Reference in New Issue
Block a user