Skip to content

Commit f5f7093

Browse files
committed
반응형
1 parent d08e422 commit f5f7093

File tree

4 files changed

+11
-9
lines changed

4 files changed

+11
-9
lines changed

public/CocktailDrop.webp

38.2 KB
Loading

public/CocktailDrop_4x.webp

-666 KB
Binary file not shown.

src/domains/main/cocktailDrop/CocktailDrop.tsx

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use client';
22

33
import Image from 'next/image';
4-
import Cocktailcup from '../../../../public/CocktailDrop_4x.webp';
4+
import Cocktailcup from '../../../../public/CocktailDrop.webp';
55
import { useLayoutEffect, useRef } from 'react';
66
import gsap from 'gsap';
77
import { ScrollTrigger } from 'gsap/all';
@@ -39,11 +39,12 @@ function CocktailDrop() {
3939
);
4040

4141
// 로고 위에서 아래로 자연스럽게 등장
42+
const isMobile = window.innerWidth < 768;
4243
gsap.fromTo(
4344
logoRef.current,
4445
{ y: -300, opacity: 0 },
4546
{
46-
y: -40,
47+
y: isMobile ? -140 : -40, // 모바일에서는 더 위로
4748
opacity: 1,
4849
duration: 3,
4950
ease: 'power3.out',
@@ -64,7 +65,7 @@ function CocktailDrop() {
6465
return (
6566
<div
6667
ref={containerRef}
67-
className="relative w-full min-h-[110vh] flex flex-col justify-center items-center mt-10 overflow-hidden"
68+
className="relative w-full md:min-h-[110vh] min-h-[74vh] flex flex-col md:justify-center justify-end items-center mt-10 overflow-hidden"
6869
id="scroll-fixed"
6970
>
7071
{/* 대각선 줄 1 */}
@@ -79,7 +80,7 @@ function CocktailDrop() {
7980
/>
8081

8182
{/* 로고 */}
82-
<div ref={logoRef} className="absolute z-20 w-155 h-100">
83+
<div ref={logoRef} className="absolute z-20 md:w-115 w-65 md:h-90 h-40">
8384
<Image
8485
src="/logo.svg"
8586
alt="로고 이미지"
@@ -90,17 +91,18 @@ function CocktailDrop() {
9091
/>
9192
</div>
9293

93-
<div className="w-full h-90"></div>
94+
<div className="w-full md:h-90 h-30"></div>
9495

95-
{/* 컵 이미지 */}
96-
<div className="z-10">
96+
{/* 컵 이미지 - 모바일에서 바닥에 붙도록 */}
97+
<div className="z-10 md:relative absolute bottom-0">
9798
<Image
9899
src={Cocktailcup}
99100
alt="칵테일 컵"
100-
width={800}
101+
width={900}
101102
height={800}
102103
priority
103104
style={{ width: 'auto', height: 'auto' }}
105+
className="md:w-auto md:h-auto w-[300px] h-[300px] object-contain"
104106
/>
105107
</div>
106108
</div>

src/domains/main/components/FinalLanding.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ function FinalLanding() {
7575
</div>
7676
</div>
7777
) : (
78-
<div className="overflow-x-hidden">
78+
<div className="overflow-x-hidden sm:-mb-20">
7979
{isLoading && <Spinner />}
8080
<Landing setIsLoading={setIsLoading} isDesktop={isDesktop} />
8181
{!isLoading && (

0 commit comments

Comments
 (0)