Skip to content

Commit

Permalink
refactor: use tailwind primary color
Browse files Browse the repository at this point in the history
  • Loading branch information
2paperstar committed Feb 15, 2024
1 parent 398aa9b commit 504c815
Show file tree
Hide file tree
Showing 10 changed files with 315 additions and 205 deletions.
50 changes: 37 additions & 13 deletions src/pages/Join.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,41 @@ import Input from './component/Input';
import Header from './component/Header';

export default function Join() {
return (
<div className='h-[100vh]'>
<Header text='회원가입' back={true} border={true} />
<div className='relative mx-[10%] pt-[50px] h-[100%]'>
<Input type="text" text='abcde@gmail.com' label='이메일' errorMsg='규칙에 맞는 이메일을 입력해주세요!' className='mt-[10%] h-[115px]'/>
<Input type="password" text='영어 대소문자, 숫자로 구성' label='비밀번호' className='h-[115px]'/>
<Input type="password" text='비밀번호 확인' label='비밀번호 확인' className='h-[115px]'/>
<Input type="text" text='닉네임 입' label='닉네임' errorMsg='중복된 닉네임 입니다!' className='h-[115px]'/>
<Btn text="가입하기" className="bg-[#2E83F2] text-[#ffffff] absolute bottom-[5%] left-0"/>
</div>
</div>
);
return (
<div className="h-[100vh]">
<Header text="회원가입" back={true} border={true} />
<div className="relative mx-[10%] pt-[50px] h-[100%]">
<Input
type="text"
text="abcde@gmail.com"
label="이메일"
errorMsg="규칙에 맞는 이메일을 입력해주세요!"
className="mt-[10%] h-[115px]"
/>
<Input
type="password"
text="영어 대소문자, 숫자로 구성"
label="비밀번호"
className="h-[115px]"
/>
<Input
type="password"
text="비밀번호 확인"
label="비밀번호 확인"
className="h-[115px]"
/>
<Input
type="text"
text="닉네임 입"
label="닉네임"
errorMsg="중복된 닉네임 입니다!"
className="h-[115px]"
/>
<Btn
text="가입하기"
className="bg-primary text-[#ffffff] absolute bottom-[5%] left-0"
/>
</div>
</div>
);
}

27 changes: 18 additions & 9 deletions src/pages/JoinWay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,22 @@ import Btn from './component/Btn';
import LinkText from './component/LinkText';

export default function JoinWay() {
return (
<div className='mx-[10%] pt-[30%]'>
<h3 className='text-3xl leading-[250px] text-center font-bold'>회원가입 방법을 선택하세요!</h3>
<Btn text="이메일로 가입하기" className="bg-[#2E83F2] text-[#ffffff]"/>
<Btn text="카카오톡으로 가입하기" className="bg-[#F2DA00] text-[#282732] border border-[#E8E9EA]"/>
<LinkText className="leading-[80px] mb-[40px] justify-center" text='이미 회원이신가요?' LinkMsg='로그인' to='/Login' />
</div>
);
return (
<div className="mx-[10%] pt-[30%]">
<h3 className="text-3xl leading-[250px] text-center font-bold">
회원가입 방법을 선택하세요!
</h3>
<Btn text="이메일로 가입하기" className="bg-primary text-[#ffffff]" />
<Btn
text="카카오톡으로 가입하기"
className="bg-[#F2DA00] text-[#282732] border border-[#E8E9EA]"
/>
<LinkText
className="leading-[80px] mb-[40px] justify-center"
text="이미 회원이신가요?"
LinkMsg="로그인"
to="/Login"
/>
</div>
);
}

2 changes: 1 addition & 1 deletion src/pages/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default function Login() {
LinkMsg="비밀번호 재설정"
to="/Login"
/>
<Btn text="로그인" className="bg-[#2E83F2] text-[#ffffff]" />
<Btn text="로그인" className="bg-primary text-white" />
<Btn
text="카카오톡으로 로그인하기"
className="bg-[#F2DA00] text-[#282732] border border-[#E8E9EA]"
Expand Down
92 changes: 49 additions & 43 deletions src/pages/Review.tsx
Original file line number Diff line number Diff line change
@@ -1,53 +1,59 @@
import React from 'react';
import Header from './component/Header';
import { FaLocationArrow } from "react-icons/fa";
import { FaLocationArrow } from 'react-icons/fa';
import { Link } from 'react-router-dom';
import Category from './component/Category';
import Category from './component/Category';
import Grade from './component/Grade';
import Feel from './component/Feel';

import Feel from './component/Feel';

type ReviewProps = {
type: string;
profileImg: string;
profileUrl: string;
name: string;
videoImg?: string;
followChk?: boolean;
videoUrl: string;
Categorys: string[];
}
type: string;
profileImg: string;
profileUrl: string;
name: string;
videoImg?: string;
followChk?: boolean;
videoUrl: string;
Categorys: string[];
};

