Skip to content

Commit

Permalink
Merge pull request #48 from dorimu0/feat/component-intro
Browse files Browse the repository at this point in the history
紹介ページ、ログインモーダルcomponentレイアウトの作成
  • Loading branch information
Lainari authored Feb 22, 2024
2 parents 820220a + a28e549 commit d416eb8
Show file tree
Hide file tree
Showing 12 changed files with 198 additions and 0 deletions.
1 change: 1 addition & 0 deletions public/images/login/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const logo = '/images/login/logo.png';
Binary file added public/images/login/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 35 additions & 0 deletions public/svgs/intro/MainImg.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions public/svgs/intro/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const introImg = '/svgs/intro/MainImg.svg';
10 changes: 10 additions & 0 deletions public/svgs/login/google.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions public/svgs/login/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
const svgs = {
login: '/svgs/login/login.svg',
google: '/svgs/login/google.svg',
yahoo: '/svgs/login/yahoo.svg',
line: '/svgs/login/line.svg',
};

export default svgs;
6 changes: 6 additions & 0 deletions public/svgs/login/line.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions public/svgs/login/login.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions public/svgs/login/yahoo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
73 changes: 73 additions & 0 deletions src/app/intro/components/login.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
import Image from 'next/image';
import {ModalProps} from '@/src/interfaces/intro';
import svgs from '@/public/svgs/login';
import {logo} from '@/public/images/login';

export default function Login({onClose}: ModalProps) {
return (
<div className="fixed inset-0 flex items-center justify-center bg-black bg-opacity-50">
<div className=" bg-white rounded-lg w-1/2 h-3/5 py-10 box-border">
<div className="w-full h-full flex items-center box-border">
{/* LEFT */}
<div className="w-3/5 text-center">
<div className="text-3xl font-semibold">Welcome to Minori</div>
<div className="text-sm text-neutral-400 my-2">
Get started - it free. No credit card needed.
</div>
<Image
src={svgs.login}
alt="logo"
width={450}
height={450}
className="m-auto mb-0"
/>
</div>
{/* RIGHT */}
<div className="w-2/5">
<div className="w-4/5 text-sm">
<Image
src={logo}
alt="logo"
width={250}
height={250}
className="m-auto w-4/5 "
/>
<div className="my-5">
<button className="block m-auto border-2 w-full flex items-center justify-between px-10 py-2 m-auto my-3">
<Image
src={svgs.google}
alt="google"
width={15}
height={15}
/>
<div className="ml-2 text-center w-full">
Continue with Google
</div>
</button>
<button className="block m-auto border-2 w-full flex items-center justify-between px-10 py-2 m-auto my-3">
<Image src={svgs.yahoo} alt="google" width={15} height={15} />
<div className="ml-2 text-center w-full">
Continue with Yahoo
</div>
</button>
<button className="block m-auto border-2 w-full flex items-center justify-between px-10 py-2 m-auto my-3">
<Image src={svgs.line} alt="google" width={15} height={15} />
<div className="ml-2 text-center w-full">
Continue with Line
</div>
</button>
</div>
<div className="w-1/5"></div>
</div>
</div>
</div>
<button
onClick={onClose}
className="px-4 py-2 bg-blue-500 text-white rounded"
>
닫기
</button>
</div>
</div>
);
}
37 changes: 37 additions & 0 deletions src/app/intro/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
'use client';
import {introImg} from '@/public/svgs/intro';
import {useState} from 'react';
import Image from 'next/image';
import Login from './component/login';

export default function Page() {
const [isOpen, setIsOpen] = useState(false);

const openModal = () => {
setIsOpen(true);
};

const onClose = () => {
setIsOpen(false);
};
return (
<main className="flex min-h-screen flex-col items-center p-24">
<div className="text-5xl font-semibold text-center">
Make your collateral more efficient, <br /> more accessible.
</div>
<div className="m-4 font-semibold text-gray-500">
Minori makes it easier and more efficient to analyze data with LLM.
</div>
<div>
<Image src={introImg} width={500} height={500} alt="mainImg" />
</div>
<button
onClick={openModal}
className="bg-indigo-600 text-white py-2 px-7 rounded-3xl"
>
Get Start
</button>
{isOpen && <Login onClose={onClose} />}
</main>
);
}
3 changes: 3 additions & 0 deletions src/interfaces/intro.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export interface ModalProps {
onClose: () => void;
}

0 comments on commit d416eb8

Please sign in to comment.