sdy

add header style

...@@ -3,22 +3,42 @@ import styled from "styled-components"; ...@@ -3,22 +3,42 @@ import styled from "styled-components";
3 import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; 3 import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
4 import { faComments } from "@fortawesome/free-solid-svg-icons"; 4 import { faComments } from "@fortawesome/free-solid-svg-icons";
5 5
6 +const Header = styled.header`
7 + display: block;
8 +`;
9 +
10 +const Nav = styled.nav`
11 + height: 70px;
12 + width: 100%;
13 + position: fixed;
14 + box-shadow: 0 1px 1px rgba(0, 0, 0, 0.15);
15 +`;
16 +
6 const HeaderBox = styled.div` 17 const HeaderBox = styled.div`
18 + height: 100%;
19 + width: 100%;
7 display: flex; 20 display: flex;
8 - justify-content: space-between; 21 + justify-content: space-around;
9 align-items: center; 22 align-items: center;
23 + margin: 0 auto;
10 `; 24 `;
11 25
12 const HeaderTitleBox = styled.div` 26 const HeaderTitleBox = styled.div`
13 display: flex; 27 display: flex;
28 + height: 100%;
29 + align-items: center;
30 + svg {
31 + font-size: 1.5rem;
32 + }
14 `; 33 `;
15 34
16 const HeaderTitle = styled.span` 35 const HeaderTitle = styled.span`
17 - font-size: 15px; 36 + font-size: 1.5rem;
18 `; 37 `;
19 38
20 -const HeaderMenuBox = styled.div` 39 +const HeaderMenuNav = styled.nav`
21 display: flex; 40 display: flex;
41 + justify-content: flex-start;
22 `; 42 `;
23 43
24 const HeaderMenuList = styled.ul` 44 const HeaderMenuList = styled.ul`
...@@ -26,7 +46,9 @@ const HeaderMenuList = styled.ul` ...@@ -26,7 +46,9 @@ const HeaderMenuList = styled.ul`
26 `; 46 `;
27 47
28 const HeaderMenuItem = styled.li` 48 const HeaderMenuItem = styled.li`
29 - content: ${(props) => props.text}; 49 + &::before {
50 + content: ${(props) => props.text};
51 + }
30 `; 52 `;
31 53
32 const StartBox = styled.div` 54 const StartBox = styled.div`
...@@ -37,19 +59,21 @@ const StartBox = styled.div` ...@@ -37,19 +59,21 @@ const StartBox = styled.div`
37 59
38 export default () => { 60 export default () => {
39 return ( 61 return (
40 - <HeaderBox> 62 + <Header>
41 - <HeaderTitleBox> 63 + <Nav>
42 - <FontAwesomeIcon> 64 + <HeaderBox>
43 - <faComments /> 65 + <HeaderTitleBox>
44 - </FontAwesomeIcon> 66 + <FontAwesomeIcon icon={faComments} />
45 - <HeaderTitle>KhuChat</HeaderTitle> 67 + <HeaderTitle>KhuChat</HeaderTitle>
46 - </HeaderTitleBox> 68 + </HeaderTitleBox>
47 - <HeaderMenuBox> 69 + <HeaderMenuNav>
48 - <HeaderMenuList> 70 + <HeaderMenuList>
49 - <HeaderMenuItem text={"About This"} /> 71 + <HeaderMenuItem>About This</HeaderMenuItem>
50 - </HeaderMenuList> 72 + </HeaderMenuList>
51 - </HeaderMenuBox> 73 + <StartBox>Start</StartBox>
52 - <StartBox>Start</StartBox> 74 + </HeaderMenuNav>
53 - </HeaderBox> 75 + </HeaderBox>
76 + </Nav>
77 + </Header>
54 ); 78 );
55 }; 79 };
......