-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from developer-jyyun/develop
Feat: "Add header"
- Loading branch information
Showing
4 changed files
with
182 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import React from 'react'; | ||
import '../scss/components/_header.scss'; | ||
import { Link } from 'react-router-dom'; | ||
const Header = (): JSX.Element => { | ||
return ( | ||
<header className="header shadow"> | ||
<div className="header__logo"> | ||
<Link to="/"> | ||
<span> HIGH FIVE</span> | ||
{/* <img src="" alt="" />*/} | ||
</Link> | ||
</div> | ||
|
||
<div className="header__user"> | ||
<div className="header__user-img"></div> | ||
<span className="header__user-name">김땡땡</span> | ||
<button className="header__user-login-btn btn">로그인</button> | ||
</div> | ||
<nav className="header__drop-down shadow"> | ||
<ul> | ||
<li> | ||
<Link to="/">근태관리</Link> | ||
</li> | ||
<li> | ||
<Link to="/">마이페이지</Link> | ||
</li> | ||
<li>로그아웃</li> | ||
</ul> | ||
</nav> | ||
</header> | ||
); | ||
}; | ||
|
||
export default Header; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,132 @@ | ||
@use '../abstracts' as *; | ||
|
||
.header { | ||
padding: 1rem 4rem; | ||
height: 60px; | ||
background: $white; | ||
position: sticky; | ||
top: 0; | ||
z-index: 9; | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
width: 100%; | ||
box-sizing: border-box; | ||
margin-bottom: 1.5rem; | ||
|
||
&__logo { | ||
width: 120px; | ||
height: 40px; | ||
display: block; | ||
|
||
// 나중에 이미지로 대체시 삭제 해 주세요 | ||
display: inline-block; | ||
width: 120px; | ||
height: 40px; | ||
font-size: $font-lg; | ||
font-weight: $font-bold700; | ||
text-align: center; | ||
padding: 1rem; | ||
line-height: 40px; | ||
// 나중에 이미지로 대체시 삭제 해 주세요 | ||
&__logo img { | ||
width: 100%; | ||
} | ||
} | ||
|
||
&__user { | ||
display: flex; | ||
justify-content: flex-end; | ||
align-items: center; | ||
gap: 14px; | ||
position: relative; | ||
|
||
&-img { | ||
display: block; | ||
width: 30px; | ||
height: 30px; | ||
border-radius: 50%; | ||
border: 1px solid #ccc; | ||
cursor: pointer; | ||
margin: auto; | ||
transition: 0.3s; | ||
background-image: url('https://startbootstrap.github.io/startbootstrap-sb-admin-2/img/undraw_profile.svg'); | ||
background-size: cover; | ||
} | ||
&-img:hover { | ||
transform: scale(1.2); | ||
} | ||
&-img img { | ||
width: 100%; | ||
} | ||
} | ||
|
||
&__drop-down { | ||
@include flex-center-col; | ||
width: 120px; | ||
background: $white; | ||
position: absolute; | ||
top: 65px; | ||
right: 5px; | ||
box-sizing: border-box; | ||
border-radius: 10px; | ||
& ul { | ||
width: 100%; | ||
text-align: center; | ||
& li { | ||
padding: 0.5rem; | ||
&a { | ||
display: inline-block; | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
.btn { | ||
-webkit-appearance: none; | ||
-moz-appearance: none; | ||
appearance: none; | ||
background: $blue; | ||
color: $white; | ||
margin: 0; | ||
padding: 0.5rem 1rem; | ||
font-size: 1rem; | ||
font-weight: 400; | ||
text-align: center; | ||
text-decoration: none; | ||
border: none; | ||
border-radius: 4px; | ||
display: inline-block; | ||
width: auto; | ||
box-shadow: | ||
0 4px 6px -1px rgba(0, 0, 0, 0.1), | ||
0 2px 4px -1px rgba(0, 0, 0, 0.06); | ||
cursor: pointer; | ||
transition: 0.5s; | ||
} | ||
.btn:active, | ||
.btn:hover, | ||
.btn:focus { | ||
background: $darkBlue; | ||
outline: 0; | ||
} | ||
|
||
.shadow { | ||
box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15); | ||
} | ||
|
||
@media (max-width: 600px) { | ||
.header { | ||
padding: 1rem 2rem; | ||
} | ||
|
||
.header__logo { | ||
font-size: medium; | ||
} | ||
} | ||
@media (max-width: 330px) { | ||
.header__logo { | ||
font-size: small; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,11 @@ | ||
import React from 'react'; | ||
import Header from '../components/Header'; | ||
import '../scss/base/_index.scss'; | ||
|
||
export const LandingPage = () => { | ||
return <div>LandingPage</div>; | ||
export const LandingPage = (): JSX.Element => { | ||
return ( | ||
<div> | ||
<Header /> | ||
</div> | ||
); | ||
}; |