From c06e8dc842dd5d8c095f272d9d4c7065cbc59bc3 Mon Sep 17 00:00:00 2001
From: solar3070 <>
Date: Sun, 29 Oct 2023 04:01:58 +0900
Subject: [PATCH 1/4] =?UTF-8?q?style:=20=EB=AA=A8=EB=B0=94=EC=9D=BC=20?=
=?UTF-8?q?=EB=B0=98=EC=9D=91=ED=98=95=20=EB=B8=8C=EB=A0=88=EC=9D=B4?=
=?UTF-8?q?=ED=81=AC=20=ED=8F=AC=EC=9D=B8=ED=8A=B8=20=EC=88=98=EC=A0=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/common/Select/style.ts | 2 +-
.../RecentProjectList/Carousel/index.tsx | 4 ++--
.../RecentProjectList/Item/style.ts | 12 ++++++------
src/views/ProjectPage/styles.ts | 19 ++++++++-----------
4 files changed, 17 insertions(+), 20 deletions(-)
diff --git a/src/components/common/Select/style.ts b/src/components/common/Select/style.ts
index a6c96f96..09578a7f 100644
--- a/src/components/common/Select/style.ts
+++ b/src/components/common/Select/style.ts
@@ -38,7 +38,7 @@ const SelectTrigger = styled.button<{
background-image: url(${arrowDown});
transform: ${({ isOpened }) => (isOpened ? 'rotate(180deg)' : 'none')};
}
- @media (max-width: 765.9px) {
+ @media (max-width: 899px) {
padding: 8px 12px;
border-radius: 16px;
font-size: 13px;
diff --git a/src/views/ProjectPage/components/RecentProjectList/Carousel/index.tsx b/src/views/ProjectPage/components/RecentProjectList/Carousel/index.tsx
index 8b600074..1de71a5e 100644
--- a/src/views/ProjectPage/components/RecentProjectList/Carousel/index.tsx
+++ b/src/views/ProjectPage/components/RecentProjectList/Carousel/index.tsx
@@ -3,8 +3,8 @@ import { useDeviceType, useIsDesktop, useIsMobile } from '@src/hooks/useDevice';
import { CarouselArrowType, CarouselOverflowType } from '@src/lib/types/universal';
export default function RecentProjectListCarousel({ children }: { children: JSX.Element[] }) {
- const isDesktopSize = useIsDesktop('1239px');
- const isMobileSize = useIsMobile('767px');
+ const isDesktopSize = useIsDesktop('1920px');
+ const isMobileSize = useIsMobile('899px');
const deviceType = useDeviceType();
const arrowType = deviceType === 'desktop' ? CarouselArrowType.External : CarouselArrowType.None;
diff --git a/src/views/ProjectPage/components/RecentProjectList/Item/style.ts b/src/views/ProjectPage/components/RecentProjectList/Item/style.ts
index 7728459d..04568b31 100644
--- a/src/views/ProjectPage/components/RecentProjectList/Item/style.ts
+++ b/src/views/ProjectPage/components/RecentProjectList/Item/style.ts
@@ -16,7 +16,7 @@ const GridWrapper = styled.div`
padding: 24px;
margin-right: 20px;
/* 모바일 뷰 */
- @media (max-width: 767px) {
+ @media (max-width: 899px) {
width: 325px;
grid-template-areas: 'img detail' 'footer footer';
grid-template-columns: 48px auto;
@@ -40,7 +40,7 @@ const ThumbnailImage = styled(Image)`
border-radius: 10px;
/* 모바일 뷰 */
- @media (max-width: 767px) {
+ @media (max-width: 899px) {
width: 48px;
height: 48px;
}
@@ -62,7 +62,7 @@ const TextName = styled.div`
letter-spacing: -0.48px;
/* 모바일 뷰 */
- @media (max-width: 767px) {
+ @media (max-width: 899px) {
font-size: 16px;
letter-spacing: -0.24px;
}
@@ -79,7 +79,7 @@ const TextSummary = styled.div`
letter-spacing: -0.21px;
/* 모바일 뷰 */
- @media (max-width: 767px) {
+ @media (max-width: 899px) {
font-size: 13px;
font-weight: 400;
letter-spacing: -0.195px;
@@ -98,7 +98,7 @@ const Chip = styled.div`
letter-spacing: -0.18px;
/* 모바일 뷰 */
- @media (max-width: 767px) {
+ @media (max-width: 899px) {
height: 26px;
padding: 5px 8px;
font-size: 11px;
@@ -152,7 +152,7 @@ const TryLink = styled.a`
}
/* 모바일 뷰 */
- @media (max-width: 767px) {
+ @media (max-width: 899px) {
font-size: 14px;
letter-spacing: -0.21px;
border-radius: 13px;
diff --git a/src/views/ProjectPage/styles.ts b/src/views/ProjectPage/styles.ts
index f7b90ddd..d8a719ab 100644
--- a/src/views/ProjectPage/styles.ts
+++ b/src/views/ProjectPage/styles.ts
@@ -9,7 +9,7 @@ const SectionTitle = styled.div`
letter-spacing: -0.56px;
margin-bottom: 40px;
- @media (max-width: 765.9px) {
+ @media (max-width: 899px) {
font-size: 18px;
font-weight: 700;
letter-spacing: -0.36px;
@@ -29,27 +29,23 @@ const ContentWrapper = styled.div`
display: flex;
flex-direction: column;
- width: 1200px;
+ width: 1112px;
padding: 100px 0;
/* 태블릿 뷰 */
- @media (max-width: 1299px) and (min-width: 1124px) {
- width: 1080px;
- }
-
- @media (max-width: 1124px) and (min-width: 766px) {
- width: 700px;
+ @media (max-width: 1279px) and (min-width: 900px) {
+ width: 732px;
}
/* 모바일 뷰 */
- @media (max-width: 765.9px) {
+ @media (max-width: 899px) {
width: 360px;
}
`;
const Spacing = styled.div`
height: 108px;
- @media (max-width: 765.9px) {
+ @media (max-width: 899px) {
height: 48px;
}
`;
@@ -57,9 +53,10 @@ const Spacing = styled.div`
const FilterWrapper = styled.div`
display: flex;
gap: 10px;
+ margin-bottom: 16px;
/* 모바일 뷰 */
- @media (max-width: 767px) {
+ @media (max-width: 899px) {
gap: 7px;
}
`;
From 437ce00eae1f8239e8c3fb438fd1ce9846e2f27c Mon Sep 17 00:00:00 2001
From: solar3070 <>
Date: Sun, 29 Oct 2023 04:03:01 +0900
Subject: [PATCH 2/4] =?UTF-8?q?style:=20=ED=94=84=EB=A1=9C=EC=A0=9D?=
=?UTF-8?q?=ED=8A=B8=20=EC=B9=B4=EB=93=9C=20=EC=8A=A4=EC=BC=88=EB=A0=88?=
=?UTF-8?q?=ED=86=A4=20UI?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../project/ProjectCardSkeletonUI/index.tsx | 25 +++
.../project/ProjectCardSkeletonUI/style.ts | 109 +++++++++
.../components/project/ProjectList.tsx | 49 +----
.../project/project-list.module.scss | 208 ------------------
.../ProjectPage/components/project/style.ts | 10 +
5 files changed, 156 insertions(+), 245 deletions(-)
create mode 100644 src/views/ProjectPage/components/project/ProjectCardSkeletonUI/index.tsx
create mode 100644 src/views/ProjectPage/components/project/ProjectCardSkeletonUI/style.ts
delete mode 100644 src/views/ProjectPage/components/project/project-list.module.scss
diff --git a/src/views/ProjectPage/components/project/ProjectCardSkeletonUI/index.tsx b/src/views/ProjectPage/components/project/ProjectCardSkeletonUI/index.tsx
new file mode 100644
index 00000000..de5fea71
--- /dev/null
+++ b/src/views/ProjectPage/components/project/ProjectCardSkeletonUI/index.tsx
@@ -0,0 +1,25 @@
+import * as S from './style';
+
+export default function ProjectCardSkeletonUI() {
+ const array = new Array(9).fill(0);
+
+ return (
+
+ {array.map((_, index) => (
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ))}
+
+ );
+}
diff --git a/src/views/ProjectPage/components/project/ProjectCardSkeletonUI/style.ts b/src/views/ProjectPage/components/project/ProjectCardSkeletonUI/style.ts
new file mode 100644
index 00000000..e50bab35
--- /dev/null
+++ b/src/views/ProjectPage/components/project/ProjectCardSkeletonUI/style.ts
@@ -0,0 +1,109 @@
+import styled from '@emotion/styled';
+import { colors } from '@sopt-makers/colors';
+
+export const CardList = styled.div`
+ display: grid;
+ grid-template-columns: 1fr 1fr 1fr;
+ gap: 50px 28px;
+ width: 1112px;
+
+ @media (max-width: 1279px) and (min-width: 900px) {
+ grid-template-columns: 1fr 1fr;
+ width: 732px;
+ }
+
+ @media (max-width: 899px) {
+ grid-template-columns: 1fr;
+ gap: 16px;
+ width: 100%;
+ }
+`;
+
+export const ProjectCard = styled.div`
+ display: flex;
+ flex-direction: column;
+ gap: 10px;
+
+ width: 352px;
+ height: 308px;
+ padding: 14px;
+ border: 1px solid ${colors.gray700};
+ border-radius: 20px;
+
+ @media (max-width: 899px) {
+ width: 100%;
+ height: 88px;
+ padding: 0 0 10px 0;
+ border: none;
+ border-bottom: 1px solid ${colors.gray900};
+ border-radius: 0;
+ }
+`;
+
+export const ProjectContent = styled.div`
+ display: flex;
+ flex-direction: column;
+ gap: 4px;
+
+ @media (max-width: 899px) {
+ gap: 12px;
+ }
+`;
+
+export const ProjectThumbnail = styled.div`
+ width: 324px;
+ height: 192px;
+ background-color: ${colors.gray800};
+ border-radius: 8px;
+
+ @media (max-width: 899px) {
+ display: none;
+ }
+`;
+
+export const ProjectLogo = styled.div`
+ width: 40px;
+ height: 40px;
+ background-color: ${colors.gray800};
+ border-radius: 8px;
+
+ @media (min-width: 900px) {
+ display: none;
+ }
+`;
+
+export const ProjectHeader = styled.div`
+ display: flex;
+ gap: 12px;
+`;
+
+export const ProjectText = styled.div`
+ display: flex;
+ align-items: center;
+ gap: 6px;
+`;
+
+export const ProjectTitle = styled.div`
+ width: 100px;
+ height: 28px;
+ background-color: ${colors.gray800};
+ border-radius: 8px;
+`;
+
+export const ProjectType = styled.div`
+ width: 39px;
+ height: 28px;
+ background-color: ${colors.gray800};
+ border-radius: 8px;
+`;
+
+export const ProjectSummary = styled.div`
+ width: 270px;
+ height: 22px;
+ background-color: ${colors.gray800};
+ border-radius: 8px;
+
+ @media (max-width: 899px) {
+ width: 40%;
+ }
+`;
diff --git a/src/views/ProjectPage/components/project/ProjectList.tsx b/src/views/ProjectPage/components/project/ProjectList.tsx
index 7446a099..96e45a1c 100644
--- a/src/views/ProjectPage/components/project/ProjectList.tsx
+++ b/src/views/ProjectPage/components/project/ProjectList.tsx
@@ -2,10 +2,10 @@ import { Condition } from '@src/components/common/Condition';
import { State } from '@src/hooks/useFetchBase/types';
import { ProjectCategoryType, ProjectType } from '@src/lib/types/project';
import ProjectCardList from '@src/views/ProjectPage/components/project/ProjectCardList';
+import ProjectCardSkeletonUI from '@src/views/ProjectPage/components/project/ProjectCardSkeletonUI';
import ProjectCategoryDescription from '@src/views/ProjectPage/components/project/ProjectCategoryDescription';
import ProjectListCount from '@src/views/ProjectPage/components/project/ProjectListCount';
import { EmptyContent } from '../common/EmptyContent';
-import styles from './project-list.module.scss';
import * as S from './style';
interface ProjectListProp {
@@ -15,16 +15,19 @@ interface ProjectListProp {
export function ProjectList({ selectedCategory, state }: ProjectListProp) {
return (
-
+ <>
{(() => {
switch (state._TAG) {
case 'IDLE':
case 'LOADING':
return (
-
-
- {ProjectListSkeletonUI()}
-
+ <>
+
+
+
+
+
+ >
);
case 'ERROR':
return
ERROR
;
@@ -32,7 +35,7 @@ export function ProjectList({ selectedCategory, state }: ProjectListProp) {
const { data: projectList } = state;
const listLength = projectList.length;
return (
-
+ <>
0}>
@@ -44,39 +47,11 @@ export function ProjectList({ selectedCategory, state }: ProjectListProp) {
-
+ >
);
}
}
})()}
-
- );
-}
-
-function ProjectListSkeletonUI() {
- const array = new Array(9).fill(undefined);
- return (
-
- {array.map((_, index) => {
- return ;
- })}
-
- );
-}
-
-function CardSkeletonUI() {
- return (
-
-
-
-
-
+ >
);
}
diff --git a/src/views/ProjectPage/components/project/project-list.module.scss b/src/views/ProjectPage/components/project/project-list.module.scss
deleted file mode 100644
index 38b2767a..00000000
--- a/src/views/ProjectPage/components/project/project-list.module.scss
+++ /dev/null
@@ -1,208 +0,0 @@
-@import '@src/lib/styles/mixins';
-
-.total-container {
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
-}
-
-/*
-list-container는 description, count, card-list 영역을 가짐.
-세 개의 영역 모두 65% 의 width를 가짐
-*/
-
-.list-container {
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- max-width: 1200px;
- min-height: 1140px;
-
- @include desktop {
- height: 100%;
- width: 100%;
- }
-
- @include mobile-tablet {
- height: 100%;
- width: 100%;
- }
-}
-
-.selection-description {
- width: 100%;
- display: flex;
- flex-direction: row;
- justify-content: space-between;
- margin-top: 36px;
- margin-bottom: 16px;
-
- @include mobile {
- flex-direction: column;
- gap: 16px;
- margin-top: 16px;
- margin-bottom: 14px;
- }
-}
-
-.category-description {
- color: #C3C3C6;
- font-size: 18px;
- font-weight: 500;
- line-height: 165%;
- letter-spacing: -0.27px;
-
- @include tablet-small {
- font-size: 14px;
- letter-spacing: -0.21px;
- }
-
- @include mobile {
- color: #F0F0F0;
- font-size: 14px;
- letter-spacing: -0.21px;
- padding: 16px;
- background-color: #202025;
- border-radius: 16px;
- }
-}
-
-.list-count {
- color: #C3C3C6;
- font-size: 18px;
- font-weight: 500;
- line-height: 165%;
- letter-spacing: -0.27px;
-
- @include tablet-small {
- font-size: 14px;
- letter-spacing: -0.21px;
- }
-
- @include mobile {
- font-size: 14px;
- letter-spacing: -0.21px;
- }
-
-}
-
-.card-list {
- width: 100%;
- display: grid;
-
- @include desktop {
- grid-template-columns: 1fr 1fr 1fr;
- gap: 20px;
- }
-
- @include tablet-medium {
- grid-template-columns: 1fr 1fr 1fr;
- width: 90%;
- gap: 20px;
- }
-
- @include tablet-small {
- grid-template-columns: 1fr 1fr;
- width: 662px;
- gap: 20px;
- }
-
- @include mobile {
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- gap: 20px;
- }
-}
-
-.spinner {
- margin-top: 50px;
-}
-
-.skeleton {
- display: flex;
- flex-direction: column;
- align-items: center;
-
- border: 1px solid #353535;
- border-radius: 10px;
- // background-color: white;
-
- @include desktop {
- width: 380px;
- height: 468px;
- }
-
- @include mobile-tablet {
- width: 328px;
- height: 402px;
- }
-
- .thumbnail {
- display: flex;
- justify-content: center;
- align-items: center;
- overflow: hidden;
- background-color: #242424;
- border-radius: 10px;
-
- @include desktop {
- width: 368px;
- height: 208px;
- margin: 7px;
- padding-bottom: 5px;
- }
-
- @include mobile-tablet {
- width: 316px;
- height: 176px;
- margin: 5px;
- padding-bottom: 5px;
- }
- }
-
- .type-list {
- width: 95%;
- height: 36px;
- display: flex;
- margin-top: 16px;
-
- .type {
- width: 40px;
- background: #242424;
- border-radius: 10px;
- }
- .type:first-child {
- height: 36px;
- margin-right: 10px;
- }
- .type:nth-child(2) {
- width: 61px;
- }
- }
-
- .description {
- width: 95%;
- height: 20%;
- display: flex;
- flex-direction: column;
- justify-content: space-between;
- margin-top: 25px;
-
- .long-line {
- height: 20px;
- background: #242424;
- border-radius: 10px;
- }
-
- .short-line {
- width: 50%;
- height: 20px;
- background: #242424;
- border-radius: 10px;
- }
- }
-}
diff --git a/src/views/ProjectPage/components/project/style.ts b/src/views/ProjectPage/components/project/style.ts
index 49967ca4..cd92b9c7 100644
--- a/src/views/ProjectPage/components/project/style.ts
+++ b/src/views/ProjectPage/components/project/style.ts
@@ -1,14 +1,24 @@
import styled from '@emotion/styled';
+import { colors } from '@sopt-makers/colors';
import { ProjectCategoryType } from '@src/lib/types/project';
export const ProjectListHeader = styled.div<{ selectedCategory: ProjectCategoryType }>`
display: flex;
justify-content: ${({ selectedCategory }) =>
selectedCategory === ProjectCategoryType.ALL ? 'end' : 'space-between'};
+ margin-bottom: 30px;
/* 모바일 뷰 */
@media (max-width: 899px) {
flex-direction: column;
gap: 20px;
+ margin-bottom: 28px;
}
`;
+
+export const ProjectListCountSkeletonUI = styled.div`
+ width: 89px;
+ height: 23px;
+ background-color: ${colors.gray800};
+ border-radius: 8px;
+`;
From fd704267c98c74f34edb1fd88ab3ebebe421c345 Mon Sep 17 00:00:00 2001
From: solar3070 <>
Date: Sun, 29 Oct 2023 04:03:55 +0900
Subject: [PATCH 3/4] =?UTF-8?q?style:=20=EB=AC=B4=ED=95=9C=20=EC=8A=A4?=
=?UTF-8?q?=ED=81=AC=EB=A1=A4=20=EC=8A=A4=ED=94=BC=EB=84=88=20=EA=B0=80?=
=?UTF-8?q?=EC=9A=B4=EB=8D=B0=20=EC=A0=95=EB=A0=AC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../components/project/ProjectCardList/index.tsx | 12 +++++-------
.../components/project/ProjectCardList/style.ts | 12 ++++++++++++
2 files changed, 17 insertions(+), 7 deletions(-)
diff --git a/src/views/ProjectPage/components/project/ProjectCardList/index.tsx b/src/views/ProjectPage/components/project/ProjectCardList/index.tsx
index 4b331734..3f5a1c04 100644
--- a/src/views/ProjectPage/components/project/ProjectCardList/index.tsx
+++ b/src/views/ProjectPage/components/project/ProjectCardList/index.tsx
@@ -12,19 +12,17 @@ export default function ProjectCardList({ projectList }: ProjectCardList) {
const { data, isNextPage, ref } = useInfiniteScroll(projectList);
return (
- <>
+
{data.map((project) => (
))}
{isNextPage && (
-
+
+
+
)}
- >
+
);
}
diff --git a/src/views/ProjectPage/components/project/ProjectCardList/style.ts b/src/views/ProjectPage/components/project/ProjectCardList/style.ts
index a236299e..b464cdac 100644
--- a/src/views/ProjectPage/components/project/ProjectCardList/style.ts
+++ b/src/views/ProjectPage/components/project/ProjectCardList/style.ts
@@ -1,5 +1,11 @@
import styled from '@emotion/styled';
+export const ProjectFeed = styled.div`
+ display: flex;
+ flex-direction: column;
+ gap: 50px;
+`;
+
export const CardList = styled.div`
display: grid;
grid-template-columns: 1fr 1fr 1fr;
@@ -17,3 +23,9 @@ export const CardList = styled.div`
width: 100%;
}
`;
+
+export const SpinnerWrapper = styled.div`
+ display: flex;
+ justify-content: center;
+ width: 100%;
+`;
From f30231e233c94c6d5ac947dcb8f4b07e058fa10f Mon Sep 17 00:00:00 2001
From: solar3070 <>
Date: Sun, 29 Oct 2023 04:05:32 +0900
Subject: [PATCH 4/4] =?UTF-8?q?style:=20=ED=83=80=EC=9D=B4=ED=8B=80=20?=
=?UTF-8?q?=EB=B0=8F=20=EC=B9=B4=EB=93=9C=20=EC=8D=B8=EB=84=A4=EC=9D=BC=20?=
=?UTF-8?q?=EB=AA=A8=EB=B0=94=EC=9D=BC=20=EB=B0=98=EC=9D=91=ED=98=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/ProjectPage/ProjectPage.tsx | 4 +++-
.../ProjectPage/components/project/ProjectCard/index.tsx | 4 ++--
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/views/ProjectPage/ProjectPage.tsx b/src/views/ProjectPage/ProjectPage.tsx
index 4df249be..907c41fc 100644
--- a/src/views/ProjectPage/ProjectPage.tsx
+++ b/src/views/ProjectPage/ProjectPage.tsx
@@ -2,6 +2,7 @@ import { css } from '@emotion/react';
import { useState } from 'react';
import PageLayout from '@src/components/common/PageLayout';
import Select from '@src/components/common/Select';
+import { useIsMobile } from '@src/hooks/useDevice';
import {
activeProjectCategoryList,
activeProjectPlatformList,
@@ -19,6 +20,7 @@ function Projects() {
const [selectedPlatform, setPlatform] = useState(ProjectPlatformType.ALL);
const state = useFetch(selectedCategory, selectedPlatform);
+ const isMobile = useIsMobile('899px');
return (
- SOPT에서 진행된 프로젝트 둘러보기
+ SOPT{!isMobile && '에서 진행된'} 프로젝트 둘러보기