Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RM-30-3]homepage UI수정 #83

Merged
merged 2 commits into from
May 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 4 additions & 27 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,42 +2,19 @@
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<link rel="icon" href="%PUBLIC_URL%/logo.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Web site created using create-react-app"
/>
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="apple-touch-icon" href="%PUBLIC_URL%/images/rm-logo.png" />
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React App</title>
<title>Readme monster</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<noscript>Readme 작성을 더 쉽고 편리하게</noscript>
<div id="root"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
</html>
Binary file added public/logo.ico
Binary file not shown.
2 changes: 1 addition & 1 deletion public/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "Create React App Sample",
"icons": [
{
"src": "favicon.ico",
"src": "logo.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
}
Expand Down
102 changes: 47 additions & 55 deletions src/pages/HomePage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,40 +14,36 @@ interface ButtonProps {

function HomePage() {
return (
<div className="dark:bg-gradient-dark w-full h-[calc(100vh-80px)] flex flex-col items-center justify-center gap-[20px]">
<div className="flex-Center flex-col" data-testid="home">
<img alt="로고" src="/images/rm-logo.png" width="150" height="150" data-testid="logo" />
<span className="text-textPrimary dark:text-textWhite text-3xl md:text-6xl sm:text-5xl font-bold line-lg" data-testid="title">
README-MONSTER
</span>
<p
className="max-w-md mx-auto mt-3 text-textSecondary display-contents sm:text-lg md:mt-5 md:text-xl md:max-w-3xl"
data-testid="description"
>
<span>당신의 프로젝트 README를</span>
<span>자동으로 만들 수 있는 가장 빠르고 쉬운 방법</span>
<div className="bg-gradient-test dark:bg-gradient-dark w-full h-[calc(100vh-80px)] mx-auto max-w-screen-xl px-4 py-32 lg:flex lg:h-screen lg:items-center">
<div className="mx-auto max-w-xl text-center" data-testid="home">
<h1 className="text-3xl font-extrabold sm:text-5xl text-textPrimary dark:text-textWhite" data-testid="title">
README-MONSTER<br/>
<strong className="font-extrabold text-textBlue sm:block">Builder & Generator</strong>
</h1>
<p className="mt-4 sm:text-xl/relaxed text-textSecondary" data-testid="description">
사용자가 직관적인 인터페이스를 통해 README 파일을 쉽게 구성할 수 있게 도와주고, 생성형 AI를 이용해 적절한 README 구성을 추천합니다
</p>
</div>
<div className="flex flex-row gap-[20px]" data-testid="button">
<Button
url="/editor"
color="text-white"
backgroundColor="bg-textBlue"
dark="bg-darkSecondary"
hover="hover:bg-textBlueHover"
description="시작하기"
testId="firstButton"
/>
<Button
url="/signup"
color="text-textPrimary"
backgroundColor="bg-gray-200"
dark="bg-gray-200"
hover="hover:bg-textgreyHover"
description="더 알아보기"
testId="secondButton"
/>
<AiGenerator />
<div className="mt-8 flex flex-wrap justify-center gap-4" data-testid="button">
<Button
url="/editor"
color="text-white"
backgroundColor="bg-textBlue"
dark="bg-darkPrimary"
hover="hover:bg-textBlueHover"
description="시작하기"
testId="firstButton"
/>
<Button
url="/signup"
color="text-textPrimary"
backgroundColor="bg-gray-200"
dark="bg-gray-200"
hover="hover:bg-textgreyHover"
description="더 알아보기"
testId="secondButton"
/>
<AiGenerator />
</div>
</div>
</div>
);
Expand All @@ -62,27 +58,23 @@ export function Button({ url, color, backgroundColor, description, hover, dark,
};

return (
<div className="flex flex-col items-center">
<span className="inline-flex rounded-md shadow">
<div
className={`
inline-flex items-center px-4 py-2
font-medium text-xl
${backgroundColor}
${hover}
border-transparent rounded-lg
dark:${dark}
${color}
w-[250px] h-[54px]
justify-center
cursor-pointer
`}
onClick={handleClick}
data-testid={testId}
>
{description}
</div>
</span>
<div
className={`
block w-full rounded shadow
inline-flex items-center px-12 py-3
${backgroundColor} dark:${dark}
${color} ${hover}
font-medium text-sm
cursor-pointer
focus:outline-none focus:ring sm:w-auto
w-[270px] h-[54px]
justify-center

`}
onClick={handleClick}
data-testid={testId}
>
{description}
</div>
);
}
}
2 changes: 2 additions & 0 deletions tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@ module.exports = {
textBlack: "#000000",
darkPrimary: "#1e2937",
darkSecondary: "#374152",
darkTertiary:"#222222",
},
backgroundImage: {
'gradient-dark': 'linear-gradient(#1e2937, #556274) !important', // 새 그라데이션 추가
'gradient-test': 'linear-gradient(white, #4B88FF) !important',
},
screens: {
mobile: "768px",
Expand Down
Loading