Add dynamic white height at marketing
This commit is contained in:
parent
0adabb78e9
commit
7474063918
2 changed files with 110 additions and 85 deletions
|
@ -18,6 +18,7 @@ class MarketingHeader extends React.Component {
|
||||||
this.state = {
|
this.state = {
|
||||||
collapse: false
|
collapse: false
|
||||||
};
|
};
|
||||||
|
|
||||||
this.onClick = this.onClick.bind(this);
|
this.onClick = this.onClick.bind(this);
|
||||||
this.handleNavbarClick = this.handleNavbarClick.bind(this);
|
this.handleNavbarClick = this.handleNavbarClick.bind(this);
|
||||||
}
|
}
|
||||||
|
@ -36,6 +37,7 @@ class MarketingHeader extends React.Component {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
|
<div>
|
||||||
<Navbar
|
<Navbar
|
||||||
dark
|
dark
|
||||||
expand="md"
|
expand="md"
|
||||||
|
@ -61,6 +63,7 @@ class MarketingHeader extends React.Component {
|
||||||
</Collapse>
|
</Collapse>
|
||||||
</Container>
|
</Container>
|
||||||
</Navbar>
|
</Navbar>
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,8 +19,24 @@ class MarketingPage extends React.Component {
|
||||||
this.onClick4 = this.onClick4.bind(this);
|
this.onClick4 = this.onClick4.bind(this);
|
||||||
this.state = {
|
this.state = {
|
||||||
collapse: false,
|
collapse: false,
|
||||||
accordion: false
|
accordion: false,
|
||||||
|
width: 0,
|
||||||
|
height: 0
|
||||||
};
|
};
|
||||||
|
this.updateWindowDimensions = this.updateWindowDimensions.bind(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
componentDidMount() {
|
||||||
|
this.updateWindowDimensions();
|
||||||
|
window.addEventListener('resize', this.updateWindowDimensions);
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillUnmount() {
|
||||||
|
window.removeEventListener('resize', this.updateWindowDimensions);
|
||||||
|
}
|
||||||
|
|
||||||
|
updateWindowDimensions() {
|
||||||
|
this.setState({ width: window.innerWidth, height: window.innerHeight });
|
||||||
}
|
}
|
||||||
|
|
||||||
toggle() {
|
toggle() {
|
||||||
|
@ -84,6 +100,9 @@ class MarketingPage extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
console.log(this.state.height);
|
||||||
|
const whiteSpaceheight = (this.state.height > 602) ? this.state.height - 602: 0;
|
||||||
|
console.log(whiteSpaceheight);
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<AppHeader />
|
<AppHeader />
|
||||||
|
@ -169,6 +188,9 @@ class MarketingPage extends React.Component {
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
{/* Add dynamic white spaces */}
|
||||||
|
<div className="dynamic-white-space" style={{height: whiteSpaceheight}}>
|
||||||
|
</div>
|
||||||
<Footer />
|
<Footer />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue