Skip to content

Commit d416eb8

Browse files
authored
Merge pull request #48 from dorimu0/feat/component-intro
紹介ページ、ログインモーダルcomponentレイアウトの作成
2 parents 820220a + a28e549 commit d416eb8

File tree

12 files changed

+198
-0
lines changed

12 files changed

+198
-0
lines changed

public/images/login/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export const logo = '/images/login/logo.png';

public/images/login/logo.png

29.2 KB
Loading

public/svgs/intro/MainImg.svg

Lines changed: 35 additions & 0 deletions
Loading

public/svgs/intro/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export const introImg = '/svgs/intro/MainImg.svg';

public/svgs/login/google.svg

Lines changed: 10 additions & 0 deletions
Loading

public/svgs/login/index.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
const svgs = {
2+
login: '/svgs/login/login.svg',
3+
google: '/svgs/login/google.svg',
4+
yahoo: '/svgs/login/yahoo.svg',
5+
line: '/svgs/login/line.svg',
6+
};
7+
8+
export default svgs;

public/svgs/login/line.svg

Lines changed: 6 additions & 0 deletions
Loading

public/svgs/login/login.svg

Lines changed: 9 additions & 0 deletions
Loading

public/svgs/login/yahoo.svg

Lines changed: 15 additions & 0 deletions
Loading

src/app/intro/components/login.tsx

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
import Image from 'next/image';
2+
import {ModalProps} from '@/src/interfaces/intro';
3+
import svgs from '@/public/svgs/login';
4+
import {logo} from '@/public/images/login';
5+
6+
export default function Login({onClose}: ModalProps) {
7+
return (
8+
<div className="fixed inset-0 flex items-center justify-center bg-black bg-opacity-50">
9+
<div className=" bg-white rounded-lg w-1/2 h-3/5 py-10 box-border">
10+
<div className="w-full h-full flex items-center box-border">
11+
{/* LEFT */}
12+
<div className="w-3/5 text-center">
13+
<div className="text-3xl font-semibold">Welcome to Minori</div>
14+
<div className="text-sm text-neutral-400 my-2">
15+
Get started - it free. No credit card needed.
16+
</div>
17+
<Image
18+
src={svgs.login}
19+
alt="logo"
20+
width={450}
21+
height={450}
22+
className="m-auto mb-0"
23+
/>
24+
</div>
25+
{/* RIGHT */}
26+
<div className="w-2/5">
27+
<div className="w-4/5 text-sm">
28+
<Image
29+
src={logo}
30+
alt="logo"
31+
width={250}
32+
height={250}
33+
className="m-auto w-4/5 "
34+
/>
35+
<div className="my-5">
36+
<button className="block m-auto border-2 w-full flex items-center justify-between px-10 py-2 m-auto my-3">
37+
<Image
38+
src={svgs.google}
39+
alt="google"
40+
width={15}
41+
height={15}
42+
/>
43+
<div className="ml-2 text-center w-full">
44+
Continue with Google
45+
</div>
46+
</button>
47+
<button className="block m-auto border-2 w-full flex items-center justify-between px-10 py-2 m-auto my-3">
48+
<Image src={svgs.yahoo} alt="google" width={15} height={15} />
49+
<div className="ml-2 text-center w-full">
50+
Continue with Yahoo
51+
</div>
52+
</button>
53+
<button className="block m-auto border-2 w-full flex items-center justify-between px-10 py-2 m-auto my-3">
54+
<Image src={svgs.line} alt="google" width={15} height={15} />
55+
<div className="ml-2 text-center w-full">
56+
Continue with Line
57+
</div>
58+
</button>
59+
</div>
60+
<div className="w-1/5"></div>
61+
</div>
62+
</div>
63+
</div>
64+
<button
65+
onClick={onClose}
66+
className="px-4 py-2 bg-blue-500 text-white rounded"
67+
>
68+
닫기
69+
</button>
70+
</div>
71+
</div>
72+
);
73+
}

src/app/intro/page.tsx

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
'use client';
2+
import {introImg} from '@/public/svgs/intro';
3+
import {useState} from 'react';
4+
import Image from 'next/image';
5+
import Login from './component/login';
6+
7+
export default function Page() {
8+
const [isOpen, setIsOpen] = useState(false);
9+
10+
const openModal = () => {
11+
setIsOpen(true);
12+
};
13+
14+
const onClose = () => {
15+
setIsOpen(false);
16+
};
17+
return (
18+
<main className="flex min-h-screen flex-col items-center p-24">
19+
<div className="text-5xl font-semibold text-center">
20+
Make your collateral more efficient, <br /> more accessible.
21+
</div>
22+
<div className="m-4 font-semibold text-gray-500">
23+
Minori makes it easier and more efficient to analyze data with LLM.
24+
</div>
25+
<div>
26+
<Image src={introImg} width={500} height={500} alt="mainImg" />
27+
</div>
28+
<button
29+
onClick={openModal}
30+
className="bg-indigo-600 text-white py-2 px-7 rounded-3xl"
31+
>
32+
Get Start
33+
</button>
34+
{isOpen && <Login onClose={onClose} />}
35+
</main>
36+
);
37+
}

src/interfaces/intro.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export interface ModalProps {
2+
onClose: () => void;
3+
}

0 commit comments

Comments
 (0)