-
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.
Browse files
Browse the repository at this point in the history
design: add Header layout
- Loading branch information
Showing
10 changed files
with
200 additions
and
8 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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,13 +1,18 @@ | ||
import { BrowserRouter, Routes } from "react-router-dom"; | ||
import { BrowserRouter, Route, Routes } from "react-router-dom"; | ||
import Header from "./components/common/Header"; | ||
import Home from "./pages/Home"; | ||
import GlobalStyle from "./styles/globalStyle"; | ||
|
||
function App() { | ||
const App = () => { | ||
return ( | ||
<BrowserRouter> | ||
<GlobalStyle /> | ||
<Routes /> | ||
<Header /> | ||
<Routes> | ||
<Route path="/" element={<Home />} /> | ||
</Routes> | ||
</BrowserRouter> | ||
); | ||
} | ||
}; | ||
|
||
export default App; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,95 @@ | ||
import styled from "styled-components"; | ||
import gelleryBlack from "../../assets/icons/header_icon/header_gellery_black_icon.png"; | ||
import github from "../../assets/icons/header_icon/header_github_black_icon.png"; | ||
import wikiBlack from "../../assets/icons/header_icon/header_wiki_black_icon.png"; | ||
import Logo from "./Logo"; | ||
import cummute from "../../assets/icons/header_icon/header_commute_white-icon.png"; | ||
|
||
const HeaderBox = styled.header` | ||
width: 100vw; | ||
height: 5rem; | ||
padding: 0 2rem; | ||
`; | ||
|
||
const HeaderNav = styled.nav` | ||
width: 100%; | ||
height: 100%; | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
`; | ||
|
||
const HeaderItems = styled.nav` | ||
display: flex; | ||
height: 50%; | ||
gap: 1.5rem; | ||
`; | ||
|
||
const HeaderItem = styled.div` | ||
font-size: 1rem; | ||
font-weight: 500; | ||
height: 100%; | ||
display: flex; | ||
align-items: center; | ||
cursor: pointer; | ||
gap: 0.2rem; | ||
border-radius: 10px; | ||
.github { | ||
width: 2.2rem; | ||
height: 80%; | ||
} | ||
`; | ||
|
||
const IconImg = styled.img` | ||
width: 1rem; | ||
`; | ||
|
||
const Span = styled.span` | ||
padding-bottom: 0.2rem; | ||
`; | ||
|
||
const CommuteButton = styled.button` | ||
background-color: #000000; | ||
height: 100%; | ||
border-radius: 10px; | ||
font-size: 1rem; | ||
padding: 0 2rem; | ||
display: flex; | ||
align-items: center; | ||
cursor: pointer; | ||
.commute_span { | ||
color: #ffff; | ||
margin-left: 0.5rem; | ||
} | ||
`; | ||
|
||
const Header = () => { | ||
return ( | ||
<HeaderBox> | ||
<HeaderNav> | ||
<Logo /> | ||
<HeaderItems> | ||
<HeaderItem> | ||
<IconImg src={wikiBlack} alt="wiki icon" /> | ||
<Span>wiki</Span> | ||
</HeaderItem> | ||
<HeaderItem> | ||
<IconImg src={gelleryBlack} alt="gellery icon" /> | ||
<Span>gellery</Span> | ||
</HeaderItem> | ||
<HeaderItem> | ||
<IconImg src={github} alt="github icon" className="github" /> | ||
</HeaderItem> | ||
<HeaderItem> | ||
<CommuteButton type="button"> | ||
<IconImg src={cummute} /> | ||
<Span className="commute_span">commute</Span> | ||
</CommuteButton> | ||
</HeaderItem> | ||
</HeaderItems> | ||
</HeaderNav> | ||
</HeaderBox> | ||
); | ||
}; | ||
|
||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import styled from "styled-components"; | ||
import logo from "../../assets/icons/header_icon/logo.png"; | ||
|
||
const LogoBox = styled.a` | ||
width: 150px; | ||
height: 50%; | ||
`; | ||
|
||
const LogoImg = styled.img` | ||
width: 100%; | ||
height: 100%; | ||
cursor: pointer; | ||
`; | ||
|
||
const Logo = () => { | ||
return ( | ||
<LogoBox> | ||
<LogoImg src={logo} alt="youcandoit logo" /> | ||
</LogoBox> | ||
); | ||
}; | ||
|
||
export default Logo; |
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,4 @@ | ||
declare module "*.jpg"; | ||
declare module "*.png"; | ||
declare module "*.jpeg"; | ||
declare module "*.gif"; |
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,7 @@ | ||
import styled from "styled-components"; | ||
|
||
const Home = () => { | ||
return <div>home</div>; | ||
}; | ||
|
||
export default Home; |