Skip to content

Commit 2cc88d7

Browse files
committed
Frontend Thoda Thoda
1 parent f9292cc commit 2cc88d7

File tree

10 files changed

+153
-11
lines changed

10 files changed

+153
-11
lines changed

web/src/components/Home/EventCard.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const EventCard = () => {
88
initial={{ rotateY: 180, scale: 1.3 }}
99
animate={{ rotateY: 0, scale: 1 }}
1010
transition={{ duration: 0.6 }}
11-
className="md:w-1/4 w-1/2 my-4 bg-white border border-gray-200 rounded-lg shadow dark:bg-gray-800 dark:border-gray-700">
11+
className="md:w-1/4 md:mx-2 mx-8 my-4 bg-white border border-gray-200 rounded-lg shadow dark:bg-gray-800 dark:border-gray-700">
1212
<a href="#">
1313
<img
1414
className="rounded-t-lg w-full opacity-90 max-w-md p-2"
@@ -27,7 +27,7 @@ const EventCard = () => {
2727
</p>
2828
<a
2929
href="#"
30-
className="inline-flex items-center px-3 py-2 text-sm font-medium text-center text-white bg-gray-500 rounded-lg hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 dark:bg-gray-700 dark:hover:bg-gray-600 dark:focus:ring-gray-800"
30+
className="transition transform hover:-translate-y-0.5 inline-flex items-center px-3 py-2 text-sm font-medium text-center text-white bg-gray-400 rounded-lg hover:bg-gray-800 focus:ring-4 focus:outline-none focus:ring-gray-300 dark:bg-gray-700 dark:hover:bg-gray-600 dark:focus:ring-gray-800"
3131
>
3232
Register
3333
<svg

web/src/components/Home/TodaysQuestion.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const TodaysQuestion = () => {
1919
</div>
2020
<Link
2121
to="/solve"
22-
className="bg-blue-900 hidden md:block text-white hover:bg-blue-900 hover:bg-opacity-10 bg-opacity-25 py-2 px-3 rounded-lg mx-2"
22+
className="bg-blue-900 hidden md:block text-white hover:bg-blue-900 hover:bg-opacity-10 dark:bg-opacity-25 bg-opacity-60 py-2 px-3 rounded-lg mx-2"
2323
>
2424
Solve
2525
</Link>
@@ -28,7 +28,7 @@ const TodaysQuestion = () => {
2828
<p className="my-auto">Solved Today: <span className="text-xs">69 </span></p>
2929
<Link
3030
to="/solve"
31-
className="bg-blue-900 md:hidden text-white hover:bg-blue-900 hover:bg-opacity-10 bg-opacity-25 py-2 px-3 rounded-lg mx-2"
31+
className="bg-blue-900 md:hidden text-white hover:bg-blue-900 hover:bg-opacity-10 dark:bg-opacity-25 bg-opacity-60 py-2 px-3 rounded-lg mx-2"
3232
>
3333
Solve
3434
</Link>

web/src/components/Home/UpcomingEvents.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ const UpcomingEvents = () => {
66
<>
77
<div className='my-4'>
88
<h1 className="font-bold my-2 text-xl text-center">Upcoming Events</h1>
9-
<div className='flex justify-between w-4/5 mx-auto'>
9+
<div className='flex md:flex-row flex-col md:justify-between md:w-4/5 mx-auto justify-center'>
10+
<EventCard />
11+
<EventCard />
1012
<EventCard />
1113
<EventCard />
1214
<EventCard />
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import React from "react";
2+
3+
const Entry = () => {
4+
return (
5+
<>
6+
<tr>
7+
<td className="py-4 text-gray-500 font-semibold text-center">1</td>
8+
<td className="py-4 text-blue-600 font-semibold text-center">John Doe</td>
9+
<td className="py-4 text-center">2:35:10</td>
10+
<td className="py-4 text-center">10:45 AM</td>
11+
</tr>
12+
</>
13+
);
14+
};
15+
16+
export default Entry;
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import React from "react";
2+
import Entry from "./Entry";
3+
4+
const LeaderboardPane = () => {
5+
return (
6+
<div className="md:px-24">
7+
<div className="bg-gray-100 p-6 bg-opacity-10 rounded-lg">
8+
<table className="min-w-full">
9+
<thead>
10+
<tr>
11+
<th className="py-3 text-center">Rank</th>
12+
<th className="py-3 text-center">Name</th>
13+
<th className="py-3 text-center">Run Time</th>
14+
<th className="py-3 text-center">Time Finished</th>
15+
</tr>
16+
</thead>
17+
<tbody>
18+
<Entry />
19+
<Entry />
20+
<Entry />
21+
<Entry />
22+
<Entry />
23+
<Entry />
24+
{/* Add more rows as needed */}
25+
</tbody>
26+
</table>
27+
</div>
28+
</div>
29+
);
30+
};
31+
32+
export default LeaderboardPane;
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
import React from "react";
2+
3+
const ProfileCard = () => {
4+
return (
5+
<div>
6+
<div className="md:px-16">
7+
<div className="p-8 bg-white shadow mt-24 dark:bg-black dark:bg-opacity-5">
8+
{" "}
9+
<div className="grid grid-cols-1 md:grid-cols-3">
10+
{" "}
11+
<div className="grid grid-cols-3 text-center order-last md:order-first mt-5 md:mt-0">
12+
{" "}
13+
<div>
14+
{" "}
15+
<p className="font-bold text-gray-700 dark:text-white text-xl">22</p>{" "}
16+
<p className="text-gray-400">Friends</p>{" "}
17+
</div>{" "}
18+
<div>
19+
{" "}
20+
<p className="font-bold text-gray-700 dark:text-white text-xl">10</p>{" "}
21+
<p className="text-gray-400">Rank</p>{" "}
22+
</div>{" "}
23+
<div>
24+
{" "}
25+
<p className="font-bold text-gray-700 dark:text-white text-xl">89</p>{" "}
26+
<p className="text-gray-400">Solved</p>{" "}
27+
</div>{" "}
28+
</div>{" "}
29+
<div className="relative">
30+
{" "}
31+
<div className="w-48 h-48 bg-indigo-100 mx-auto rounded-full shadow-2xl absolute inset-x-0 top-0 -mt-24 flex items-center justify-center text-indigo-500">
32+
<svg
33+
xmlns="http://www.w3.org/2000/svg"
34+
className="h-24 w-24"
35+
viewBox="0 0 20 20"
36+
fill="currentColor"
37+
>
38+
{" "}
39+
<path
40+
fillRule="evenodd"
41+
d="M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z"
42+
clipRule="evenodd"
43+
/>
44+
</svg>{" "}
45+
</div>{" "}
46+
</div>{" "}
47+
<div className="space-x-8 flex justify-between mt-32 md:mt-0 md:justify-center">
48+
<button className="text-white py-2 px-4 uppercase rounded bg-blue-500 hover:bg-blue-600 shadow hover:shadow-lg font-medium transition transform hover:-translate-y-0.5">
49+
{" "}
50+
Connect
51+
</button>{" "}
52+
<button className="text-white py-2 px-4 uppercase rounded bg-gray-700 hover:bg-gray-800 shadow hover:shadow-lg font-medium transition transform hover:-translate-y-0.5">
53+
{" "}
54+
Message
55+
</button>{" "}
56+
</div>
57+
</div>{" "}
58+
<div className="md:mt-20 mt-5 text-center border-b pb-12">
59+
{" "}
60+
<h1 className="text-4xl font-medium text-gray-700 dark:text-white">
61+
Saket Aryan{" "}
62+
</h1>{" "}
63+
<p className="font-light text-gray-600 mt-3 dark:text-white">CSE - Z, 2025</p>{" "}
64+
<p className="mt-8 text-gray-500">
65+
Solution Manager - Creative Tim Officer
66+
</p>{" "}
67+
<p className="mt-2 text-gray-500">University of Computer Science</p>
68+
</div>{" "}
69+
<div className="mt-12 flex flex-col justify-center">
70+
{" "}
71+
<p className="text-gray-600 text-center font-light lg:px-16">
72+
This is a custom piece about me and I would love to tell you more....
73+
</p>{" "}
74+
</div>
75+
</div>
76+
</div>
77+
</div>
78+
);
79+
};
80+
81+
export default ProfileCard;

web/src/components/TestCase.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ const TestCase = () => {
6262
>
6363
<h1 className="dark:text-white m-1 text-sm font-semibold">Example Testcase</h1>
6464
<input placeholder="Enter Testcase" className='border-none w-full h-12 my-1 p-3 bg-black font-bold dark:bg-dark5 bg-opacity-10 text-gray-600 dark:text-gray-200 rounded-lg text-sm' ref={inputRef} />
65-
<div className="flex justify-end p-2">
66-
<button className="bg-dark5 hover:bg-dark4 rounded-md px-4 py-2 font-semibold mx-2">Run</button>
67-
<button className="bg-dark5 hover:bg-dark4 rounded-md px-4 py-2 font-semibold">Submit</button>
65+
<div className="flex justify-end p-2 text-black dark:text-gray-300">
66+
<button className="bg-dark5 bg-opacity-30 dark:bg-opacity-100 dark:hover:bg-dark4 hover:bg-slate-400 rounded-md px-4 py-2 font-semibold mx-2">Run</button>
67+
<button className="bg-dark5 bg-opacity-30 dark:bg-opacity-100 dark:hover:bg-dark4 hover:bg-slate-400 rounded-md px-4 py-2 font-semibold">Submit</button>
6868
</div>
6969
</div>
7070
</div>

web/src/pages/Home.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import UpcomingEvents from "../components/Home/UpcomingEvents";
55
const Home = () => {
66
return (
77
<>
8-
<div className="p-2 bg-no-repeat bg-fixed dark:bg-[radial-gradient(ellipse_at_bottom_right,_var(--tw-gradient-stops))] from-gray-700 via-gray-900 to-black">
8+
<div className="p-2 bg-no-repeat bg-fixed min-h-screen dark:bg-[radial-gradient(ellipse_at_bottom_right,_var(--tw-gradient-stops))] from-gray-700 via-gray-900 to-black">
99
<motion.h1
1010
initial={{ opacity: 0, scale: 0.5 }}
1111
animate={{ opacity: 1, scale: 1 }}

web/src/pages/Leaderboard.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
import React from 'react'
2+
import {motion} from "framer-motion";
3+
import LeaderboardPane from "../components/Leaderboard/LeaderboardPane"
24

35
const Leaderboard = () => {
46
return (
5-
<div>Leaderboard</div>
7+
<motion.div initial={{x: -300}} animate={{x: 0}} className="p-4 bg-no-repeat bg-fixed min-h-screen dark:bg-[radial-gradient(ellipse_at_bottom_right,_var(--tw-gradient-stops))] from-gray-700 via-gray-900 to-black">
8+
<motion.h1 initial={{x: -1000}} animate={{x: 0}} transition={{delay: .3}} className='text-center my-4 text-4xl font-semibold '><span className='text-blue-500'>LEADER</span>BOARD</motion.h1>
9+
<LeaderboardPane />
10+
</motion.div>
611
)
712
}
813

web/src/pages/Profile.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
import React from 'react'
2+
import ProfileCard from '../components/Profile/ProfileCard';
3+
import {motion} from "framer-motion"
24

35
const Profile = () => {
46
return (
5-
<div>Profile</div>
7+
<>
8+
<motion.div initial={{x: -200}} animate={{x: 0}} className="p-4 bg-no-repeat bg-fixed min-h-screen dark:bg-[radial-gradient(ellipse_at_bottom_right,_var(--tw-gradient-stops))] from-gray-700 via-gray-900 to-black">
9+
<ProfileCard />
10+
</motion.div>
11+
</>
612
)
713
}
814

0 commit comments

Comments
 (0)