Skip to content

Commit

Permalink
add react function
Browse files Browse the repository at this point in the history
  • Loading branch information
iadorora committed Dec 4, 2024
1 parent 0cc9659 commit 73a0b0e
Show file tree
Hide file tree
Showing 31 changed files with 271 additions and 46 deletions.
Empty file added .github/component/AllItem.css
Empty file.
26 changes: 26 additions & 0 deletions .github/component/AllItem.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import "./AllItem.css";

function AllItem({ imageUrl, title, price, likeCount, size }) {
return (
<div>
<div className="All-list">
<img
className="product-image"
src={imageUrl}
alt="product"
style={{
width: `${size}px`,
height: `${size}px`,
}}
/>
<p>{title}</p>
<p>{price}</p>
<div>
<img src={heart} alt="좋아요 수" /> {likeCount}
</div>
</div>
</div>
);
}

export default AllItem;
Empty file added .github/component/BestItem.css
Empty file.
29 changes: 29 additions & 0 deletions .github/component/BestItem.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import heart from "../ImgFile/icon_wish.svg";

import "./BestItem.css";

function BestItem({ imageUrl, title, price, likeCount, size }) {
return (
<div>
<div>
<img
className="Best-image"
src={imageUrl}
alt="product"
style={{
width: `${size}px`,
height: `${size}px`,
}}
/>
<p>{title}</p>
<p>{price}</p>
<div>
<img src={heart} alt="좋아요 수" />
{likeCount}
</div>
</div>
</div>
);
}

export default BestItem;
18 changes: 18 additions & 0 deletions .github/component/HeaderNav.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import React from "react";

function ItemCard({ item }) {
return (
<div className="itemCard">
<img src={item.images[0]} alt={item.name} className="itemCardThumbnail" />
<div className="itemSummary">
<h2 className="itemName">{item.name}</h2>
<p className="itemPrice">{item.price.toLocaleString()}</p>
<div className="favoriteCount">
{item.favoriteCount}
</div>
</div>
</div>
);
}

