forked from ivacf/ivanc
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHeader.js
More file actions
executable file
·41 lines (36 loc) · 1.35 KB
/
Copy pathHeader.js
File metadata and controls
executable file
·41 lines (36 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
var React = require('react');
var SocialBar = require('./SocialBar.js');
var Header = React.createClass({
//TODO this should probably come from the API as well
getProfile: function() {
return {
name: 'Iván Carballo',
avatar: 'http://ivanc.uk/images/ivan-circle.png',
summary: 'I’m a software engineer passionate about creating meaningful products by writing elegant code. I currently work at Monzo building a new type of bank. You can check out some of my work below.',
social: [
{id: 1, name: 'GitHub', url: 'https://github.com/ivacf', icon:'images/github.svg'},
{id: 4, name: 'Medium', url: 'https://medium.com/@ivanc', icon:'images/medium.svg'},
{id: 2, name: 'Twitter', url: 'https://twitter.com/ivacf', icon:'images/twitter.svg'},
{id: 3, name: 'LinkedIn', url: 'https://uk.linkedin.com/in/ivacf', icon:'images/linkedin.svg'}
]
};
},
render: function() {
var profile = this.getProfile();
return (
<div className="header">
<img src={profile.avatar} alt="Ivan's avatar" className="avatar"/>
<h1>
{profile.name}
</h1>
<p className="summary">
{profile.summary}
</p>
<div className="socialBarContainer">
<SocialBar data={profile.social} />
</div>
</div>
);
}
});
module.exports=Header