export default function Review() {
return (
<div className='h-[100vh]'>
<Header back={true} alarm={true} />
<div className='pt-[56px] h-[100%]'>
<div className="w-full h-[240px]">
<img className='w-full h-full object-cover' src="/assets/img.png" alt="" />
</div>
<div className="m-[3%]">

<div className="flex justify-between items-center ">
<h3 className='text-xl font-bold'>가게이름</h3>
<Link className='font-white bg-[#2E83F2] text-white px-8 py-2 rounded-2xl' to="/">리뷰 작성</Link>
</div>
<div className="flex items-center h-auto py-[15px] text-lg">
<FaLocationArrow className='mr-[10px] rotate-[270deg]'/>
<p>대전광역시 유성구 둔산동 어쩌구길 33</p>
</div>
<Grade grade={4.8}/>
<div className="flex">
<Category text="#가족" />
<Category text="#맛집" />
<Category text="#맛집" />
</div>
<Feel BadReview={['a','b','c']} GoodReview={['a','b','c']}/>
<div className="bar w-full h-[8px] bg-[#f5f5f5]"></div>
Thumbnail
</div>
</div>
return (
<div className="h-[100vh]">
<Header back={true} alarm={true} />
<div className="pt-[56px] h-[100%]">
<div className="w-full h-[240px]">
<img
className="w-full h-full object-cover"
src="/assets/img.png"
alt=""
/>
</div>
);
<div className="m-[3%]">
<div className="flex justify-between items-center ">
<h3 className="text-xl font-bold">가게이름</h3>
<Link
className="font-white bg-primary text-white px-8 py-2 rounded-2xl"
to="/"
>
리뷰 작성
</Link>
</div>
<div className="flex items-center h-auto py-[15px] text-lg">
<FaLocationArrow className="mr-[10px] rotate-[270deg]" />
<p>대전광역시 유성구 둔산동 어쩌구길 33</p>
</div>
<Grade grade={4.8} />
<div className="flex">
<Category text="#가족" />
<Category text="#맛집" />
<Category text="#맛집" />
</div>
<Feel BadReview={['a', 'b', 'c']} GoodReview={['a', 'b', 'c']} />
<div className="bar w-full h-[8px] bg-[#f5f5f5]"></div>
Thumbnail
</div>
</div>
</div>
);
}

66 changes: 49 additions & 17 deletions src/pages/SearchPlace.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,55 @@ import React from 'react';
import SearchBar from './component/SearchBar';
import Btn from './component/Btn';
import CategoryChoice from './component/CategoryChoice';
import { GrMap } from "react-icons/gr";
import { GoPerson } from "react-icons/go";

import { GrMap } from 'react-icons/gr';
import { GoPerson } from 'react-icons/go';

export default function SearchPlace() {
return (
<div className='min-h-[100vh] '>
<SearchBar type="place" />
<div className='pt-[56px] h-[100%] relative bg-[#f5f5f5] text-center pb-[80px]'>
<h1 className='text-2xl font-bold leading-[50px]'>검색하기 막막하시나요?</h1>
<p className='text-sm'>키워드 선택만 하시면 저희가 적합한 장소를 찾아드릴게요!</p>
<CategoryChoice icon={<GrMap className='mr-[10px]'/>} title="지역을 선택해주세요" not={true} category={["동구", "대덕구", "유성구", "중구", "서구"]} className='w-[50%]'/>
<CategoryChoice icon={<GoPerson className='mr-[10px]'/>} not={true} title="누구와 함께 가나요?" category={[ "혼자", "가족", "친구", "단체 모임", "연인", "부모님"]} className='w-[70%]'/>
<CategoryChoice title="지역을 선택해주세요" not={true} category={["데이트 코스", "맛집", "디저트", "교육적인", "추억만들기", "대전의 명물", "감성적인", "혼자서도 좋아요", "가족적인"]} className='w-[80%]'/>
<Btn text="적합한 장소 검색하기!" className="bg-[#2E83F2] text-[#ffffff] absolute bottom-[50px] left-[50%] translate-x-[-50%] w-[90%]"/>
</div>
</div>
);
return (
<div className="min-h-[100vh] ">
<SearchBar type="place" />
<div className="pt-[56px] h-[100%] relative bg-[#f5f5f5] text-center pb-[80px]">
<h1 className="text-2xl font-bold leading-[50px]">
검색하기 막막하시나요?
</h1>
<p className="text-sm">
키워드 선택만 하시면 저희가 적합한 장소를 찾아드릴게요!
</p>
<CategoryChoice
icon={<GrMap className="mr-[10px]" />}
title="지역을 선택해주세요"
not={true}
category={['동구', '대덕구', '유성구', '중구', '서구']}
className="w-[50%]"
/>
<CategoryChoice
icon={<GoPerson className="mr-[10px]" />}
not={true}
title="누구와 함께 가나요?"
category={['혼자', '가족', '친구', '단체 모임', '연인', '부모님']}
className="w-[70%]"
/>
<CategoryChoice
title="지역을 선택해주세요"
not={true}
category={[
'데이트 코스',
'맛집',
'디저트',
'교육적인',
'추억만들기',
'대전의 명물',
'감성적인',
'혼자서도 좋아요',
'가족적인',
]}
className="w-[80%]"
/>
<Btn
text="적합한 장소 검색하기!"
className="bg-primary text-[#ffffff] absolute bottom-[50px] left-[50%] translate-x-[-50%] w-[90%]"
/>
</div>
</div>
);
}

