Skip to content

Commit a789f65

Browse files
committed
[style] 메인페이지 반응형
1 parent 08f42a9 commit a789f65

24 files changed

+265
-260
lines changed

src/app/page.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import Landing from '@/domains/shared/components/3d/Landing';
22

3-
import MainSlide from "@/domains/main/components/mainSlide/components/MainSlide";
4-
3+
import MainSlide from '@/domains/main/components/mainSlide/components/MainSlide';
54

65
export default function Home() {
76
return (
87
<div className="page-layout max-w-full">
9-
<h1>메인페이지</h1>
8+
<Landing />
9+
<MainSlide />
1010
</div>
1111
);
1212
}

src/domains/main/components/mainSlide/components/MainSlideAbv.tsx

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,37 +7,36 @@ import Ssury6 from '@/shared/assets/ssury/ssury_level6.webp';
77
import MainSsuryDrunk from './MainSsuryDrunk';
88

99
function MainSlideAbv() {
10-
1110
const SSURY_DRUNK = [
1211
{
1312
id: 1,
1413
src: Ssury1,
15-
abv:5
14+
abv: 5,
1615
},
1716
{
1817
id: 2,
1918
src: Ssury2,
20-
abv:11
19+
abv: 11,
2120
},
2221
{
2322
id: 3,
2423
src: Ssury3,
25-
abv:26
24+
abv: 26,
2625
},
2726
{
2827
id: 4,
2928
src: Ssury4,
30-
abv:46
29+
abv: 46,
3130
},
3231
{
3332
id: 5,
3433
src: Ssury5,
35-
abv:66
34+
abv: 66,
3635
},
3736
{
3837
id: 6,
3938
src: Ssury6,
40-
abv:86
39+
abv: 86,
4140
},
4241
];
4342

@@ -70,4 +69,4 @@ function MainSlideAbv() {
7069
</div>
7170
);
7271
}
73-
export default MainSlideAbv
72+
export default MainSlideAbv;

src/domains/main/components/mainSlide/components/MainSlideCommunity.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
function MainSlideCommunity() {
22
return (
33
<div className="slide-content w-3/5 h-full p-15 bg-[#77688d] rounded-tl-[30px] rounded-bl-[30px] flex flex-col justify-center">
4-
54
<div className="flex flex-col justify-center">
65
<div className="flex flex-col gap-15">
76
<span className="text-[32px] font-black">2</span>
@@ -19,8 +18,7 @@ function MainSlideCommunity() {
1918
</div>
2019
<span className="h-[250px]"></span>
2120
</div>
22-
2321
</div>
2422
);
2523
}
26-
export default MainSlideCommunity
24+
export default MainSlideCommunity;

src/domains/main/components/mainSlide/components/MainSlideDummyCard.tsx

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,24 @@
11
import Keep from '@/shared/assets/icons/keep_36.svg';
2-
import Image from 'next/image'
2+
import Image from 'next/image';
33

44
interface Props {
5-
id:number
6-
src: string
7-
cocktailName:string
5+
id: number;
6+
src: string;
7+
cocktailName: string;
88
}
99

10-
function MainSlideDummyCard({ src,cocktailName}:Props) {
10+
function MainSlideDummyCard({ src, cocktailName }: Props) {
1111
return (
1212
<div className="relative flex flex-col w-full min-w-[150px] rounded-2xl overflow-hidden bg-white shadow-[0_0_12px_rgba(255,255,255,0.4)]">
1313
<div className="relative w-full h-[100px]">
14-
<Image
15-
src={src}
16-
fill
17-
className="object-cover"
18-
alt=""
19-
sizes="100px"
20-
priority
21-
/>
14+
<Image src={src} fill className="object-cover" alt="" sizes="100px" priority />
2215
</div>
2316

2417
<div className="p-3 flex flex-col gap-1 text-center">
2518
<strong className="text-black text-lg">{cocktailName}</strong>
2619
<span className="text-gray-500 text-sm">+ 상세보기</span>
2720
</div>
28-
<Keep className="absolute top-2 right-2" fill='transparent'/>
21+
<Keep className="absolute top-2 right-2" fill="transparent" />
2922
</div>
3023
);
3124
}
Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
1-
import background from '@/shared/assets/images/main_slide.webp'
2-
import Image from 'next/image'
1+
import background from '@/shared/assets/images/main_slide.webp';
2+
import Image from 'next/image';
33

44
function MainSlideIntro() {
55
return (
66
<div className="relative w-full p-12 h-full">
7-
<Image src={background} alt='' fill className='-z-1'/>
7+
<Image src={background} alt="" fill className="-z-1" />
88
<div className="flex flex-col gap-8">
99
<h2 className="text-3xl lg:text-5xl font-bold leading-[1.5] text-secondary text-shadow-[0_4px_6px_rgb(255_255_255_/0.25)]">
1010
칵테일 <br /> 누구나 쉽게 즐길 수 있어요
1111
</h2>
12-
<p className="text-2xl font-normal">SSOUL의 재밌고 다양한 기능들로 더 친근하게 접해보세요</p>
12+
<p className="text-2xl font-normal">
13+
SSOUL의 재밌고 다양한 기능들로 더 친근하게 접해보세요
14+
</p>
1315
</div>
1416
</div>
1517
);
1618
}
17-
export default MainSlideIntro
19+
export default MainSlideIntro;
Lines changed: 33 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,51 @@
1-
import MainTestDummy from "./MainTestDummy";
1+
import MainTestDummy from './MainTestDummy';
22

33
const DUMMY_TEST = [
44
{
55
id: 1,
66
message: '질문형 취향 찾기',
7-
active:false
7+
active: false,
88
},
99
{
1010
id: 2,
11-
message:'단계별 취향 찾기',
12-
active:true
13-
}
14-
]
15-
16-
11+
message: '단계별 취향 찾기',
12+
active: true,
13+
},
14+
];
1715

