Skip to content

Commit 0efeda3

Browse files
committed
2 parents b75f7e8 + ad53efa commit 0efeda3

File tree

13 files changed

+184
-2616
lines changed

13 files changed

+184
-2616
lines changed

package-lock.json

Lines changed: 108 additions & 2597 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
"dependencies": {
2121
"@react-three/drei": "^10.7.6",
2222
"@react-three/fiber": "^9.3.0",
23-
"@react-three/gltfjsx": "^4.3.4",
2423
"@react-three/postprocessing": "^3.0.4",
2524
"@tanstack/react-query": "^5.90.2",
2625
"@tanstack/react-virtual": "^3.13.12",

public/mobileCocktail.webp

514 KB
Loading
File renamed without changes.

src/app/(main)/layout.tsx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import FooterWrapper from '@/shared/components/footer/FooterWrapper';
2+
import Header from '@/shared/components/header/Header';
3+
4+
function NoLayout({ children }: { children: React.ReactNode }) {
5+
return (
6+
<>
7+
<Header className="bg-transparent w-full h-[44px] md:h-[60px] flex items-center justify-between px-[12px] fixed top-0 left-0 z-50 transition-transform duration-200 ease-in-ou" />
8+
<main className="flex flex-1">{children}</main>
9+
<FooterWrapper />
10+
</>
11+
);
12+
}
13+
export default NoLayout;
File renamed without changes.

src/domains/main/cocktailDrop/CocktailDrop.tsx

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,15 @@ import Cocktailcup from '../../../../public/CocktailDrop.webp';
55
import { useLayoutEffect, useRef } from 'react';
66
import gsap from 'gsap';
77
import { ScrollTrigger } from 'gsap/all';
8+
import PassBtn from './PassBtn';
89

910
gsap.registerPlugin(ScrollTrigger);
1011

11-
function CocktailDrop() {
12+
interface CocktailDropProps {
13+
isDesktop?: boolean;
14+
}
15+
16+
function CocktailDrop({ isDesktop = false }: CocktailDropProps) {
1217
const containerRef = useRef<HTMLDivElement>(null);
1318
const logoRef = useRef<HTMLDivElement>(null);
1419
const line1Ref = useRef<HTMLDivElement>(null);
@@ -39,12 +44,11 @@ function CocktailDrop() {
3944
);
4045

4146
// 로고 위에서 아래로 자연스럽게 등장
42-
const isMobile = window.innerWidth < 768;
4347
gsap.fromTo(
4448
logoRef.current,
4549
{ y: -300, opacity: 0 },
4650
{
47-
y: isMobile ? -140 : -40, // 모바일에서는 더 위로
51+
y: !isDesktop ? -230 : -18, // 데스크톱이 아닐 때 더 위로
4852
opacity: 1,
4953
duration: 3,
5054
ease: 'power3.out',
@@ -60,12 +64,12 @@ function CocktailDrop() {
6064
}, containerRef);
6165

6266
return () => ctx.revert();
63-
}, [containerRef]);
67+
}, [containerRef, isDesktop]);
6468

6569
return (
6670
<div
6771
ref={containerRef}
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"
72+
className="relative w-full lg:min-h-[110vh] min-h-[89vh] flex flex-col md:justify-center justify-end items-center mt-10 overflow-hidden"
6973
id="scroll-fixed"
7074
>
7175
{/* 대각선 줄 1 */}
@@ -80,7 +84,7 @@ function CocktailDrop() {
8084
/>
8185

8286
{/* 로고 */}
83-
<div ref={logoRef} className="absolute z-20 md:w-115 w-65 md:h-90 h-40">
87+
<div ref={logoRef} className="absolute md:w-115 w-85 md:h-90 h-40">
8488
<Image
8589
src="/logo.svg"
8690
alt="로고 이미지"
@@ -94,17 +98,19 @@ function CocktailDrop() {
9498
<div className="w-full md:h-90 h-30"></div>
9599

96100
{/* 컵 이미지 - 모바일에서 바닥에 붙도록 */}
97-
<div className="z-10 md:relative absolute bottom-0">
101+
<div className="md:relative absolute bottom-0">
98102
<Image
99103
src={Cocktailcup}
100104
alt="칵테일 컵"
101105
width={900}
102-
height={800}
106+
height={700}
103107
priority
104-
style={{ width: 'auto', height: 'auto' }}
105-
className="md:w-auto md:h-auto w-[300px] h-[300px] object-contain"
108+
className="md:w-auto md:h-auto w-[500px] h-[400px] object-cover"
106109
/>
107110
</div>
111+
<div className="absolute md:bottom-35 bottom-20 flex items-center justify-center z-3 w-full">
112+
<PassBtn />
113+
</div>
108114
</div>
109115
);
110116
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import { useRouter } from 'next/navigation';
2+
3+
function PassBtn() {
4+
const router = useRouter();
5+
const handleClick = () => {
6+
router.push('/recommend');
7+
};
8+
return (
9+
<button
10+
onClick={handleClick}
11+
className="w-[90%] md:w-120 py-5 md:px-20 px-5 md:text-2xl text-lg rounded-xl flex items-center justify-center bg-tertiary/70"
12+
>
13+
<span className="text-primary font-serif whitespace-nowrap">
14+
칵테일 취향추천 <span className="text-secondary font-serif">바로가기</span>
15+
</span>
16+
</button>
17+
);
18+
}
19+
20+
export default PassBtn;

src/domains/main/components/3d/HomeModel.tsx

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

33
import { Environment, OrbitControls, useGLTF } from '@react-three/drei';
4-
import { Canvas, useFrame, useThree } from '@react-three/fiber';
4+
import { Canvas } from '@react-three/fiber';
55
import { Bloom, EffectComposer } from '@react-three/postprocessing';
6-
import { useEffect, useRef } from 'react';
6+
import { useEffect } from 'react';
77
import * as THREE from 'three';
88

99
interface Props {
@@ -42,7 +42,7 @@ function Model({ onLoaded }: Props) {
4242
return (
4343
<primitive
4444
object={scene}
45-
scale={6.4}
45+
scale={5.8}
4646
position={[0, -1.2, 0]}
4747
rotation={[-0.15, Math.PI + 3, 0]}
4848
/>

src/domains/main/components/3d/ModelImage.tsx

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
import { useEffect } from 'react';
2+
import MobileCocktailDrop from '../../../../../public/mobileCocktail.webp';
3+
import Image from 'next/image';
24

35
interface Props {
46
onLoaded: () => void;
@@ -8,7 +10,20 @@ function ModelImage({ onLoaded }: Props) {
810
useEffect(() => {
911
onLoaded();
1012
});
11-
return <div className="w-full"></div>;
13+
return (
14+
<div className="w-full flex justify-center items-center absolute bottom-13 left-1/2 -translate-x-1/2">
15+
<div className="rounded-tr-4xl rounded-tl-4xl overflow-hidden">
16+
<Image
17+
src={MobileCocktailDrop}
18+
alt="모바일 칵테일 드랍"
19+
width={260}
20+
height={290}
21+
priority
22+
className="object-cover w-[300px] h-[390px]"
23+
/>
24+
</div>
25+
</div>
26+
);
1227
}
1328

1429
export default ModelImage;

0 commit comments

Comments
 (0)