Skip to content

teste #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 29 additions & 30 deletions src/components/code-github/code-github.jsx
Original file line number Diff line number Diff line change
@@ -1,36 +1,35 @@
import React, {Component} from 'react';
import {
Card,
CardHeader,
CardActions,
CardText
} from 'material-ui/Card';
import FlatButton from 'material-ui/FlatButton';
import { Card, CardActions, CardHeader, CardText } from "material-ui/Card";
import FlatButton from "material-ui/FlatButton";
import React, { Component } from "react";

import './code-github.css';
import "./code-github.css";

class CodeGithubComponent extends Component {

render() {
return (
<div className="code-github">
<p className="headline">Look at my code, my code is amazing</p>
<Card>
<CardHeader
subtitle="Github Repository"
title="salomonelli/personal-portfolio"
avatar="github.png"
/>
<CardText>
This application is made with React and Material UI. Check out the code on Github.
</CardText>
<CardActions>
<FlatButton label="View on github" href="https://github.com/salomonelli/personal-portfolio" target="_blank"/>
</CardActions>
</Card>
</div>
);
}
render() {
return (
<div className="code-github">
<p className="headline">Look at my code, my code is amazing</p>
<Card>
<CardHeader
subtitle="Github Repository"
title="juanmeireles/personal-portfolio"
avatar="github.png"
/>
<CardText>
This application is made with React and Material UI. Check out the
code on Github.
</CardText>
<CardActions>
<FlatButton
label="View on github"
href="https://github.com/JuanMeireles/react-portifolio"
target="_blank"
/>
</CardActions>
</Card>
</div>
);
}
}

export default CodeGithubComponent;
105 changes: 53 additions & 52 deletions src/components/header/header.jsx
Original file line number Diff line number Diff line change
@@ -1,57 +1,58 @@
import React, {Component} from 'react';
import FloatingActionButton from 'material-ui/FloatingActionButton';
import ArrowIcon from 'material-ui/svg-icons/hardware/keyboard-arrow-down';
const scrollTo = require('scroll-to');
import './header.css';
import FloatingActionButton from "material-ui/FloatingActionButton";
import ArrowIcon from "material-ui/svg-icons/hardware/keyboard-arrow-down";
import React, { Component } from "react";
import "./header.css";
const scrollTo = require("scroll-to");

class HeaderComponent extends Component {
constructor(props) {
super(props);
this.state = {
height: props.height,
scrollTo: props.height
};
}

updateDimensions() {
this.setState({
height:window.innerHeight+'px',
scrollTo: window.innerHeight
});
}

async componentDidMount() {
window.addEventListener("resize", this.updateDimensions.bind(this));
this.updateDimensions();
}

componentWillUnmount() {
window.removeEventListener("resize", this.updateDimensions.bind(this));
}

onScrollToIntro() {
scrollTo(0, this.state.scrollTo, {
ease: 'out-bounce',
duration: 2000
});
}

render() {
return (
<div className="header-wrapper" style={{"height": this.state.height}}>
<div className="header">
<h3>Sara Steiert</h3>
<h6>Junior Technology Consultant</h6>
</div>
<div className="scroll-down-btn">
<FloatingActionButton mini={true} backgroundColor="#A80202" onClick={this.onScrollToIntro.bind(this)}>
<ArrowIcon />
</FloatingActionButton>
</div>

</div>
);
}
constructor(props) {
super(props);
this.state = {
height: props.height,
scrollTo: props.height,
};
}

updateDimensions() {
this.setState({
height: window.innerHeight + "px",
scrollTo: window.innerHeight,
});
}

async componentDidMount() {
window.addEventListener("resize", this.updateDimensions.bind(this));
this.updateDimensions();
}

componentWillUnmount() {
window.removeEventListener("resize", this.updateDimensions.bind(this));
}

onScrollToIntro() {
scrollTo(0, this.state.scrollTo, {
duration: 2000,
});
}

render() {
return (
<div className="header-wrapper" style={{ height: this.state.height }}>
<div className="header">
<h3>Juanzin</h3>
<h6>Junior Developer</h6>
</div>
<div className="scroll-down-btn">
<FloatingActionButton
backgroundColor="#A80202"
onClick={this.onScrollToIntro.bind(this)}
>
<ArrowIcon />
</FloatingActionButton>
</div>
</div>
);
}
}

export default HeaderComponent;