-
Notifications
You must be signed in to change notification settings - Fork 1
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 #13 from endless-horses/feature#4-main-page
메인 페이지 구현 close #4
- Loading branch information
Showing
16 changed files
with
579 additions
and
10 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,14 @@ | ||
const cracoAlias = require('craco-alias'); | ||
|
||
module.exports = { | ||
plugins: [ | ||
{ | ||
plugin: cracoAlias, | ||
options: { | ||
source: 'tsconfig', | ||
baseUrl: './src', | ||
tsConfigPath: 'tsconfig.json', | ||
}, | ||
}, | ||
], | ||
}; |
Large diffs are not rendered by default.
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,11 +1,12 @@ | ||
import React from 'react'; | ||
import Main from '@pages/main'; | ||
|
||
function App() { | ||
return ( | ||
<div className="App"> | ||
<header className="App-header"></header> | ||
</div> | ||
); | ||
return ( | ||
<div className="App"> | ||
<Main /> | ||
</div> | ||
); | ||
} | ||
|
||
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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,47 @@ | ||
import styled from "styled-components"; | ||
|
||
interface WrapperProps { | ||
inversion: boolean; | ||
} | ||
|
||
const Container = styled.div<WrapperProps>` | ||
width: 100vw; | ||
height: 100px; | ||
background-color: ${props => { | ||
if (props.inversion) { | ||
return 'transparent'; | ||
} else { | ||
return '#161A2F'; | ||
} | ||
}}; | ||
display: flex; | ||
align-items: center; | ||
padding-left: 120px; | ||
font-weight: 600; | ||
.title { | ||
padding: 0 20px; | ||
font-size: 25px; | ||
color: ${props => { | ||
if (props.inversion) { | ||
return '#161A2F'; | ||
} else { | ||
return '#FFFFFF'; | ||
} | ||
}}; | ||
} | ||
.sep { | ||
border-left : thin solid; | ||
height : 30px; | ||
color: ${props => { | ||
if (props.inversion) { | ||
return '#161A2F'; | ||
} else { | ||
return '#FFFFFF'; | ||
} | ||
}}; | ||
} | ||
`; | ||
|
||
export default Container; |
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,18 @@ | ||
import Logo from "@components/logo"; | ||
import Container from "./index.style"; | ||
|
||
|
||
interface HeaderProps { | ||
inversion: boolean; | ||
} | ||
|
||
function Header(props: HeaderProps) { | ||
return <Container inversion={props.inversion}> | ||
<Logo inversion={!props.inversion} type='small' /> | ||
<div className="title">Outfit Of Tire</div> | ||
<div className="sep" /> | ||
<div className="title">내 타이어 만들기</div> | ||
</Container> | ||
} | ||
|
||
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,27 @@ | ||
import styled from "styled-components"; | ||
|
||
interface WrapperProps { | ||
image: string; | ||
type?: 'small' | 'large'; | ||
} | ||
|
||
export const Wrapper = styled.div<WrapperProps>` | ||
background-image: url(${props => props.image}); | ||
width: ${props => { | ||
switch (props.type) { | ||
case 'small': | ||
return '60px'; | ||
default: | ||
return '147px'; | ||
} | ||
}}; | ||
height: ${props => { | ||
switch (props.type) { | ||
case 'small': | ||
return '53px'; | ||
default: | ||
return '130px'; | ||
} | ||
}}; | ||
background-size: cover; | ||
`; |
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,15 @@ | ||
import { Wrapper } from "./index.style"; | ||
import defaultLogo from "@assets/icon/logo-default.svg"; | ||
import inversionLogo from "@assets/icon/logo-inversion.svg"; | ||
|
||
|
||
interface LogoProps { | ||
inversion: boolean; | ||
type?: 'small' | 'large'; | ||
} | ||
|
||
function Logo(props: LogoProps) { | ||
return <Wrapper className="logo" image={props.inversion ? inversionLogo : defaultLogo} type={props.type} />; | ||
} | ||
|
||
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,5 @@ | ||
body { | ||
margin: 0; | ||
font-family: 'pretendard'; | ||
color: #161A2F; | ||
} |
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 styled from "styled-components"; | ||
|
||
export const Container = styled.div` | ||
width: 100vw; | ||
height: 100vh; | ||
background: linear-gradient(#FFFFFF, #9BA4B4); | ||
font-weight: 700; | ||
.content > .logo { | ||
float: left; | ||
margin-left: 220px; | ||
margin-top: 350px; | ||
} | ||
.content > .title { | ||
float: left; | ||
margin-left: 60px; | ||
margin-top: 370px; | ||
font-size: 8cqh; | ||
} | ||
.content > .image { | ||
float: left; | ||
margin-left: 200px; | ||
margin-top: 150px; | ||
width: 528px; | ||
height: 541px; | ||
} | ||
` |
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,17 @@ | ||
import Header from "@components/header"; | ||
import { Container } from "./index.style"; | ||
import Logo from "@components/logo"; | ||
import mainImage from "@assets/image/main-tire.png"; | ||
|
||
function Main() { | ||
return <Container> | ||
<Header inversion={true}></Header> | ||
<div className="content"> | ||
<Logo inversion={false} type='large' /> | ||
<div className="title">Outfit Of Tire</div> | ||
<img className="image" src={mainImage} alt="tire_example" /> | ||
</div> | ||
</Container> | ||
} | ||
|
||
export default Main; |
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