1816
function MainSlideTest() {
1917
return (
2018
<div className="slide-content w-3/4 p-12 h-full bg-[#645a72] rounded-tl-[30px] rounded-bl-[30px] flex flex-col justify-center ">
21-
19+
<div className="flex flex-col gap-15">
20+
<span className="text-[32px] font-black text-secondary">1</span>
2221
<div className="flex flex-col gap-15">
23-
<span className="text-[32px] font-black text-secondary">1</span>
24-
<div className="flex flex-col gap-15">
25-
<div className="flex flex-col gap-5">
26-
<h2 className=" text-5xl font-black text-secondary text-shadow text-shadow-[0_4px_6px_rgb(255_255_255_/0.25)]">
27-
AI기반 취향테스트
28-
</h2>
29-
<p className="text-2xl leading-[1.5] font-normal text-secondary">
30-
복잡한 이름과 긴 설명 때문에 내 취향 칵테일 찾기 어려우셨나요? <br />
31-
AI쑤리가 당신에게 딱 맞는 칵테일을 추천해 드려요!
32-
</p>
33-
</div>
34-
<ul className="flex gap-8">
35-
<MainTestDummy
36-
message={
37-
<>
38-
안녕하세요! 🍹바텐더 쑤리에요.
39-
<br />
40-
취향에 맞는 칵테일을 추천해드릴게요. <br />
41-
어떤 유형으로 찾아드릴까요?
42-
</>
43-
}
44-
option={DUMMY_TEST}
45-
type="option"
46-
/>
47-
<MainTestDummy type="text" />
48-
</ul>
22+
<div className="flex flex-col gap-5">
23+
<h2 className=" text-5xl font-black text-secondary text-shadow text-shadow-[0_4px_6px_rgb(255_255_255_/0.25)]">
24+
AI기반 취향테스트
25+
</h2>
26+
<p className="text-2xl leading-[1.5] font-normal text-secondary">
27+
복잡한 이름과 긴 설명 때문에 내 취향 칵테일 찾기 어려우셨나요? <br />
28+
AI쑤리가 당신에게 딱 맞는 칵테일을 추천해 드려요!
29+
</p>
4930
</div>
31+
<ul className="flex gap-8">
32+
<MainTestDummy
33+
message={
34+
<>
35+
안녕하세요! 🍹바텐더 쑤리에요.
36+
<br />
37+
취향에 맞는 칵테일을 추천해드릴게요. <br />
38+
어떤 유형으로 찾아드릴까요?
39+
</>
40+
}
41+
option={DUMMY_TEST}
42+
type="option"
43+
/>
44+
<MainTestDummy type="text" />
45+
</ul>
5046
</div>
51-
47+
</div>
5248
</div>
5349
);
5450
}
55-
export default MainSlideTest
51+
export default MainSlideTest;
Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,26 @@
1-
import Image, { StaticImageData } from 'next/image'
1+
import Image, { StaticImageData } from 'next/image';
22

