Skip to content
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

Park choul min/css work #81

Merged
merged 14 commits into from
Feb 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion public/arrow.svg
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 public/loading.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions public/monster-ball.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion src/components/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Outlet, useLocation } from 'react-router-dom';
import Header from '@/components/header/Header';
import Footer from '@/components/footer/Footer';
import { Suspense, useEffect } from 'react';
import Loading from './loading/Loading';

const Layout = () => {
const location = useLocation();
Expand All @@ -12,7 +13,7 @@ const Layout = () => {
return (
<>
<Header />
<Suspense fallback={'로딩 중~~~'}>
<Suspense fallback={<Loading />}>
<Outlet />
</Suspense>
<Footer />
Expand Down
6 changes: 4 additions & 2 deletions src/components/card/pokemonCard.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -280,15 +280,17 @@
justify-content: center;
top: 0;
left: 0;
width: 74px;
width: auto;
padding-left: 10px;
padding-right: 12px;
height: 34px;
position: absolute;
border-radius: 23px 0px;
z-index: 1;

&__my {
font-size: 8px;
width: 38px;
// width: 38px;
height: 17px;
}
}
Expand Down
2 changes: 2 additions & 0 deletions src/components/cardMaker/cardEditPage.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
}

.card_wrapper {
margin-top: 20px;
width: 100%;
display: flex;
flex-direction: column;
Expand Down Expand Up @@ -81,6 +82,7 @@
width: 100%;
justify-content: space-between;
display: flex;
gap: 12px;

@include mobile {
display: none;
Expand Down
18 changes: 11 additions & 7 deletions src/components/cardMaker/cardEditor.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
height: 100%;
display: flex;
flex-direction: column;
flex: 0.8;
flex: 0.6;
padding-top: 20px;
justify-content: space-between;

@include mobile {
Expand Down Expand Up @@ -63,15 +64,18 @@

.name_input {
cursor: text;
text-align: end;
outline: none;
border: none;
color: #000;
outline: none;
padding: 5px;
display: flex;
text-align: end;
font-size: 18px;
font-weight: 500;
font-family: GmarketSansMedium;
width: auto;
max-width: 150px;
max-width: 200px;
border-radius: 4px;
background-color: #f9f9f9;
border: 1px solid #cfcfcf;
font-family: 'GmarketSansMedium';
}

.status_title {
Expand Down
3 changes: 3 additions & 0 deletions src/components/cardMaker/searchPokemon/search.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@
outline: none;
background-color: transparent;
border: none;
svg {
font-size: 20px;
}
}

// SearchDropdown
Expand Down
12 changes: 8 additions & 4 deletions src/components/cardMaker/selectPokemon/select.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
display: flex;
justify-content: center;
align-items: center;
border: 2.3px solid #e5e5e5;
border: 1px solid #e5e5e5;
background: #fff;

img {
Expand All @@ -45,13 +45,14 @@
// SelectPokemonLike, SelectPokemonRandom
.select_wrapper {
display: flex;
width: 100%;
flex-direction: column;
border-radius: 10px;
border: 1px solid #ebebeb;
background-color: #fff;
padding: 17px 21px;
justify-content: space-between;
width: fit-content;
// width: fit-content;
gap: 10px;

@include mobile {
Expand All @@ -64,6 +65,7 @@
.random_container {
display: flex;
gap: 15px;
justify-content: space-between;

@include mobile {
gap: 30px;
Expand All @@ -75,6 +77,7 @@
.like_container {
display: flex;
gap: 15px;
justify-content: space-between;

@include mobile {
gap: 5px;
Expand Down Expand Up @@ -159,11 +162,12 @@
height: 190px;
display: flex;
padding: 12px 15px;
border-radius: 15px;
align-items: center;
flex-direction: column;
border: 3px solid #000;
border-radius: 15px;
background-color: #fff;
justify-content: space-between;
align-items: center;

.img_wrapper {
position: relative;
Expand Down
17 changes: 12 additions & 5 deletions src/components/community/CommunityCardItem.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,38 @@
display: flex;
flex-wrap: wrap;
cursor: pointer;
max-width: 280px;
max-width: 100%;
overflow: hidden;
transition: 0.2s;
max-height: 268px;
// max-height: 268px;
border-radius: 16px;
margin-bottom: 20px;
border: 1px solid #cfcfcf;
background-color: #ffffff;
&:hover {
transform: scale(1.02);
}
@media (max-width: 1200px) {
max-width: 100%;
}
@media (max-width: 768px) {
max-width: 100%;
margin-left: 30px;
margin-right: 30px;
}
}

.titleImg {
width: 100%;
height: 133px;
// height: 133px;
display: flex;
overflow: hidden;
img {
width: 100%;
height: 100%;
// @media (max-width: 1200px) {
// width: auto;
// margin-left: auto;
// margin-right: auto;
// }
@media (max-width: 768px) {
width: auto;
margin-left: auto;
Expand All @@ -38,6 +44,7 @@

.innerBox {
display: flex;
width: 100%;
flex-wrap: wrap;
padding: 0 14px 14px;
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/community/CommunityCardItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const CommunityCardItem = ({ data }: any) => {
return (
<div className={styles.container} onClick={handleToDetail}>
<div className={styles.titleImg}>
<img src={`public/${data.postImg}`} />
<img src={`/${data.postImg}`} />
</div>
<div className={styles.innerBox}>
<div className={styles.titleItem}>
Expand Down
41 changes: 24 additions & 17 deletions src/components/community/CommunityCardList.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,17 @@
width: 100%;
height: auto;
display: grid;
flex-wrap: wrap;
margin-top: 30px;
column-gap: 20px;
row-gap: 20px;
justify-items: center;
justify-content: space-between;
grid-template-columns: 1fr 1fr 1fr 1fr;
@media (max-width: 768px) {
display: grid;
grid-template-columns: 1fr;
// justify-content: space-between;
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
@media (max-width: 1200px) {
padding: 30px;
padding: 30px;
// display: grid;
// grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
}

Expand All @@ -45,35 +47,40 @@
}

.searchWritingBox {
width: 100%;
// width: 100%;
display: flex;
margin-top: 4px;
margin-bottom: 20px;
justify-content: space-between;
@media (max-width: 1200px) {
padding-left: 30px;
padding-right: 30px;
}
}

.pagination {
display: flex;
justify-content: end;
@media (max-width: 768px) {
@media (max-width: 1200px) {
justify-content: center;
}
}

.CommunityHeader {
gap: 6px;
display: flex;
display: grid;
grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
justify-content: center;
@media (max-width: 768px) {
place-items: center;
display: grid;
@media (max-width: 1200px) {
// place-items: center;
// display: grid;
margin: 0 30px;
grid-template-columns: 1fr 1fr;
// grid-template-columns: 1fr 1fr;
}
}

.CategoryButton {
width: 148px;
width: 100%;
height: 28px;
display: flex;
font-size: 12px;
Expand All @@ -85,9 +92,9 @@
justify-content: center;
border: 1px solid #e3e3e3;
background-color: #ffffff;
@media (max-width: 768px) {
width: 100%;
}
// @media (max-width: 768px) {
// width: 100%;
// }
}
.Select {
color: #ffffff;
Expand Down
27 changes: 26 additions & 1 deletion src/components/community/CommunityComment.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,35 @@
.heartText {
font-size: 14px;
color: #ff5050;
padding-top: 3px;
padding-top: 1px;
margin-left: 4px;
}
}

.heartButtonUn {
width: 100px;
height: 30px;
display: flex;
cursor: pointer;
color: #ffffff;
margin: 50px auto;
align-items: center;
border-radius: 50px;
justify-content: center;
background-color: #ffffff;
border: 1px solid #cfcfcf;
svg {
font-size: 18px;
color: #cfcfcf;
}
.heartTextUn {
font-size: 14px;
color: #cfcfcf;
padding-top: 1px;
margin-left: 4px;
}
}

.Outline {
background-color: #ff5050;
svg {
Expand Down
35 changes: 24 additions & 11 deletions src/components/community/CommunityComment.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -199,19 +199,32 @@ const CommunityComment = ({ id, data }: any) => {
setHeart((prev) => !prev);
};

const onUnHeart = () => {
return alert('로그인이 필요합니다.');
};

return (
<div className={styles.commentContainer}>
<div
className={
heart
? `${styles.heartButton} ${styles.Outline}`
: `${styles.heartButton}`
}
onClick={onToggleHeart}
>
{heart ? <AiFillHeart /> : <AiOutlineHeart />}
<div className={styles.heartText}>좋아요</div>
</div>
{/* 좋아요 영역 */}
{!user?.uid ? (
<div className={styles.heartButtonUn} onClick={onUnHeart}>
<AiOutlineHeart />
<div className={styles.heartTextUn}>좋아요</div>
</div>
) : (
<div
className={
heart
? `${styles.heartButton} ${styles.Outline}`
: `${styles.heartButton}`
}
onClick={onToggleHeart}
>
{heart ? <AiFillHeart /> : <AiOutlineHeart />}
<div className={styles.heartText}>좋아요</div>
</div>
)}

{/* 댓글 입력 영역 */}
<div className={styles.commentBox}>
<div className={styles.commentTitle}>댓글 쓰기</div>
Expand Down
Loading
Loading