|
1
|
import React, { Component } from 'react'; |
|
2
|
import { FormattedMessage } from 'react-intl'; |
|
3
|
import { Link } from 'react-router-dom'; |
|
4
|
|
|
5
|
type HeaderProps = { |
|
6
|
onChangeLanguage: (language: string) => void |
|
7
|
} |
|
8
|
|
|
9
|
type HeaderState = { |
|
10
|
expand: boolean |
|
11
|
} |
|
12
|
|
|
13
|
class Header extends Component<HeaderProps, HeaderState> { |
|
14
|
|
|
15
|
constructor(props: HeaderProps | Readonly<HeaderProps>) { |
|
16
|
super(props); |
|
17
|
this.state = { expand: false }; |
|
18
|
} |
|
19
|
|
|
20
|
toggleExpand() { |
|
21
|
this.setState({ expand: !this.state.expand }) |
|
22
|
} |
|
23
|
|
|
24
|
render() { |
|
25
|
return ( |
|
26
|
<header> |
|
27
|
<div className={`collapse bg-dark ${this.state.expand ? 'show' : ''}`} id="navbarHeader"> |
|
28
|
<div className="container"> |
|
29
|
<div className="row"> |
|
30
|
<div className="col-sm-6 col-md-6 py-4"> |
|
31
|
<h4 className="text-white"> |
|
32
|
<FormattedMessage id="about.title" |
|
33
|
defaultMessage="About" |
|
34
|
description="About page title" /></h4> |
|
35
|
<p className="text-muted">We buy things we don't need, with money we don't have, to impress people we don't like.</p> |
|
36
|
</div> |
|
37
|
<div className="col-sm-2 offset-md-1 py-4"> |
|
38
|
<h4 className="text-white">Fun projects</h4> |
|
39
|
<ul className="list-unstyled"> |
|
40
|
<li><a className="text-white" href="https://musik88.com/" title="Musik88" target="_blank" rel="noopener noreferrer">Musik88</a></li> |
|
41
|
<li><a className="text-white" href="https://splitfire.ai/" title="SplitFire AI" target="_blank" rel="noopener noreferrer">SplitFire AI</a></li> |
|
42
|
</ul> |
|
43
|
</div> |
|
44
|
<div className="col-sm-2 py-4"> |
|
45
|
<h4 className="text-white">Contact</h4> |
|
46
|
<ul className="list-unstyled"> |
|
47
|
<li><a className="text-white" href="https://stackoverflow.com/users/1137814/seto" title="StackOverflow" target="_blank" rel="noopener noreferrer">StackOverflow</a></li> |
|
48
|
<li><a className="text-white" href="https://github.com/setoelkahfi" title="GitHub" target="_blank" rel="noopener noreferrer">GitHub</a></li> |
|
49
|
<li><a className="text-white" href="https://medium.com/@setoelkahfi" title="Medium" target="_blank" rel="noopener noreferrer">Medium</a></li> |
|
50
|
<li><a className="text-white" href="https://id.linkedin.com/in/setoelkahfi" title="LinkedIn" target="_blank" rel="noopener noreferrer">LinkedIn</a></li> |
|
51
|
</ul> |
|
52
|
</div> |
|
53
|
</div> |
|
54
|
</div> |
|
55
|
</div> |
|
56
|
<div className="navbar navbar-dark bg-dark shadow-sm"> |
|
57
|
<div className="container"> |
|
58
|
<Link to='/' className="navbar-brand d-flex align-items-center"> |
|
59
|
<strong>@seto</strong> |
|
60
|
</Link> |
|
61
|
<button className="navbar-toggler" onClick={this.toggleExpand.bind(this)} type="button" data-bs-toggle="collapse" data-bs-target="#navbarHeader" aria-controls="navbarHeader" aria-expanded={this.state.expand} aria-label="Toggle navigation"> |
|
62
|
<span className="navbar-toggler-icon"></span> |
|
63
|
</button> |
|
64
|
</div> |
|
65
|
</div> |
|
66
|
</header> |
|
67
|
) |
|
68
|
} |
|
69
|
} |
|
70
|
|
|
71
|
export default Header; |