Skip to content

Commit 49a5fbd

Browse files
authored
Feat/write#19 (#148)
* [feat] 글쓰기 기능 * [feat] 포스트 작성 기능 * Feat/communityscroll#23 (#114) * [feat] 스크롤링구현 * [feat] 주소, api설정 * [feat] 커뮤니티 탭, 필터 패치로직 * [feat] lastLikeCount, lastCommentCount, 추가 * [fix] 코멘트 삭제수정 마이페이지에선 뗄수있게 myPage props 추가 * 옵셔널로 수정 * 오류 수정 * [feat] 글쓰기 기능 * 카테고리필수 * [feat] 포스트 무한스크롤 + 글쓰기기능 이미지추가 * [feat] 이미지 스와이퍼 * [feat] 프로필 쑤리 이미지 * [feat] 댓글 누르면 댓글 섹션으로 가기 * [feat] 좋아요기능(아직 좋아요받아오는건 못함 api필요) * [feat] 게시물 수정 * [feat] 글 수정 * [refactor] 코드 조금정리 * [feat] 작성자본인만 글수정삭제 * [feat]글 삭제기능 * [feat] 칵테일태그 * [fix]칵테일, 쉐어 기능 * 수 라우터, 비로그인처리 * 타입 수정 * 타입 수정 * 타입수정 * 타입수정 * 타입수정 * 오류수정 * 오류수정 * 오류수정 * 오류수정 * 오류수정 * 충돌해결 * 오류 수정 * 오류 수정 * 오류 수정 * [fix] 이미지 카운트, 10개 제한 * [fix] 글쓰기 placeholder * [fix] 공유 url 수정 * [fix] 프로필배경 지우기 * [fix] 플로팅탭 미디어쿼리 수정 * [fix] 수정 모달 * 댓글실시간반영 시도 * 수정 * [fix] 수정모달 로직 수정 * 수정로직 수정 * [feat] edit수정 * 타입오류 * [feat] 좋아요로직 수정 * [fix] 칵테일태그 너비 수정 * 글쓰기 로그인검사 * 버그들 수정 * 반응형 * 파일명 대문자수정 * 모바일 이미지 * 메인 수정 * 3d모델 * 메인 수정 * 아래칵테일잔수정
1 parent c99fd87 commit 49a5fbd

File tree

14 files changed

+59
-284
lines changed

14 files changed

+59
-284
lines changed

src/app/(main)/layout.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
import FooterWrapper from '@/shared/components/footer/FooterWrapper';
21
import Header from '@/shared/components/header/Header';
32

43
function NoLayout({ children }: { children: React.ReactNode }) {
54
return (
65
<>
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" />
6+
<Header
7+
isMain={true}
8+
className="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"
9+
/>
810
<main className="flex flex-1">{children}</main>
9-
<FooterWrapper />
1011
</>
1112
);
1213
}

src/domains/main/cocktailDrop/CocktailDrop.tsx

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,23 @@ function CocktailDrop({ isDesktop = false }: CocktailDropProps) {
4444
);
4545

