Skip to content

Commit ca1f8cb

Browse files
committed
[style]pageHeader컴포넌트
1 parent 75b0ab4 commit ca1f8cb

File tree

6 files changed

+45
-6
lines changed

6 files changed

+45
-6
lines changed

src/app/design-system/page.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import Share from '@/shared/components/share/Share';
1414
import Keep from '@/shared/components/keep/Keep';
1515
import Spinner from '@/shared/components/spinner/Spinner';
1616

17-
1817
function Page() {
1918
const [isModalOpen, setModalOpen] = useState(false);
2019
const [isConfirmOpen, setConfirmOpen] = useState(false);

src/app/recipe/page.tsx

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,22 @@
1-
import Image from 'next/image'
2-
import Star from '@/shared/assets/images/star_2.webp'
1+
import PageHeader from '@/shared/components/pageHeader/PageHeader';
2+
import { Metadata } from 'next';
3+
import Glass from '@/shared/assets/images/recipe_page_header.png';
4+
5+
export const metadata: Metadata = {
6+
title: 'SSOUL | 칵테일레시피',
7+
description: '칵테일 레시피가 궁금하신 분들을 위한 레시피 페이지',
8+
};
9+
310
function Page() {
411
return (
5-
<div className="page-layout max-w-1224">
6-
<Image src={Star}></Image>
12+
<div className="w-full">
13+
<PageHeader
14+
src={Glass}
15+
title="Cocktail Recipes"
16+
description="다양하고 재밌는 칵테일 레시피"
17+
/>
18+
<div className="page-layout max-w-1224"></div>
719
</div>
8-
)
20+
);
921
}
1022
export default Page;
224 KB
Loading
-4.51 KB
Binary file not shown.
2.04 KB
Loading
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import Star from '@/shared/assets/images/star_bg.webp';
2+
import Image, { StaticImageData } from 'next/image';
3+
4+
interface Props {
5+
src: StaticImageData;
6+
title: string;
7+
description: string;
8+
}
9+
10+
function PageHeader({ src, title, description }: Props) {
11+
return (
12+
<div
13+
className="h-100 w-full bg-repeat relative"
14+
style={{
15+
backgroundImage: `url(${Star.src})`,
16+
}}
17+
>
18+
<div className="absolute bottom-0 left-1/2 -translate-x-1/2">
19+
<Image src={src} alt="" />
20+
<div className="text-center text-nowrap font-serif font-bold flex flex-col absolute bottom-[55px]">
21+
<h2 className="text-[64px]">{title}</h2>
22+
<p className="text-2xl">{description}</p>
23+
</div>
24+
</div>
25+
</div>
26+
);
27+
}
28+
export default PageHeader;

0 commit comments

Comments
 (0)