3-
interface Props{
4-
src: StaticImageData
5-
abv:number
3+
interface Props {
4+
src: StaticImageData;
5+
abv: number;
66
}
77
function MainSsuryDrunk({ src, abv }: Props) {
8-
const className = (abv:number) => {
8+
const className = (abv: number) => {
99
switch (abv) {
10-
case 5: return 'text-stone-100'
11-
case 11: return 'text-rose-100'
12-
case 26: return 'text-rose-50'
13-
case 46: return 'text-rose-200'
14-
case 66 : return 'text-rose-300'
15-
case 86 : return 'text-red-600'
10+
case 5:
11+
return 'text-stone-100';
12+
case 11:
13+
return 'text-rose-100';
14+
case 26:
15+
return 'text-rose-50';
16+
case 46:
17+
return 'text-rose-200';
18+
case 66:
19+
return 'text-rose-300';
20+
case 86:
21+
return 'text-red-600';
1622
}
17-
}
23+
};
1824
return (
1925
<div className="flex flex-col items-center gap-1">
2026
<p className={`text-lg sm:text-3xl font-bold ${className(abv)}`}>
@@ -29,4 +35,4 @@ function MainSsuryDrunk({ src, abv }: Props) {
2935
</div>
3036
);
3137
}
32-
export default MainSsuryDrunk
38+
export default MainSsuryDrunk;

src/domains/main/components/mainSlide/components/MainTestDummy.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ import Ssury from '@/shared/assets/ssury/ssury_shaker.webp';
33
import clsx from 'clsx';
44
import MainSlideDummyCard from './MainSlideDummyCard';
55
type Dummy = {
6-
id: number,
7-
message: string,
8-
active:boolean
9-
}
6+
id: number;
7+
message: string;
8+
active: boolean;
9+
};
1010

11-
interface Props{
12-
message?: React.ReactNode
13-
option?: Dummy[]
14-
type:'text'|'option'
11+
interface Props {
12+
message?: React.ReactNode;
13+
option?: Dummy[];
14+
type: 'text' | 'option';
1515
}
1616

1717
const DUMMY_CARD = [
@@ -32,7 +32,7 @@ const DUMMY_CARD = [
3232
},
3333
];
3434

35-
function MainTestDummy({ message, option, type}:Props) {
35+
function MainTestDummy({ message, option, type }: Props) {
3636
return (
3737
<li className="flex flex-col justify-end gap-2">
3838
<header className="flex items-end">

src/domains/main/components/mainSlide/components/mobile/MobileAbv.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import Ssury5 from '@/shared/assets/ssury/ssury_level5.webp';
66
import Ssury6 from '@/shared/assets/ssury/ssury_level6.webp';
77
import MainSsuryDrunk from '../MainSsuryDrunk';
88

9-
109
function MobileAbv() {
1110
const SSURY_DRUNK = [
1211
{
Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
import Image from 'next/image'
1+
import Image from 'next/image';
22
import background from '@/shared/assets/images/main_slide.webp';
33
import MobileSlideTest from './MobileSlideTest';
44
import MobileSlideCommunity from './MobileSlideCommunity';
55
import MobileAbv from './MobileAbv';
66

7-
87
function MobileSlide() {
98
return (
109
<div>
@@ -15,12 +14,12 @@ function MobileSlide() {
1514
<p className="md:text-2xl font-normal">
1615
SSOUL의 재밌고 다양한 기능들로 더 친근하게 접해보세요
1716
</p>
18-
<div className='flex flex-col gap-10 mt-8'>
17+
<div className="flex flex-col gap-10 mt-8">
1918
<MobileSlideTest />
2019
<MobileSlideCommunity />
21-
<MobileAbv/>
20+
<MobileAbv />
2221
</div>
2322
</div>
2423
);
2524
}
26-
export default MobileSlide
25+
export default MobileSlide;

0 commit comments

Comments
 (0)