-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MISSON4 / 이규민 #33
base: main
Are you sure you want to change the base?
MISSON4 / 이규민 #33
Changes from all commits
d0af73d
fd7bc7d
c11a40b
1986e32
c1afc08
c10dc18
e35acfa
5f29f23
a8f4daa
b1204c2
00f0417
98709bd
15e974b
8b8dec3
6f6b310
c8153e2
c573874
c412111
aa8013f
cc7179f
9006616
ae62b6c
73f33d0
03d6d9b
9208497
fd3c89e
f84f144
aae09c6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
[ | ||
{ | ||
"id": 1, | ||
"src": "https://img.freepik.com/free-photo/jeans_1203-8092.jpg", | ||
"name": "무시무시한바지", | ||
"price": "500000", | ||
"isSale": "true" | ||
}, | ||
{ | ||
"id": 2, | ||
"src": "https://img.freepik.com/free-psd/jerzees-pullover-hooded-sweatshirt-mockup-01_126278-94.jpg?w=1480&t=st=1712066977~exp=1712067577~hmac=e2134a114b35532277ab0c2b76ae698527139f0b46b345c0caa0e9aa3d66cd33", | ||
"name": "후드티", | ||
"price": "500000", | ||
"isSale": "true" | ||
}, | ||
{ | ||
"id": 3, | ||
"src": "https://img.freepik.com/free-photo/basic-white-tee-women-s-apparel-rear-view_53876-108033.jpg?t=st=1712067014~exp=1712070614~hmac=7f176e8ed6876ac7593cb0bf2cc392ede4372858b1fec4bb3e585546753bea02&w=1380", | ||
"name": "반팔 티", | ||
"price": "200000", | ||
"isSale": "false" | ||
}, | ||
{ | ||
"id": 4, | ||
"src": "https://img.freepik.com/free-photo/background-textile-protection-back-object_1203-6405.jpg?t=st=1712067043~exp=1712070643~hmac=30c53d8fcb2e8a6d516b952a2f0b1df44ee66af6ec82856ec8f0e676db9b5c8e&w=1060", | ||
"name": "볼 캡 (야구모자)", | ||
"price": "500000", | ||
"isSale": "true" | ||
}, | ||
{ | ||
"id": 5, | ||
"src": "https://img.freepik.com/free-photo/still-life-rendering-jackets-display_23-2149745031.jpg?t=st=1712067097~exp=1712070697~hmac=2a020243be6e84e0541f2292493bb00dd13ea328e50021ceff86fa567e5fab95&w=2000", | ||
"name": "가죽 자켓", | ||
"price": "500000", | ||
"isSale": "true" | ||
}, | ||
{ | ||
"id": 6, | ||
"src": "https://img.freepik.com/free-vector/all-types-black-white-socks-sports-every-day-realistic-set-isolated-vector-illustration_1284-73137.jpg?t=st=1712067118~exp=1712070718~hmac=d5bc8f8b274ebd67d98d0bfa02db9e530818eb49b18a7ed13fa3751f26737dae&w=2000", | ||
"name": "양말", | ||
"price": "200000", | ||
"isSale": "false" | ||
} | ||
] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
[ | ||
{ | ||
"id": 1, | ||
"src": "https://img.freepik.com/free-photo/jeans_1203-8092.jpg", | ||
"name": "무시무시한바지", | ||
"price": "500000", | ||
"isSale": "true" | ||
}, | ||
{ | ||
"id": 2, | ||
"src": "https://img.freepik.com/free-psd/jerzees-pullover-hooded-sweatshirt-mockup-01_126278-94.jpg?w=1480&t=st=1712066977~exp=1712067577~hmac=e2134a114b35532277ab0c2b76ae698527139f0b46b345c0caa0e9aa3d66cd33", | ||
"name": "후드티", | ||
"price": "500000", | ||
"isSale": "true" | ||
}, | ||
{ | ||
"id": 4, | ||
"src": "https://img.freepik.com/free-photo/background-textile-protection-back-object_1203-6405.jpg?t=st=1712067043~exp=1712070643~hmac=30c53d8fcb2e8a6d516b952a2f0b1df44ee66af6ec82856ec8f0e676db9b5c8e&w=1060", | ||
"name": "볼 캡 (야구모자)", | ||
"price": "500000", | ||
"isSale": "true" | ||
}, | ||
{ | ||
"id": 5, | ||
"src": "https://img.freepik.com/free-photo/still-life-rendering-jackets-display_23-2149745031.jpg?t=st=1712067097~exp=1712070697~hmac=2a020243be6e84e0541f2292493bb00dd13ea328e50021ceff86fa567e5fab95&w=2000", | ||
"name": "가죽 자켓", | ||
"price": "500000", | ||
"isSale": "true" | ||
} | ||
] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +0,0 @@ | ||
#root { | ||
max-width: 1280px; | ||
margin: 0 auto; | ||
padding: 2rem; | ||
text-align: center; | ||
} | ||
|
||
.logo { | ||
height: 6em; | ||
padding: 1.5em; | ||
will-change: filter; | ||
transition: filter 300ms; | ||
} | ||
.logo:hover { | ||
filter: drop-shadow(0 0 2em #646cffaa); | ||
} | ||
.logo.react:hover { | ||
filter: drop-shadow(0 0 2em #61dafbaa); | ||
} | ||
|
||
@keyframes logo-spin { | ||
from { | ||
transform: rotate(0deg); | ||
} | ||
to { | ||
transform: rotate(360deg); | ||
} | ||
} | ||
|
||
@media (prefers-reduced-motion: no-preference) { | ||
a:nth-of-type(2) .logo { | ||
animation: logo-spin infinite 20s linear; | ||
} | ||
} | ||
|
||
.card { | ||
padding: 2em; | ||
} | ||
|
||
.read-the-docs { | ||
color: #888; | ||
} | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,21 @@ | ||
import { useState } from 'react' | ||
import reactLogo from './assets/react.svg' | ||
import viteLogo from '/vite.svg' | ||
import './App.css' | ||
import { BrowserRouter, Route, Routes } from 'react-router-dom'; | ||
import './App.css'; | ||
import Header from './components/organism/Header'; | ||
import MainPage from './page/MainPage'; | ||
import ShopPage from './page/ShopPage'; | ||
|
||
function App() { | ||
const [count, setCount] = useState(0) | ||
|
||
return ( | ||
<> | ||
<div> | ||
<a href="https://vitejs.dev" target="_blank"> | ||
<img src={viteLogo} className="logo" alt="Vite logo" /> | ||
</a> | ||
<a href="https://react.dev" target="_blank"> | ||
<img src={reactLogo} className="logo react" alt="React logo" /> | ||
</a> | ||
</div> | ||
<h1>Vite + React</h1> | ||
<div className="card"> | ||
<button onClick={() => setCount((count) => count + 1)}> | ||
count is {count} | ||
</button> | ||
<p> | ||
Edit <code>src/App.jsx</code> and save to test HMR | ||
</p> | ||
</div> | ||
<p className="read-the-docs"> | ||
Click on the Vite and React logos to learn more | ||
</p> | ||
</> | ||
) | ||
<div> | ||
<BrowserRouter> | ||
<Header /> | ||
<Routes> | ||
<Route path='/' element={<MainPage />} /> | ||
<Route path='/shop' element={<ShopPage />} /> | ||
</Routes> | ||
</BrowserRouter> | ||
</div> | ||
); | ||
} | ||
|
||
export default App | ||
export default App; |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import styles from '../../css/DefaultButton.module.css'; | ||
|
||
function DefaultButton({ buttonText, onClick }) { | ||
return ( | ||
<button className={styles.button} onClick={onClick}> | ||
{buttonText} | ||
</button> | ||
); | ||
} | ||
Comment on lines
+3
to
+9
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 이런 상황에서는 children을 활용하는 것이 더욱 잘 읽힐 것 같은데 어떻게 생각하세요? TabButton도 마찬가지 이구요 |
||
|
||
export default DefaultButton; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import styles from '../../css/TabButton.module.css'; | ||
|
||
function TabButton({ buttonText }) { | ||
return <button className={styles.button}>{buttonText}</button>; | ||
} | ||
|
||
export default TabButton; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import styles from '../../css/Item.module.css'; | ||
|
||
function Item({ product }) { | ||
return ( | ||
<div className={styles.container}> | ||
<div className={styles.imgBox}> | ||
<img src={product.src} alt='상품 이미지' /> | ||
</div> | ||
<div className={styles.infoBox}> | ||
<h2>{product.name}</h2> | ||
<div className={styles.priceBox}> | ||
<h2>{product.price}</h2> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. h2를 사용하신 이유가 있을 까요? html 태그의 시멘틱한 사용이 필요해보여요! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 가격은 가독성을 높이기 위해서 toLocaleString()를 사용하시는 것은 어떠신가요? |
||
<p>원</p> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
} | ||
|
||
export default Item; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import styles from '../../css/Header.module.css'; | ||
import ecnv from '../../assets/Images/ecnv.png'; | ||
import user from '../../assets/Images/user.png'; | ||
import cart from '../../assets/Images/cart.png'; | ||
import TabButton from '../atom/TabButton'; | ||
import { Link } from 'react-router-dom'; | ||
|
||
function Header() { | ||
return ( | ||
<div className={styles.container}> | ||
<div className={styles.logoWrapper}> | ||
<Link to='/'> | ||
<div className={styles.logoBox}> | ||
<img src={ecnv} alt='econovation logo' /> | ||
</div> | ||
</Link> | ||
</div> | ||
|
||
<div className={styles.buttonBox}> | ||
<Link to='/shop'> | ||
<TabButton buttonText='SHOP' /> | ||
</Link> | ||
<TabButton buttonText='NEW ARRIVALS' /> | ||
<TabButton buttonText='BRANDS' /> | ||
<TabButton buttonText='CLOTHING' /> | ||
<TabButton buttonText='FOOTWEAR' /> | ||
<TabButton buttonText='ACCESSORIES' /> | ||
<TabButton buttonText='SALE' /> | ||
<TabButton buttonText='CONTACT' /> | ||
</div> | ||
<div className={styles.userBox}> | ||
<button className={styles.userButton}> | ||
<img src={user} alt='cart icon' /> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. src는 user인데 alt는 cart icon이네요! |
||
</button> | ||
<TabButton buttonText='Log In' /> | ||
<button className={styles.cartButton}> | ||
<img src={cart} alt='cart icon' /> | ||
</button> | ||
</div> | ||
</div> | ||
); | ||
} | ||
|
||
export default Header; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import styles from '../../css/ItemList.module.css'; | ||
import Item from '../molecule/Item'; | ||
|
||
function ItemList({ products }) { | ||
return ( | ||
<div className={styles.container}> | ||
{products.map((product) => ( | ||
<Item key={product.id} product={product} /> | ||
))} | ||
</div> | ||
); | ||
} | ||
|
||
export default ItemList; |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. css폴더를 이렇게 따로 구분하신 이유가 있을까요?? 사용하시는 곳 근처에 두면 유지보수도 더 편리할 것 같아서요. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
.button { | ||
border: none; | ||
color: black; | ||
background-color: #eee; | ||
font-size: 1rem; | ||
cursor: pointer; | ||
transition: all 0.5s; | ||
} | ||
|
||
.button:hover { | ||
border-bottom: 0.0625rem solid black; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
.container { | ||
width: 106.25rem; | ||
height: 7.25rem; | ||
background: black; | ||
display: flex; | ||
} | ||
|
||
.logoWrapper { | ||
width: 15%; | ||
display: flex; | ||
align-items: center; | ||
} | ||
|
||
.logoBox > img { | ||
margin-left: 1.5rem; | ||
height: 3rem; | ||
} | ||
|
||
.buttonBox { | ||
width: 70%; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
} | ||
|
||
.userBox { | ||
width: 15%; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
} | ||
|
||
.userBox > img { | ||
width: 2rem; | ||
} | ||
|
||
.userButton { | ||
background: black; | ||
width: 2rem; | ||
height: 2rem; | ||
border-radius: 50%; | ||
border: none; | ||
margin-right: 1rem; | ||
} | ||
|
||
.userButton > img { | ||
width: 2rem; | ||
} | ||
|
||
.cartButton { | ||
width: 2rem; | ||
height: 2rem; | ||
background: black; | ||
border: none; | ||
} | ||
|
||
.cartButton > img { | ||
width: 2rem; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
오 새로운 라이브러리를 사용하셨군요. 현상황에서는 단순하게 iframe으로 유튜브 영상을 삽입할 수도 있을 것 같은데 해당 라이브러리를 채택한 이유가 따로 있을까요??