Skip to content

Commit e8363ac

Browse files
authored
Style/recipe skeleton#14 (#76)
* [style]칵테일 페이지 스켈레톤 UI * [style]레시피페이지 스켈레톤 * [stlye]스켈레톤 Ui 수정
1 parent 26309c1 commit e8363ac

File tree

3 files changed

+26
-10
lines changed

3 files changed

+26
-10
lines changed

src/app/recipe/page.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ function Page() {
3535
<p>n개</p>
3636
<SelectBox option={['', '댓글순', '인기순']} title="최신순" />
3737
</div>
38-
<section className="mt-5">
38+
39+
<section className="mt-5 ">
3940
<CocktailList />
4041
</section>
4142
</section>

src/domains/recipe/CocktailList.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,12 @@ function CocktailList() {
1414

1515
return (
1616
<ul
17-
className="
17+
className=" place-content-between
1818
grid gap-8
19-
grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4
20-
justify-items-center sm:justify-items-stretch
19+
grid-cols-1 sm:justify-items-stretch
20+
sm:[grid-template-columns:repeat(2,minmax(0,320px))] sm:gap-8 md:[grid-template-columns:repeat(3,minmax(0,250px))]
21+
lg:[grid-template-columns:repeat(4,minmax(0,250px))]
22+
2123
"
2224
>
2325
{/* {

src/domains/recipe/skeleton/SkeletonRecipe.tsx

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,30 @@ function SkeletonRecipe() {
1515
</div>
1616

1717
{/* 리스트 자리 */}
18-
<div className="mt-5 grid gap-8 grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4">
18+
19+
<ul
20+
className="
21+
mt-5
22+
place-content-between
23+
grid gap-8
24+
grid-cols-1
25+
sm:justify-items-stretch
26+
sm:[grid-template-columns:repeat(2,minmax(0,320px))]
27+
md:[grid-template-columns:repeat(3,minmax(0,250px))]
28+
lg:[grid-template-columns:repeat(4,minmax(0,250px))]
29+
"
30+
>
1931
{Array.from({ length: 8 }).map((_, i) => (
20-
<div key={i} className="w-full min-w-0">
21-
<div className="relative w-full aspect-[3/4] max-w-80 max-h-75 md:max-w-62.5 overflow-hidden rounded-xl bg-gray animate-pulse" />
22-
<div className="mt-4.5 space-y-2">
32+
<li key={i} className="w-full min-w-0 justify-self-center sm:justify-self-stretch">
33+
<div className="relative w-full max-w-[320px] mx-auto aspect-[3/4] overflow-hidden rounded-xl bg-gray animate-pulse md:w-62.5 h-75" />
34+
<div className="mt-4.5 space-y-2 max-w-[320px] mx-auto">
2335
<div className="h-5 w-2/3 bg-gray rounded animate-pulse" />
2436
<div className="h-4 w-1/2 bg-gray rounded animate-pulse" />
2537
</div>
26-
</div>
38+
</li>
2739
))}
28-
</div>
40+
</ul>
41+
2942
</div>
3043
);
3144
}

0 commit comments

Comments
 (0)