File tree Expand file tree Collapse file tree 5 files changed +75
-17
lines changed Expand file tree Collapse file tree 5 files changed +75
-17
lines changed Original file line number Diff line number Diff line change 11import { StaticImageData } from 'next/image' ;
22import Image from 'next/image' ;
33import Img from '@/shared/assets/images/dummy/exampleCocktail.png' ;
4- import Keep from '../shared/components/keep/Keep' ;
4+ import Keep from '../shared/keep/Keep' ;
5+ import Label from '../shared/label/Label' ;
6+
57
68interface Props {
79 src ?: StaticImageData ;
@@ -11,19 +13,22 @@ interface Props {
1113
1214function CocktailCard ( { src, name, nameKo } : Props ) {
1315 return (
14- < li className = "flex flex-col gap-4" >
15- < div className = "w-80 h-75 rounded-xl overflow-hidden md:w-62.5 relative" >
16+ < div className = "flex flex-col gap-4" >
17+ < div className = "aspect-[3/4] rounded-xl overflow-hidden max-w-80 max-h-75 md:max- w-62.5 relative" >
1618 { /* <Image src={src} alt={name} fill /> */ }
17- < Image src = { Img } alt = "" fill className = "object-cover " />
18- < div className = "flex justify-between absolute left-0 top-0" >
19+ < Image src = { Img } alt = "" fill className = "w-full object-cover h-auto " />
20+ < div className = "flex w-full px-2 justify-between items-center absolute left-0 top-0" >
21+ < div >
22+ < Label title = "레시피" />
23+ </ div >
1924 < Keep />
2025 </ div >
2126 </ div >
2227 < div className = "flex flex-col gap-1 font-bold font-serif" >
2328 < h3 className = "text-2xl" > Old Fassioned</ h3 >
2429 < p className = "text-base" > 올드 패션드</ p >
2530 </ div >
26- </ li >
31+ </ div >
2732 ) ;
2833}
2934export default CocktailCard ;
Original file line number Diff line number Diff line change @@ -13,21 +13,32 @@ function CocktailList() {
1313 // }, []);
1414
1515 return (
16- < ul className = "grid gap-8 justify-items-center grid-cols-1 md:grid-cols-3 lg:grid-cols-4 " >
16+ < ul
17+ className = "
18+ 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
21+ "
22+ >
1723 { /* {
1824 data.map(({ cocktailImgUrl, cocktailId, cocktailName }) => (
1925 <li key={cocktailId}>
2026 <CocktailCard src={cocktailImgUrl} name={cocktailName} nameKo={cocktailName} />
2127 </li>
2228 ))
2329 } */ }
24-
25- < CocktailCard />
26- < CocktailCard />
27- < CocktailCard />
28- < CocktailCard />
29- < CocktailCard />
30- < CocktailCard />
30+ < li className = "w-full min-w-0 max-w-[320px] sm:max-w-none mx-auto sm:mx-0" >
31+ < CocktailCard />
32+ </ li >
33+ < li className = "w-full min-w-0 max-w-[320px] sm:max-w-none mx-auto sm:mx-0" >
34+ < CocktailCard />
35+ </ li > { ' ' }
36+ < li className = "w-full min-w-0 max-w-[320px] sm:max-w-none mx-auto sm:mx-0" >
37+ < CocktailCard />
38+ </ li > { ' ' }
39+ < li className = "w-full min-w-0 max-w-[320px] sm:max-w-none mx-auto sm:mx-0" >
40+ < CocktailCard />
41+ </ li >
3142 </ ul >
3243 ) ;
3344}
Original file line number Diff line number Diff line change 1+ import DetailRecommendList from "./DetailRecommendList" ;
2+
3+ function DetailList ( ) {
4+ return (
5+ < ul className = 'flex justify-between gap-2' >
6+ < li >
7+ < DetailRecommendList />
8+ </ li >
9+ < li >
10+ < DetailRecommendList />
11+ </ li >
12+ < li >
13+ < DetailRecommendList />
14+ </ li >
15+ </ ul >
16+ ) ;
17+ }
18+ export default DetailList ;
Original file line number Diff line number Diff line change 1+ 'use client' ;
2+
13import DetailItem from './DetailItem' ;
24import DetailRecipe from './DetailRecipe' ;
35import DetailsHeader from './DetailsHeader' ;
46import SsuryShake from '@/shared/assets/ssury/ssury_make.webp' ;
57import SsuryDrink from '@/shared/assets/ssury/ssury_drink.webp' ;
68import Image from 'next/image' ;
9+ import DetailList from './DetailList' ;
10+
711
812function DetailMain ( ) {
913 return (
10- < div className = "max-w-1024 page-layout" >
14+ < div className = "max-w-1024 page-layout py-12 " >
1115 < DetailsHeader />
1216
1317 < article className = "flex flex-col items-center mt-4 lg:mt-0" >
@@ -26,14 +30,18 @@ function DetailMain() {
2630 < DetailRecipe />
2731 </ section >
2832
29- < section className = "mt-20" >
33+ < section className = "mt-20" aria-labelledby = "옆으로 슬라이드되는 리스트" >
34+ < h2 className = "sr-only" > 추천 칵테일 리스트</ h2 >
3035 < div className = "border-b-1 h-18 border-white" >
3136 < div className = "flex items-center gap-3" >
3237 < Image src = { SsuryDrink } alt = "" width = "48" height = "48" />
3338 < h3 className = "text-3xl font-bold" > 추천리스트</ h3 >
3439 </ div >
3540 </ div >
36- { /* 여기에 컴포넌트 */ }
41+
42+ < div className = "mt-5" >
43+ < DetailList />
44+ </ div >
3745 </ section >
3846
3947 < section > { /* 여기에 댓글 컴포넌트 */ } </ section >
Original file line number Diff line number Diff line change 1+ import Image from 'next/image' ;
2+ import Example from '@/shared/assets/images/dummy/exampleCocktail.png' ;
3+ function DetailRecommendList ( ) {
4+ return (
5+ < div className = "flex flex-col gap-3" >
6+ < div className = "max-h-75" >
7+ < Image src = { Example } alt = "" />
8+ </ div >
9+ < div className = "flex flex-col gap-1" >
10+ < h4 className = "font-serif text-base lg:text-lg" > Old Fashioned</ h4 >
11+ < p className = "font-serif text-base" > 올드패션드</ p >
12+ </ div >
13+ </ div >
14+ ) ;
15+ }
16+ export default DetailRecommendList ;
You can’t perform that action at this time.
0 commit comments