export default ItemCard;
Empty file added .github/component/ItemCard.jsx
Empty file.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Binary file added components/ic_search.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added components/ic_sort.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Binary file added components/profile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added components/size=large, _status=inactive.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added components/wishlist.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 10 additions & 10 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<body>
<header>
<a href="/" class="header__logo">
<img src="logo.png">
<img src="compnents/logo.png">
</a>
<a href="/login.html" class="header__btn">
로그인
Expand All @@ -24,10 +24,10 @@ <h1>일상의 모든 물건을<br>
구경하러 가기
</a>
</div>
<img src="main-banner.png">
<img src="components/main-banner.png">
</section>
<section class="content-section">
<img src="Img_home_01.png" class="content-section__img">
<img src="components/Img_home_01.png" class="content-section__img">
<div class="content-section__container">
<h3>Hot item</h3>
<h2>인기 상품을<br>
Expand All @@ -44,10 +44,10 @@ <h2>구매를 원하는 상품을<br>
<p>구매하고 싶은 물품은<br>
검색해서 쉽게 찾아보세요</p>
</div>
<img src="Img_home_02.png" class="content-section__img">
<img src="components/Img_home_02.png" class="content-section__img">
</section>
<section class="content-section">
<img src="Img_home_03.png" class="content-section__img">
<img src="components/Img_home_03.png" class="content-section__img">
<div class="content-section__container">
<h3>Register</h3>
<h2>판매를 원하는 상품을<br>
Expand All @@ -59,7 +59,7 @@ <h2>판매를 원하는 상품을<br>
<div class="bottom-banner">
<h2>믿을 수 있는<br>
판다마켓 중고 거래</h2>
<img src="bottom-banner.png">
<img src="components/bottom-banner.png">
</div>
<footer>
<span>ⓒcodeit - 2024</span>
Expand All @@ -69,16 +69,16 @@ <h2>믿을 수 있는<br>
</div>
<div>
<a href="http://facebook.com" target="_blank">
<img src="ic_facebook.png">
<img src="components/ic_facebook.png">
</a>
<a href="http://twitter.com" target="_blank">
<img src="ic_twitter.png">
<img src="components/ic_twitter.png">
</a>
<a href="http://youtube.com" target="_blank">
<img src="ic_youtube.png">
<img src="components/ic_youtube.png">
</a>
<a href="http://instagram.com" target="_blank">
<img src="ic_instagram.png">
<img src="components/ic_instagram.png">
</a>
</div>
</footer>
Expand Down
84 changes: 52 additions & 32 deletions login.html
Original file line number Diff line number Diff line change
@@ -1,48 +1,68 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>판다마켓</title>
<link rel="stylesheet" href="asset.css">
<link rel="stylesheet" href="signup.css">
</head>
<body>
<link rel="stylesheet" href="asset.css" />
<link rel="stylesheet" href="signup.css" />
</head>
<body>
<div class="container">
<header class="header__logo">
<header class="header__logo">
<a href="/">
<img src="logo.png" width= "396px">
<img src="components/logo.png" width="396px" />
</a>
</header>
<form class="form__container">
</header>
<form class="form__container">
<div class="form__form-group">
<label for="email">이메일</label><br>
<input id="email" type="text" name="email" placeholder="이메일을 입력해주세요">
<label for="email">이메일</label><br />
<input
id="email"
type="text"
name="email"
placeholder="이메일을 입력해주세요"
/>
</div>
<div class="form__form-group">
<label for="password">비밀번호</label><br>
<input id="password" type="password" name="userPassword" placeholder="비밀번호를 입력해주세요">
<label for="password">비밀번호</label><br />
<input
id="password"
type="password"
name="userPassword"
placeholder="비밀번호를 입력해주세요"
/>
</div>
<button type="button" class="password-toggle-button" arialabel="비밀번호 보기">
<img src="passwordDefault.png">
<button
type="button"
class="password-toggle-button"
arialabel="비밀번호 보기"
>
<img src="components/passwordDefault.png" />
</button>
<button type="submit" class="form__signup-button"style="border:0 solid black">로그인</button>
</form>
<section class="section__container">
<button
type="submit"
class="form__signup-button"
style="border: 0 solid black"
>
로그인
</button>
</form>
<section class="section__container">
<h3>간편 로그인하기</h3>
<div class="section__icon-container">
<a href="http://www.google.com" target="_blank">
<img src="google-logo.png">
</a>
<a href="http://www.kakaocorp.com/page" target="_blank">
<img src="kakao-logo.png">
</a>
<a href="http://www.google.com" target="_blank">
<img src="components/google-logo.png" />
</a>
<a href="http://www.kakaocorp.com/page" target="_blank">
<img src="components/kakao-logo.png" />
</a>
</div>
</section>
<footer class="footer__container">
</section>
<footer class="footer__container">
판다마켓이 처음이신가요?
<a href="signup.html">회원가입</a>
</footer>
</div>
</body>
</html>
</footer>
</div>
</body>
</html>
8 changes: 4 additions & 4 deletions signup.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@
<label for="password">비밀번호</label><br>
<input id="password" type="password" name="userPassword" placeholder="비밀번호를 입력해주세요">
<button type="button" class="password-toggle-button" arialabel="비밀번호 보기">
<img src="passwordDefault.png">
<img src="components/passwordDefault.png">
</button>
</div>
<div class="form__form-group">
<label for="passwordCheck">비밀번호 확인</label><br>
<input id="passwordCheck" type="password" name="userPassword" placeholder="비밀번호를 다시 한 번 입력해주세요">
<button type="button" class="password-toggle-button" arialabel="비밀번호 보기">
<img src="passwordDefault.png">
<img src="components/passwordDefault.png">
</button>
</div>
<button type="submit" class="form__signup-button"style="border:0 solid black">회원가입</button>
Expand All @@ -43,10 +43,10 @@
<h3>간편 로그인하기</h3>
<div class="section__icon-container">
<a href="http://www.google.com" target="_blank">
<img src="google-logo.png">
<img src="components/google-logo.png">
</a>
<a href="http://www.kakaocorp.com/page" target="_blank">
<img src="kakao-logo.png">
<img src="components/kakao-logo.png">
</a>
</div>
</section>
Expand Down
7 changes: 7 additions & 0 deletions src/Api.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export async function getProduct(page, pageSize) {
const response = await fetch(
`https://panda-market-api.vercel.app/users/me/products?page=${page}&pageSize=${pageSize}`
);
const data = await response.json();
return data;
}
27 changes: 27 additions & 0 deletions src/App.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
.headTitle {
display: flex;
justify-content: space-between;
align-items: center;
}

.item-list {
width: 1200px;
height: 1206px;
}
.item-list-seet {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 24px;
}

.item-list-seeter {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 24px;
}

.Allproduct-list {
display: flex;
}
Loading

0 comments on commit 73a0b0e

Please sign in to comment.