|
| 1 | +// DetailSkeleton.tsx |
| 2 | +// 한 페이지에 붙여넣기만 하면 되는 최소 스켈레톤 UI |
| 3 | + |
| 4 | +export default function DetailSkeleton() { |
| 5 | + return ( |
| 6 | + <div className="page-layout max-w-1024 py-12 animate-pulse"> |
| 7 | + {/* 헤더 */} |
| 8 | + <div className="mt-4 flex items-center justify-between"> |
| 9 | + <div className="h-8 w-16 rounded bg-gray animate-pulse " /> |
| 10 | + <div className="flex items-center gap-3"> |
| 11 | + <div className="h-8 w-8 rounded bg-gray animate-pulse " /> |
| 12 | + <div className="h-8 w-8 rounded bg-gray animate-pulse " /> |
| 13 | + </div> |
| 14 | + </div> |
| 15 | + |
| 16 | + {/* 메인 아이템 */} |
| 17 | + <article className="flex flex-col items-center mt-8 "> |
| 18 | + {/* 타이틀/설명 */} |
| 19 | + <div |
| 20 | + className="flex flex-col items-center gap-3 relative md:flex-row md:justify-between |
| 21 | + md:ml-15 md:w-150 |
| 22 | + lg:ml-30 lg:w-187.5 h-50" |
| 23 | + > |
| 24 | + <div className="flex flex-col md:ml-10 gap-3 items-center md:items-end"> |
| 25 | + <div className="h-6 w-14 rounded bg-gray animate-pulse" /> |
| 26 | + <div className="h-8 w-56 rounded bg-gray animate-pulse " /> |
| 27 | + <div className="h-7 w-40 rounded bg-gray animate-pulse " /> |
| 28 | + </div> |
| 29 | + <div className="w-70 h-20 rounded mr-5 md:mr-0 md:self-end md:w-70 lg:w-100 bg-gray animate-pulse" /> |
| 30 | + </div> |
| 31 | + |
| 32 | + {/* 이미지 */} |
| 33 | + <div className="mt-8 h-[375px] w-[300px] aspect-[3/4] rounded-2xl bg-gray animate-pulse" /> |
| 34 | + |
| 35 | + {/* 도수/글래스 정보 */} |
| 36 | + <dl className="flex flex-col mt-6 gap-3 w-72"> |
| 37 | + <div className="flex items-center gap-3"> |
| 38 | + <div className="h-5 w-22 rounded bg-gray animate-pulse" /> |
| 39 | + |
| 40 | + <div className="flex-1 h-3 rounded bg-gray animate-pulse" /> |
| 41 | + </div> |
| 42 | + <div className="flex items-center gap-3"> |
| 43 | + <div className="h-5 w-24 rounded bg-gray animate-pulse" /> |
| 44 | + <div className="h-5 w-20 rounded bg-gray animate-pulse" /> |
| 45 | + </div> |
| 46 | + </dl> |
| 47 | + </article> |
| 48 | + |
| 49 | + {/* 레시피 섹션 */} |
| 50 | + <section className="mt-16 flex flex-col gap-5"> |
| 51 | + <div className="border-b-1 h-18 border-white flex items-center gap-3"> |
| 52 | + <div className="h-12 w-12 rounded bg-gray animate-pulse" /> |
| 53 | + <div className="h-8 w-36 rounded bg-gray animate-pulse" /> |
| 54 | + </div> |
| 55 | + |
| 56 | + <div className="flex flex-col md:flex-row px-5 gap-5"> |
| 57 | + {/* 재료 */} |
| 58 | + <article className="flex flex-col gap-3 md:w-1/2"> |
| 59 | + <div className="h-7 w-16 rounded bg-gray animate-pulse" /> |
| 60 | + <ul className="flex flex-col gap-2"> |
| 61 | + {Array.from({ length: 4 }).map((_, i) => ( |
| 62 | + <li key={i} className="h-5 w-56 rounded bg-gray animate-pulse" /> |
| 63 | + ))} |
| 64 | + </ul> |
| 65 | + </article> |
| 66 | + |
| 67 | + {/* 만드는 법 */} |
| 68 | + <span className="border-t-1 pt-5 md:border-l-1 md:border-t-0 md:px-10 border-white"> |
| 69 | + <article className="flex flex-col gap-3"> |
| 70 | + <div className="h-7 w-24 rounded bg-gray animate-pulse" /> |
| 71 | + <ol className="flex flex-col gap-2"> |
| 72 | + {Array.from({ length: 4 }).map((_, i) => ( |
| 73 | + <li key={i} className="h-5 w-72 rounded bg-gray animate-pulse" /> |
| 74 | + ))} |
| 75 | + </ol> |
| 76 | + </article> |
| 77 | + </span> |
| 78 | + </div> |
| 79 | + </section> |
| 80 | + |
| 81 | + {/* 추천 리스트 */} |
| 82 | + <section className="mt-16"> |
| 83 | + <div className="border-b-1 h-18 border-white flex items-center gap-3"> |
| 84 | + <div className="h-12 w-12 rounded bg-gray animate-pulse" /> |
| 85 | + <div className="h-8 w-28 rounded bg-gray animate-pulse" /> |
| 86 | + </div> |
| 87 | + |
| 88 | + <div className="mt-6"> |
| 89 | + <ul className="flex justify-between gap-4"> |
| 90 | + {Array.from({ length: 3 }).map((_, i) => ( |
| 91 | + <li key={i} className="w-full max-w-[250px]"> |
| 92 | + <div className="relative w-full aspect-[5/6] overflow-hidden rounded-lg"> |
| 93 | + <div className="absolute inset-0 bg-gray animate-pulse"></div> |
| 94 | + </div> |
| 95 | + <div className="mt-3 space-y-2"> |
| 96 | + <div className="h-5 w-3/5 rounded bg-gray animate-pulse"></div> |
| 97 | + <div className="h-4 w-2/5 rounded bg-gray animate-pulse"></div> |
| 98 | + </div> |
| 99 | + </li> |
| 100 | + ))} |
| 101 | + </ul> |
| 102 | + </div> |
| 103 | + </section> |
| 104 | + |
| 105 | + {/* 댓글 자리 */} |
| 106 | + <section className="mt-16"> |
| 107 | + <div className="h-8 w-24 rounded bg-gray animate-pulse" /> |
| 108 | + <div className="mt-4 h-24 w-full rounded bg-gray animate-pulse" /> |
| 109 | + </section> |
| 110 | + </div> |
| 111 | + ); |
| 112 | +} |
0 commit comments