77 changes: 42 additions & 35 deletions src/pages/Store.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React from 'react';
import Header from './component/Header';
import { FaLocationArrow } from "react-icons/fa";
import { FaLocationArrow } from 'react-icons/fa';
import { Link } from 'react-router-dom';
import Category from './component/Category';
import Category from './component/Category';
import Grade from './component/Grade';
import Feel from './component/Feel';
import Feel from './component/Feel';
import Reviews from './component/Reviews';
import Menu from './component/Menu';

Expand All @@ -16,40 +16,47 @@ import Menu from './component/Menu';
// videoImg?: string;
// followChk?: boolean;
// videoUrl: string;
// Categorys: string[];
// Categorys: string[];
// }

export default function Store() {
return (
<div className='h-[100vh]'>
<Header back={true} alarm={true} />
<div className='py-[56px] bg-white '>
<div className="w-full h-[240px]">
<img className='w-full h-full object-cover' src="/assets/img.png" alt="" />
</div>
<div className=" mx-[3%] ">

<div className="mt-[3%] flex justify-between items-center ">
<h3 className='text-xl font-bold'>가게이름</h3>
<Link className='font-white bg-[#2E83F2] text-white px-8 py-2 rounded-2xl' to="/">리뷰 작성</Link>
</div>
<div className="flex items-center h-auto py-[15px] text-lg">
<FaLocationArrow className='mr-[10px] rotate-[270deg]'/>
<p>대전광역시 유성구 둔산동 어쩌구길 33</p>
</div>
<Grade grade={4.8}/>
<div className="flex">
<Category text="#가족" />
<Category text="#맛집" />
<Category text="#맛집" />
</div>
<Feel BadReview={['a','b','c']} GoodReview={['a','b','c']}/>
</div>
<div className="bar w-full h-[8px] bg-[#f5f5f5]"></div>
<Reviews text="이 가게를 방문한 사람들의 리뷰"/>
<Menu video={true}/>
</div>
return (
<div className="h-[100vh]">
<Header back={true} alarm={true} />
<div className="py-[56px] bg-white ">
<div className="w-full h-[240px]">
<img
className="w-full h-full object-cover"
src="/assets/img.png"
alt=""
/>
</div>
<div className=" mx-[3%] ">
<div className="mt-[3%] flex justify-between items-center ">
<h3 className="text-xl font-bold">가게이름</h3>
<Link
className="font-white bg-primary text-white px-8 py-2 rounded-2xl"
to="/"
>
리뷰 작성
</Link>
</div>
<div className="flex items-center h-auto py-[15px] text-lg">
<FaLocationArrow className="mr-[10px] rotate-[270deg]" />
<p>대전광역시 유성구 둔산동 어쩌구길 33</p>
</div>
<Grade grade={4.8} />
<div className="flex">
<Category text="#가족" />
<Category text="#맛집" />
<Category text="#맛집" />
</div>
<Feel BadReview={['a', 'b', 'c']} GoodReview={['a', 'b', 'c']} />
</div>
);
<div className="bar w-full h-[8px] bg-[#f5f5f5]"></div>
<Reviews text="이 가게를 방문한 사람들의 리뷰" />
<Menu video={true} />
</div>
</div>
);
}

20 changes: 10 additions & 10 deletions src/pages/component/Category.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ import React, { useState } from 'react';

type Category = {
text: string;
}
const Category: React.FC<Category> = ({text}) => {


return (
<div className={`px-2 py-1 border rounded-2xl border-[#2E83F2] bg-white text-[#2E83F2] mr-2`}>
{text}
</div>
);
}
};
const Category: React.FC<Category> = ({ text }) => {
return (
<div
className={`px-2 py-1 border rounded-2xl border-primary bg-white text-primary mr-2`}
>
{text}
</div>
);
};

export default Category;
Loading

0 comments on commit 504c815

Please sign in to comment.