Skip to content

Commit

Permalink
About me component fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
sureshmurali committed Nov 17, 2018
1 parent 2893162 commit 29d1276
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/Components/HeroSlide/AboutMe.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const AboutMeTitle = styled.div.attrs({
font-size: 200px;
position: absolute;
color: #EEE;
top:25%;
top:5%;
left:-15%;
`;

Expand All @@ -30,25 +30,20 @@ const AboutMeDescription = styled.div`
text-align: left;
margin-left: 30%;
margin-right: 5%;
z-index: 1;
transform: translateY(130%);
transform: translateY(90%);
`;

class AboutMe extends Component {
constructor(props) {
super(props);
this.state = {
screenHeight: 0,
scrollHeight: 0,
scrollPercent: 0,
};
this.handleScroll = this.handleScroll.bind(this);
}

componentDidMount() {
window.addEventListener('scroll', this.handleScroll);
this.setState({ scrollHeight: Math.round(window.document.documentElement.scrollHeight) });
this.setState({ screenHeight: Math.round(window.document.documentElement.clientHeight) });
}

componentWillUnmount() {
Expand Down

0 comments on commit 29d1276

Please sign in to comment.