forked from devsonket/devsonket.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHeader.js
More file actions
79 lines (74 loc) · 2.07 KB
/
Header.js
File metadata and controls
79 lines (74 loc) · 2.07 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
import React from "react"
import styled from "@emotion/styled"
import { FiPlus, FiEdit, FiStar } from "react-icons/fi"
import { Logo } from "./common"
const MenuList = styled.ul`
display: flex;
align-items: center;
list-style: none;
li {
margin-left: 15px;
font-weight: bolder;
a {
display: flex;
align-items: center;
text-decoration: none;
color: ${props =>
props.islightcolor === "true"
? "var(--accentlight)"
: "var(--accentdark)"};
svg {
margin-right: 5px;
}
@media (max-width: 480px) {
span {
display: none;
}
}
}
}
`
const HeaderContainer = styled.div`
display: flex;
align-items: center;
justify-content: space-between;
padding: 25px 0;
`
const Header = ({ children, colorpref, filename, islightcolor }) => (
<HeaderContainer>
<div>
<Logo colorpref={colorpref} islightcolor={islightcolor} />
</div>
<MenuList islightcolor={islightcolor}>
<li>
{filename ? (
<a
target="__blank"
rel="noopener noreferrer"
href={`https://github.com/devsonket/devsonket.github.io/blob/develop/data/${filename}.json`}
>
<FiEdit /> <span>এডিট করুন</span>
</a>
) : (
<a
target="__blank"
rel="noopener noreferrer"
href="https://github.com/devsonket/devsonket.github.io#%E0%A6%95%E0%A6%BF%E0%A6%AD%E0%A6%BE%E0%A6%AC%E0%A7%87-%E0%A6%95%E0%A6%A8%E0%A7%8D%E0%A6%9F%E0%A7%8D%E0%A6%B0%E0%A6%BF%E0%A6%AC%E0%A6%BF%E0%A6%89%E0%A6%9F-%E0%A6%95%E0%A6%B0%E0%A6%AC%E0%A7%87%E0%A6%A8"
>
<FiPlus /> <span>কন্ট্রিবিউট করুন</span>
</a>
)}
</li>
<li>
<a
target="__blank"
rel="noopener noreferrer"
href="https://github.com/devsonket/devsonket.github.io"
>
<FiStar /> <span>স্টার দিন</span>
</a>
</li>
</MenuList>
</HeaderContainer>
)
export default Header