-
Notifications
You must be signed in to change notification settings - Fork 5
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
Feat/#57 메인페이지 UI 생성
- Loading branch information
Showing
4 changed files
with
251 additions
and
0 deletions.
There are no files selected for viewing
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
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,29 @@ | ||
import React from 'react'; | ||
import { Container, Header, LogoContainer, Logo, MainText, Button, ImageWrapper } from './MainPage.style'; | ||
import fitpleLogo from '../../../assets/Logo.svg'; | ||
import mainPageImage from '../../../assets/mainpage.svg'; | ||
import { useNavigate } from "react-router-dom"; | ||
|
||
function MainPage() { | ||
const navigate = useNavigate(); | ||
const handleLoginClick = () => { | ||
navigate('/login'); | ||
}; | ||
|
||
return ( | ||
<Container> | ||
<Header> | ||
<LogoContainer> | ||
<Logo src={fitpleLogo} alt="Fitple Logo" /> | ||
<MainText>FITple</MainText> | ||
</LogoContainer> | ||
<Button onClick={handleLoginClick}>로그인 / 회원가입</Button> | ||
</Header> | ||
<ImageWrapper> | ||
<img src={mainPageImage} alt="Main Page" /> | ||
</ImageWrapper> | ||
</Container> | ||
); | ||
}; | ||
|
||
export default MainPage; |
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,64 @@ | ||
import styled from 'styled-components'; | ||
|
||
export const Container = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
width: 100%; | ||
min-height: 100vh; | ||
overflow: hidden; | ||
`; | ||
|
||
export const Header = styled.header` | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
padding: 16px 120px; | ||
background-color: #fff; | ||
border-bottom: 1px solid #e0e0e0; | ||
`; | ||
|
||
export const LogoContainer = styled.div` | ||
display: flex; | ||
flex-direction: row; | ||
align-items: center; | ||
`; | ||
|
||
export const Logo = styled.img` | ||
height: 40px; | ||
`; | ||
|
||
export const MainText = styled.p` | ||
font-size: 20px; | ||
font-weight: 600; | ||
margin-left: 10px; | ||
`; | ||
|
||
export const Button = styled.button` | ||
background-color: #007bff; | ||
color: #fff; | ||
border: none; | ||
padding: 10px 20px; | ||
border-radius: 20px; | ||
cursor: pointer; | ||
font-size: 16px; | ||
&:hover { | ||
background-color: #0056b3; | ||
} | ||
`; | ||
|
||
export const ImageWrapper = styled.div` | ||
width: 100%; | ||
flex: 1; | ||
overflow-y: auto; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
background-color: #f8f9fa; | ||
img { | ||
width: 100%; | ||
height: auto; | ||
display: block; | ||
} | ||
`; |