-
Notifications
You must be signed in to change notification settings - Fork 0
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 #95 from teamViNO/feature-075
feature-075: 카테고리 페이지 스켈레톤 UI 퍼블리싱
- Loading branch information
Showing
5 changed files
with
229 additions
and
57 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,20 @@ | ||
import * as CardSkeletonStyles from '@/styles/skeleton/CardSkeleton.style'; | ||
const CardSkeleton = () => { | ||
return ( | ||
<CardSkeletonStyles.Container> | ||
<CardSkeletonStyles.Image /> | ||
<CardSkeletonStyles.ContentWrap> | ||
<CardSkeletonStyles.ContentLong /> | ||
<CardSkeletonStyles.ContentShort /> | ||
<CardSkeletonStyles.ContentShort /> | ||
<CardSkeletonStyles.TagWrap> | ||
<CardSkeletonStyles.Tag /> | ||
<CardSkeletonStyles.Tag /> | ||
<CardSkeletonStyles.Tag /> | ||
</CardSkeletonStyles.TagWrap> | ||
</CardSkeletonStyles.ContentWrap> | ||
</CardSkeletonStyles.Container> | ||
); | ||
}; | ||
|
||
export default CardSkeleton; |
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,34 @@ | ||
import * as CategoryPageSkeletonStyles from '@/styles/skeleton/CategoryPageSkeleton.style'; | ||
import CardSkeleton from './CardSkeleton'; | ||
|
||
interface ICategoryPageSkeletonProp { | ||
isSubSkeleton: boolean; | ||
} | ||
|
||
const CategoryPageSkeleton = ({ isSubSkeleton }: ICategoryPageSkeletonProp) => { | ||
return ( | ||
<CategoryPageSkeletonStyles.Container> | ||
<CategoryPageSkeletonStyles.Title /> | ||
<CategoryPageSkeletonStyles.MenuWrap> | ||
<CategoryPageSkeletonStyles.TagWrap> | ||
<CategoryPageSkeletonStyles.Tag | ||
className={`${isSubSkeleton && 'show'}`} | ||
/> | ||
<CategoryPageSkeletonStyles.Tag | ||
className={`${isSubSkeleton && 'show'}`} | ||
/> | ||
</CategoryPageSkeletonStyles.TagWrap> | ||
<CategoryPageSkeletonStyles.Menu /> | ||
</CategoryPageSkeletonStyles.MenuWrap> | ||
<CategoryPageSkeletonStyles.CardContainer> | ||
<CardSkeleton /> | ||
<CardSkeleton /> | ||
<CardSkeleton /> | ||
<CardSkeleton /> | ||
<CardSkeleton /> | ||
</CategoryPageSkeletonStyles.CardContainer> | ||
</CategoryPageSkeletonStyles.Container> | ||
); | ||
}; | ||
|
||
export default CategoryPageSkeleton; |
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,35 @@ | ||
import styled from 'styled-components'; | ||
import { CommonBackground } from './CategoryPageSkeleton.style'; | ||
|
||
export const Container = styled.div` | ||
height: 346px; | ||
`; | ||
|
||
export const Image = styled(CommonBackground)` | ||
height: 163px; | ||
`; | ||
|
||
export const ContentWrap = styled.div` | ||
padding: 26.87px 16px 0; | ||
`; | ||
|
||
export const ContentLong = styled(CommonBackground)` | ||
height: 20px; | ||
margin-bottom: 6px; | ||
`; | ||
|
||
export const ContentShort = styled(CommonBackground)` | ||
width: 142px; | ||
height: 20px; | ||
margin-bottom: 20px; | ||
`; | ||
|
||
export const TagWrap = styled.div` | ||
display: flex; | ||
`; | ||
|
||
export const Tag = styled(CommonBackground)` | ||
width: 62px; | ||
height: 31px; | ||
margin-right: 8px; | ||
`; |
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,73 @@ | ||
import styled, { keyframes } from 'styled-components'; | ||
import theme from '../theme'; | ||
|
||
const gradient = keyframes` | ||
0% { | ||
background-position: 0% 50%; | ||
} | ||
50% { | ||
background-position: 100% 50%; | ||
} | ||
100% { | ||
background-position: 0% 50%; | ||
} | ||
`; | ||
|
||
export const CommonBackground = styled.div` | ||
background: linear-gradient( | ||
-45deg, | ||
${theme.color.gray100}, | ||
${theme.color.gray200}, | ||
${theme.color.gray100} | ||
); | ||
background-size: 200% 100%; | ||
animation: ${gradient} 1.5s ease infinite; | ||
border-radius: 4px; | ||
`; | ||
|
||
export const Container = styled.div` | ||
padding: 60px 60px 40px 120px; | ||
width: 100%; | ||
margin-inline: auto; | ||
`; | ||
|
||
export const Title = styled(CommonBackground)` | ||
height: 40px; | ||
width: 259px; | ||
background-color: ${theme.color.gray100}; | ||
`; | ||
|
||
export const MenuWrap = styled.div` | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
margin: 32px 0 44px; | ||
`; | ||
|
||
export const TagWrap = styled.div` | ||
display: flex; | ||
`; | ||
|
||
export const Tag = styled(CommonBackground)` | ||
visibility: hidden; | ||
width: 64px; | ||
height: 20px; | ||
margin-right: 20px; | ||
&.show { | ||
visibility: visible; | ||
} | ||
`; | ||
|
||
export const Menu = styled(CommonBackground)` | ||
width: 90px; | ||
height: 20px; | ||
`; | ||
|
||
export const CardContainer = styled.div` | ||
display: grid; | ||
grid-template-columns: repeat(3, 290px); | ||
column-gap: 20px; | ||
row-gap: 61px; | ||
`; |