Skip to content

Commit

Permalink
[#27]πŸ’„λͺ¨μž„ 동아리 κ°€μž…νŽ˜μ΄μ§€
Browse files Browse the repository at this point in the history
  • Loading branch information
JoohwanLeeJJang committed Jul 18, 2024
1 parent 6baf7e0 commit d8211f1
Show file tree
Hide file tree
Showing 6 changed files with 170 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/components/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const Footer: React.FC = () => {
</li>
</ul>
</div>
<p className="mt-10">&copy; 2024 ModongPage. All rights reserved.</p>
<p className="text-center mt-10">&copy; 2024 ModongPage. All rights reserved.</p>
</footer>
);
};
Expand Down
32 changes: 22 additions & 10 deletions src/components/HeroSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,44 @@ interface HeroSectionProps {
backgroundColor: string;
title: string;
subtitle: string;
animationData: object;
animationData?: object;
imageData?: { src: string; alt: string };
}

const HeroSection: React.FC<HeroSectionProps> = ({
backgroundColor,
title,
subtitle,
animationData,
imageData,
}) => {
return (
<section
className={`w-full h-72 py-8 px-4 ${backgroundColor} flex justify-center text-left`}
className={`w-full h-72 py-8 px-4 ${backgroundColor} flex justify-center text-left`}
>
<div className=" flex items-center w-full px-20 justify-around">
<div className="flex flex-col ">
<div className="flex items-center w-full px-20 justify-around">
<div className="flex flex-col">
<h1 className="text-4xl font-neoExtraBold text-white mb-10">
{title}
</h1>
<p className="text-white font-neoLight">{subtitle}</p>
</div>
<Lottie
animationData={animationData}
loop
autoplay
style={{ height: 200, width: 200 }}
/>
{animationData ? (
<Lottie
animationData={animationData}
loop
autoplay
style={{ height: 200, width: 200 }}
/>
) : (
imageData && (
<img
src={imageData.src}
alt={imageData.alt}
style={{ height: 200, width: 200 }}
/>
)
)}
</div>
</section>
);
Expand Down
53 changes: 53 additions & 0 deletions src/pages/GroupJoinPage/ClubRegistration.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import React from "react";
import { Button } from '@/components/ui/button';

const ClubRegistration: React.FC = () => {
return (
<div className="flex bg-stone-100 flex-col min-h-screen">
<div className="w-[920px] mx-auto mt-8 flex flex-col flex-grow">
<h2 className="text-xl text-green-600 font-neoBold mb-10">κ°œμΈμ •λ³΄ μ΄μš©μ•½κ΄€</h2>
<h2 className="text-xl text-green-600 font-neoBold mb-4">κ°€μž… κ·œμΉ™</h2>
<div className="border-2 border-[#B4E3BF] rounded-lg bg-white p-8 mb-4">
<ol className="space-y-1.5 list-decimal list-inside">
<li>κ°€μž… ν›„ 3κ°œμ›” λ™μ•ˆ μ°Έμ—¬ 횟수 3회 미만일 경우 강퇴!!</li>
<li>μƒν˜Έ 쑴쀑</li>
<li>이성적 λ§Œλ‚¨, μ˜μ—… λ“± 동아리와 κ΄€λ ¨λ˜μ§€ μ•Šμ€ λͺ©μ  μ λ°œμ‹œ 강퇴!!</li>
<li>κ°€μž… ν›„ 일주일 λ‚΄ 인사 등둝 및 ν•œλ‹¬ λ‚΄ λͺ¨μž„ μ°Έμ—¬</li>
</ol>
</div>
<label className="flex justify-end items-center mb-5">
<input type="checkbox" className="form-checkbox" />
<span className="ml-2 text-sm">μœ„ κ°€μž… κ·œμΉ™μ— λ™μ˜ν•©λ‹ˆλ‹€.</span>
</label>

<h2 className="text-xl text-green-600 font-neoBold mb-4">κ°€μž… 질문</h2>
<div className="space-y-4 bg-white p-8 border-2 border-[#B4E3BF] rounded-lg">
<div>
<label className="block mb-2 font-neoBold text-sm">1. MBTI (잘 λͺ¨λ₯΄λ©΄ μ™Έν–₯ν˜•, λ‚΄ν–₯ν˜• μ •λ„λ‘œ μž‘μ„±ν•΄μ£Όμ„Έμš”.)</label>
<input type="text" className="w-full h-8 p-2 border border-gray-300 rounded" />
</div>
<div>
<label className="block mb-2 font-neoBold text-sm">2. λ‚˜μ΄ (만 λ‚˜μ΄)</label>
<input type="text" className="w-full h-8 p-2 border border-gray-300 rounded" />
</div>
<div>
<label className="block mb-2 font-neoBold text-sm">3. κ°€μž… μ‹œ 잘 μ°Έμ—¬ν•˜κ² μŠ΅λ‹ˆκΉŒ?</label>
<input type="text" className="w-full h-8 p-2 border border-gray-300 rounded" />
</div>
</div>

<div className="mt-auto mb-10">
<label className="flex justify-end items-center mt-4 mb-3">
<input type="checkbox" className="form-checkbox" />
<span className="text-sm ml-2">μœ„ κ°€μž… λ‚΄μš©μ˜ 정보 μ΄μš©μ— λ™μ˜ν•©λ‹ˆλ‹€.</span>
</label>
<div className="flex justify-end">
<Button>κ°€μž…ν•˜κΈ°</Button>
</div>
</div>
</div>
</div>
);
}

export default ClubRegistration;
89 changes: 89 additions & 0 deletions src/pages/GroupJoinPage/GroupJoinPage.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
import React, { useRef, useState } from 'react';
import Footer from '@/components/Footer';
import Header from '@/components/Header';
import HeroSection from '@/components/HeroSection';
import NotificationModal from '@/components/ui/notificationModal';
import ProfileModal from '@/components/ui/profileModal';
import ClubRegistration from './ClubRegistration';
import runImg from '@/assets/icons/run.png';


const LandingPage: React.FC = () => {
const [isProfileModalOpen, setIsProfileModalOpen] = useState(false);
const [isNotificationModalOpen, setIsNotificationModalOpen] = useState(false);
const [isLoggedIn, setIsLoggedIn] = useState(false);
const [hasNotifications, setHasNotifications] = useState(false);
const [profileCoords, setProfileCoords] = useState<{
top: number;
left: number;
}>({
top: 0,
left: 0,
});
const [notificationCoords, setNotificationCoords] = useState<{
top: number;
left: number;
}>({
top: 0,
left: 0,
});
const profileRef = useRef<HTMLImageElement>(null);

const toggleProfileModal = (e?: React.MouseEvent) => {
if (e) {
const rect = (e.currentTarget as HTMLElement).getBoundingClientRect();
setProfileCoords({ top: rect.bottom, left: rect.left });
}
setIsProfileModalOpen(!isProfileModalOpen);
};

const toggleNotificationModal = (e?: React.MouseEvent) => {
if (e) {
const rect = (e.currentTarget as HTMLElement).getBoundingClientRect();
setNotificationCoords({ top: rect.bottom, left: rect.left });
}
setIsNotificationModalOpen(!isNotificationModalOpen);
};

const handleLogout = () => {
setIsLoggedIn(false);
setIsProfileModalOpen(false);
};

return (
<div className="relative">
<Header
toggleProfileModal={toggleProfileModal}
toggleNotificationModal={toggleNotificationModal}
isLoggedIn={isLoggedIn}
handleLoginLogout={() => setIsLoggedIn(!isLoggedIn)}
profileRef={profileRef}
hasNotifications={hasNotifications}
/>
<HeroSection
backgroundColor="bg-primary"
title="λͺ¨μž„ / 동아리 κ°€μž…ν•˜κΈ°"
subtitle="우리의 λ‹€μ–‘ν•œ λͺ¨μž„κ³Ό λ™μ•„λ¦¬μ—μ„œ μƒˆλ‘œμš΄ μ·¨λ―Έλ₯Ό λ°œκ²¬ν•˜κ³ , 기쑴의 μ·¨λ―Έλ₯Ό λ”μš± 즐겁게 λˆ„λ €λ³΄μ„Έμš”."
imageData={{ src: runImg, alt: "Run Icon" }}
/>
<ClubRegistration/>
<Footer />
{isProfileModalOpen && (
<ProfileModal
toggleProfileModal={toggleProfileModal}
handleLogout={handleLogout}
coords={profileCoords}
/>
)}
{isNotificationModalOpen && (
<NotificationModal
toggleNotificationModal={toggleNotificationModal}
setHasNotifications={setHasNotifications}
coords={notificationCoords}
/>
)}
</div>
);
};

export default LandingPage;
Empty file added src/pages/GroupJoinPage/Join
Empty file.
6 changes: 5 additions & 1 deletion src/routes/routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { createBrowserRouter, RouterProvider } from 'react-router-dom';
import App from '../App';
import Landing from '../pages/LandingPage/LandingPage';
import SetLocation from '../pages/SetLocation/SetLocation';

import GroupJoin from '../pages/GroupJoinPage/GroupJoinPage';
const router = createBrowserRouter([
{
path: '/',
Expand All @@ -17,6 +17,10 @@ const router = createBrowserRouter([
path: '/setlocation',
element: <SetLocation />,
},
{
path: '/groupjoin',
element: <GroupJoin />,
},
]);

const Routes = () => {
Expand Down

0 comments on commit d8211f1

Please sign in to comment.