4646
// 로고 위에서 아래로 자연스럽게 등장
47+
const screenWidth = window.innerWidth;
48+
const viewportHeight = window.innerHeight;
49+
const isTablet = screenWidth >= 640 && screenWidth < 1024;
50+
const isMobile = screenWidth < 640;
51+
52+
// 뷰포트 높이 기반으로 로고 위치 계산
53+
const logoFinalY = isMobile
54+
? `-${viewportHeight * 0.3}px`
55+
: isTablet
56+
? `-${viewportHeight * -0.8}px`
57+
: '0px';
58+
4759
gsap.fromTo(
4860
logoRef.current,
4961
{ y: -300, opacity: 0 },
5062
{
51-
y: !isDesktop ? -230 : -18, // 데스크톱이 아닐 때 더 위로
63+
y: logoFinalY, // 뷰포트 높이 기반 계산
5264
opacity: 1,
5365
duration: 3,
5466
ease: 'power3.out',
@@ -69,7 +81,7 @@ function CocktailDrop({ isDesktop = false }: CocktailDropProps) {
6981
return (
7082
<div
7183
ref={containerRef}
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"
84+
className="relative w-full lg:min-h-[120vh] md:min-h-[95vh] min-h-[87vh] flex flex-col lg:justify-center md:justify-center justify-end items-center mt-10 overflow-hidden"
7385
id="scroll-fixed"
7486
>
7587
{/* 대각선 줄 1 */}
@@ -84,7 +96,7 @@ function CocktailDrop({ isDesktop = false }: CocktailDropProps) {
8496
/>
8597

8698
{/* 로고 */}
87-
<div ref={logoRef} className="absolute md:w-115 w-85 md:h-90 h-40">
99+
<div ref={logoRef} className="absolute z-4 md:w-115 w-65 md:h-90 h-40">
88100
<Image
89101
src="/logo.svg"
90102
alt="로고 이미지"
@@ -95,20 +107,17 @@ function CocktailDrop({ isDesktop = false }: CocktailDropProps) {
95107
/>
96108
</div>
97109

98-
<div className="w-full md:h-90 h-30"></div>
99-
100110
{/* 컵 이미지 - 모바일에서 바닥에 붙도록 */}
101-
<div className="md:relative absolute bottom-0">
111+
<div className="z-5 absolute bottom-0">
102112
<Image
103113
src={Cocktailcup}
104114
alt="칵테일 컵"
105-
width={900}
106-
height={700}
107115
priority
108-
className="md:w-auto md:h-auto w-[500px] h-[400px] object-cover"
116+
style={{ height: 'auto' }}
117+
className="md:w-[700px] w-[500px] object-contain"
109118
/>
110119
</div>
111-
<div className="absolute md:bottom-35 bottom-20 flex items-center justify-center z-3 w-full">
120+
<div className="absolute md:bottom-35 bottom-20 flex items-center justify-center z-10 w-full">
112121
<PassBtn />
113122
</div>
114123
</div>

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import Image from 'next/image';
33
function HomeLogo({ isDesktop }: { isDesktop: boolean }) {
44
return (
55
<div
6-
className="z-5 absolute md:top-8 md:left-10 md:translate-none top-13 left-1/2 -translate-x-1/2"
7-
style={{ width: !isDesktop ? 400 : 700, height: !isDesktop ? 70 : 240 }}
6+
className="z-5 absolute md:top-22 md:left-10 md:translate-none top-30 left-1/2 -translate-x-1/2"
7+
style={{ width: !isDesktop ? 400 : 580, height: !isDesktop ? 70 : 210 }}
88
>
99
<Image src={'/logo.svg'} alt="로고 이미지" fill priority className="object-contain" />
1010
</div>

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ function Model({ onLoaded }: Props) {
4242
return (
4343
<primitive
4444
object={scene}
45-
scale={5.8}
46-
position={[0, -1.2, 0]}
45+
scale={4.6}
46+
position={[0, -0.6, 0]}
4747
rotation={[-0.15, Math.PI + 3, 0]}
4848
/>
4949
);

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ function HomeText({ isDesktop }: { isDesktop: boolean }) {
22
return (
33
<>
44
{!isDesktop ? (
5-
<p className="absolute top-32 text-sm left-1/2 -translate-x-1/2 whitespace-nowrap">
6-
어떤 칵테일이 끌리시나요? SSoul이 쉽게 골라드릴게요.
5+
<p className="absolute top-48 text-sm left-1/2 -translate-x-1/2 text-center mt-4">
6+
어떤 칵테일이 끌리시나요? <br />
7+
SSoul이 쉽게 골라드릴게요.
78
</p>
89
) : (
910
<p className="absolute bottom-45 right-12 font-serif text-xl text-right font-normal z-20">

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ function ModelImage({ onLoaded }: Props) {
1919
width={260}
2020
height={290}
2121
priority
22-
className="object-cover w-[300px] h-[390px]"
22+
className="object-cover w-[300px] h-[350px]"
2323
/>
2424
</div>
2525
</div>

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

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ function StarMain() {
1414
useEffect(() => {
1515
if (!background.current || !foreground.current) return;
1616

17+
// 모바일에서는 별 애니메이션 비활성화
18+
const isMobile = window.innerWidth < 768;
19+
if (isMobile) return;
20+
1721
const bgX = gsap.quickSetter(background.current, 'x', 'px');
1822
const bgY = gsap.quickSetter(background.current, 'y', 'px');
1923
const bgRotate = gsap.quickSetter(background.current, 'rotate', 'deg');
@@ -43,20 +47,11 @@ function StarMain() {
4347
mouse.current = { x, y };
4448
};
4549

46-
const handleTouchMove = (e: TouchEvent) => {
47-
const touch = e.touches[0];
48-
const x = (touch.clientX / window.innerWidth - 0.5) * 2;
49-
const y = (touch.clientY / window.innerHeight - 0.5) * 2;
50-
mouse.current = { x, y };
51-
};
52-
5350
window.addEventListener('mousemove', handleMouseMove);
54-
window.addEventListener('touchmove', handleTouchMove);
5551
rafId.current = requestAnimationFrame(update);
5652

5753
return () => {
5854
window.removeEventListener('mousemove', handleMouseMove);
59-
window.removeEventListener('touchmove', handleTouchMove);
6055
if (rafId.current) cancelAnimationFrame(rafId.current);
6156
};
6257
}, []);

src/domains/mypage/components/pages/my-active/MyLike.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ function MyLike() {
2020
fetchLike();
2121
}, []);
2222

23+
useEffect(() => {
24+
console.log(myLike);
25+
}, [myLike]);
26+
2327
return (
2428
<section className="flex justify-center">
2529
{myLike.length > 0 ? (

src/domains/shared/components/3d/HomeBackground.tsx

Lines changed: 0 additions & 27 deletions
This file was deleted.

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

Lines changed: 0 additions & 96 deletions
This file was deleted.

0 commit comments

Comments
 (0)