Skip to content

Commit 889edff

Browse files
Merge pull request #103 from yours7himanshu/jules_wip_3545409802216383550
Jules was unable to complete the task in time. Please review the work…
2 parents a307c7d + f54b423 commit 889edff

28 files changed

+297
-233
lines changed

admin/src/components/AdminLive.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -499,11 +499,11 @@ const AdminLive = () => {
499499
}, [socket, roomId, isConnected]);
500500

501501
return (
502-
<div className="video-call flex h-auto w-full bg-gray-900 text-white">
502+
<div className="video-call flex min-h-full w-full bg-gray-900 text-white"> {/* Changed h-auto to min-h-full */}
503503
{" "}
504504
{/* Added text-white for base color */}
505-
<div className="flex w-full h-screen flex-col items-center bg-gray-800 p-4 md:p-6 rounded-lg shadow-lg m-2">
506-
<h2 className="text-xl text-green-400 font-semibold ">
505+
<div className="flex w-full h-full flex-col items-center bg-gray-800 p-4 md:p-6 rounded-lg shadow-lg"> {/* Changed h-screen to h-full, removed m-2 */}
506+
<h2 className="text-xl text-green-400 font-semibold mb-2 md:mb-4"> {/* Added mb for spacing */}
507507
Admin Live Stream
508508
</h2>
509509

admin/src/components/Assignment/Assignment.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ const Assignment = () => {
6868
};
6969

7070
return (
71-
<div className="min-h-screen ml-[20%] bg-gray-100 flex items-center justify-center py-12 px-4 sm:px-6 lg:px-8">
71+
<div className="min-h-screen w-full bg-gray-100 flex items-center justify-center py-12 px-4 sm:px-6 lg:px-8"> {/* Removed ml-[20%], ensured w-full */}
7272
<div className="w-full max-w-3xl bg-white p-8 rounded-xl shadow-xl">
7373
<form onSubmit={handleSubmit} className="space-y-8">
7474
<div className="space-y-6">

admin/src/components/CreateLecture.jsx

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,38 @@ const CreateLecture = () => {
3232
};
3333

3434
return (
35-
<div>
36-
<input value={title} onChange={(e) => setTitle(e.target.value)} placeholder="Title" />
37-
<input value={description} onChange={(e) => setDescription(e.target.value)} placeholder="Description" />
38-
<button onClick={handleCreateLecture}>Create Lecture</button>
35+
<div className="p-4 md:p-6 space-y-6 max-w-lg mx-auto bg-white shadow-md rounded-lg mt-8 border border-gray-200">
36+
<h2 className="text-2xl font-semibold text-gray-700 text-center">Create New Lecture</h2>
37+
<div>
38+
<label htmlFor="lectureTitle" className="block text-sm font-medium text-gray-700 mb-1">
39+
Lecture Title
40+
</label>
41+
<input
42+
id="lectureTitle"
43+
value={title}
44+
onChange={(e) => setTitle(e.target.value)}
45+
placeholder="Enter lecture title"
46+
className="w-full p-3 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"
47+
/>
48+
</div>
49+
<div>
50+
<label htmlFor="lectureDescription" className="block text-sm font-medium text-gray-700 mb-1">
51+
Lecture Description
52+
</label>
53+
<input
54+
id="lectureDescription"
55+
value={description}
56+
onChange={(e) => setDescription(e.target.value)}
57+
placeholder="Enter lecture description"
58+
className="w-full p-3 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"
59+
/>
60+
</div>
61+
<button
62+
onClick={handleCreateLecture}
63+
className="w-full p-3 bg-blue-600 text-white rounded-md hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 transition"
64+
>
65+
Create Lecture
66+
</button>
3967
</div>
4068
);
4169
};

admin/src/components/Dashboard/Dashboard.jsx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -70,18 +70,18 @@ const Dashboard = () => {
7070
}
7171
};
7272
fetchCharts();
73-
});
73+
}, []);
7474

7575
return (
76-
<div className="dashboard flex max-md:w-screen ">
76+
<div className="dashboard flex">
7777
<div className=" bg-gray-100 w-[100%]">
7878
<div className="grid grid-cols-1 md:grid-cols-2 gap-8">
7979
<div className="bg-white p-6 rounded-lg shadow-lg w-full">
8080
<h2 className="text-2xl font-semibold text-gray-700 mb-4">
8181
Marks and Attendance Relation
8282
</h2>
8383
{scatter ? (
84-
<img src={scatter} alt="" />
84+
<img src={scatter} alt="Marks and Attendance Relation" className="w-full h-auto object-contain"/>
8585
) : (
8686
<div className="flex justify-center items-center py-10">
8787
<Loader className="animate-spin text-blue-500 h-10 w-10" />
@@ -93,7 +93,7 @@ const Dashboard = () => {
9393
Branchwise Student Distribution
9494
</h2>
9595
{pieplot ? (
96-
<img className="w-400 h-400" src={pieplot} alt="" />
96+
<img className="w-full h-auto object-contain" src={pieplot} alt="Branchwise Student Distribution" />
9797
) : (
9898
<div className="flex justify-center items-center py-10">
9999
<Loader className="animate-spin text-blue-500 h-10 w-10" />
@@ -105,7 +105,7 @@ const Dashboard = () => {
105105
Attendance Overview
106106
</h2>
107107
{barplot1 ? (
108-
<img src={barplot1} alt="" />
108+
<img src={barplot1} alt="Attendance Overview" className="w-full h-auto object-contain"/>
109109
) : (
110110
<div className="flex justify-center items-center py-10">
111111
<Loader className="animate-spin text-blue-500 h-10 w-10" />
@@ -118,7 +118,7 @@ const Dashboard = () => {
118118
Marks Overview
119119
</h2>
120120
{barplot2 ? (
121-
<img src={barplot2} alt="" />
121+
<img src={barplot2} alt="Marks Overview" className="w-full h-auto object-contain"/>
122122
) : (
123123
<div className="flex justify-center items-center py-10">
124124
<Loader className="animate-spin text-blue-500 h-10 w-10" />
@@ -131,7 +131,7 @@ const Dashboard = () => {
131131
Top Students
132132
</h2>
133133
{topStudents ? (
134-
<img className="w-200 h-72" src={topStudents} alt="" />
134+
<img className="w-full h-auto object-contain" src={topStudents} alt="Top Students" />
135135
) : (
136136
<div className="flex justify-center items-center py-10">
137137
<Loader className="animate-spin text-gray-500 h-10 w-10" />
@@ -143,7 +143,7 @@ const Dashboard = () => {
143143
Fees Analysis
144144
</h2>
145145
{fees_status ? (
146-
<img className="w-200 h-72" src={fees_status} alt="" />
146+
<img className="w-full h-auto object-contain" src={fees_status} alt="Fees Analysis" />
147147
) : (
148148
<div className="flex justify-center items-center py-10">
149149
<Loader className="animate-spin text-gray-500 h-10 w-10" />
@@ -155,7 +155,7 @@ const Dashboard = () => {
155155
Branchwise Placement Analysis
156156
</h2>
157157
{branch_placement ? (
158-
<img className="w-200 h-72" src={branch_placement} alt="" />
158+
<img className="w-full h-auto object-contain" src={branch_placement} alt="Branchwise Placement Analysis" />
159159
) : (
160160
<div className="flex justify-center items-center py-10">
161161
<Loader className="animate-spin text-gray-500 h-10 w-10" />
@@ -167,7 +167,7 @@ const Dashboard = () => {
167167
Placement Analysis
168168
</h2>
169169
{placement_status ? (
170-
<img className="w-200 h-72" src={placement_status} alt="" />
170+
<img className="w-full h-auto object-contain" src={placement_status} alt="Placement Analysis" />
171171
) : (
172172
<div className="flex justify-center items-center py-10">
173173
<Loader className="animate-spin text-gray-500 h-10 w-10" />

admin/src/components/Dashboard/DashboardPage.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import AppLayout from "../../layout/AppLayout";
2323

2424
const DashboardPage = () => {
2525
return (
26-
<div className="dashboard flex max-md:w-screen ">
26+
<div className="dashboard flex">
2727

2828
<div className="flex flex-col max-md:w-full max-md:ml-0 ml-[20%] w-[80%] p-4 py-6 bg-gray-100">
2929

admin/src/components/Dashboard/Logo.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ limitations under the License.
1919
import React from "react";
2020
const Logo = () => {
2121
return (
22-
<div className="flex gap-1 w-[80%] shadow-xl relative right-5 pb-4 items-center justify-center m-3 pl-4 pr-4 h-16 mb-10 border border-blue-500 padding-1 rounded-3xl " >
23-
<img src="/logo/EduMatrix2.png" className="w-[5vw] h-[10vh] p-1 pt-4 mb-0 object-cover border-none rounded-full " alt="" />
24-
<p className="font-extrabold mt-3 text-3xl " >EduMatrix</p>
22+
<div className="flex items-center gap-2 p-3 w-full shadow-md mb-4 border border-blue-200 rounded-lg">
23+
<img src="/logo/EduMatrix2.png" className="h-10 w-auto object-contain" alt="EduMatrix Logo" />
24+
<p className="font-bold text-xl text-gray-800">EduMatrix</p>
2525
</div>
2626
);
2727
};

admin/src/components/Director/DirectorFeedback.jsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,14 @@ const DirectorFeedback = ()=>{
2323
}, []);
2424

2525
return (
26-
<div>
26+
<div className="w-full"> {/* Ensure the root div takes full width */}
2727
{data && data.length>0 ? <div>
28-
<div className="p-6 bg-gray-100 min-h-screen">
29-
<div className="space-y-4 ml-[23%] ">
30-
<h2 className="text-2xl font-semibold mb-6 ml-2 text-gray-800">User Feedbacks</h2>
28+
<div className="p-4 md:p-6 bg-gray-100 min-h-screen"> {/* Adjusted padding */}
29+
<div className="space-y-6"> {/* Removed ml-[23%], adjusted space-y */}
30+
<h2 className="text-2xl font-semibold mb-6 text-gray-800 text-center md:text-left">User Feedbacks</h2> {/* Removed ml-2, added responsive text align */}
3131
{data.map((value,index)=>(
32-
<div key={index} className="bg-white shadow cursor-pointer rounded-lg p-5 w-[50%] hover:shadow-lg transition-shadow">
32+
// Changed w-[50%] to w-full max-w-2xl mx-auto for responsive and centered cards
33+
<div key={index} className="bg-white shadow cursor-pointer rounded-lg p-5 w-full max-w-2xl mx-auto hover:shadow-lg transition-shadow">
3334
<div className="flex items-center mb-2">
3435
<User className="w-5 h-5 text-blue-500 mr-2" />
3536
<span className="text-lg font-medium text-gray-900">{value.fullName}</span>

admin/src/components/Model.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ const Modal = ({ isOpen, onClose }) => {
6161
if (!isOpen) return null;
6262

6363
return (
64-
<div className="fixed inset-0 bg-black bg-opacity-50 flex justify-center items-center z-50">
65-
<div className="bg-white rounded-lg p-6 shadow-lg w-96">
66-
<h2 className="text-lg font-semibold mb-4">Join Live Room</h2>
64+
<div className="fixed inset-0 bg-black bg-opacity-50 flex justify-center items-center z-50 p-4"> {/* Added p-4 for overall padding from screen edges */}
65+
<div className="bg-white rounded-lg p-6 sm:p-8 shadow-lg w-full max-w-md sm:max-w-lg max-h-[90vh] overflow-y-auto"> {/* Responsive width and padding, Added max-h and overflow */}
66+
<h2 className="text-xl sm:text-2xl font-semibold mb-4 sm:mb-6">Join Live Room</h2> {/* Responsive text and margin */}
6767
<form
6868
onSubmit={(e) => {
6969
e.preventDefault();

admin/src/components/Quiz/CreateQuiz.jsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,15 @@ const CreateQuiz = () => {
7171
};
7272

7373
return (
74-
<div className=" ml-[25%] flex justifiy-center items-center h-screen rounded-lg shadow-xl w-screen border border-gray-50 gap-20 ">
74+
// Removed ml-[25%], changed w-screen to w-full. Added p-4 for some spacing.
75+
<div className="w-full flex justify-center items-center h-screen p-4">
7576

7677
<form
7778
onSubmit={handleSubmit}
78-
className="w-[70%] justify-center h-[95%] flex flex-col bg-gray-100 shadow-lg rounded-lg p-8 space-y-6"
79+
// Changed w-[70%] to w-full max-w-3xl. Removed h-[95%], added max-h-[90vh] and overflow-y-auto
80+
className="w-full max-w-3xl flex flex-col bg-gray-100 shadow-lg rounded-lg p-6 md:p-8 space-y-6 max-h-[90vh] overflow-y-auto"
7981
>
80-
<h2 className="text-2xl font-bold text-gray-800">Create a New Quiz</h2>
82+
<h2 className="text-2xl font-bold text-gray-800 text-center md:text-left">Create a New Quiz</h2>
8183

8284
{/* Title Input */}
8385
<div>
@@ -132,7 +134,8 @@ const CreateQuiz = () => {
132134
className="mt-1 block w-full border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm border p-2 "
133135
required
134136
/>
135-
<div className="grid grid-cols-2 gap-4">
137+
{/* Responsive grid for options */}
138+
<div className="grid grid-cols-1 sm:grid-cols-2 gap-4">
136139
{q.options.map((option, i) => (
137140
<input
138141
key={i}

admin/src/components/Registrar/RegistrarStudent.jsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ const RegistrarStudent = () => {
4545
};
4646

4747
return (
48-
<div className="min-h-screen bg-gray-100 flex-1 flex-col items-center w-screen justify-center py-24 ">
49-
<div className="max-w-3xl mx-auto ml-[34%] bg-white shadow-lg rounded-lg p-8">
50-
<h2 className="text-2xl font-semibold text-gray-800 mb-6">Student Fees Details</h2>
48+
<div className="min-h-screen bg-gray-100 w-full flex flex-col items-center justify-center py-12 md:py-16 px-4"> {/* Changed w-screen, py, added px-4 and flex for centering */}
49+
<div className="max-w-3xl w-full mx-auto bg-white shadow-lg rounded-lg p-6 md:p-8"> {/* Removed ml-[34%], added w-full, adjusted padding */}
50+
<h2 className="text-2xl font-semibold text-gray-800 mb-6 text-center md:text-left">Student Fees Details</h2> {/* Centered text on mobile */}
5151
<form onSubmit={handleSubmit} className="space-y-6">
52-
<div className="grid grid-cols-1 md:grid-cols-2 gap-6">
52+
<div className="grid grid-cols-1 md:grid-cols-2 gap-4 md:gap-6"> {/* Adjusted gap */}
5353
<div className="flex flex-col">
5454
<label className="text-gray-700 mb-1 flex items-center">
5555
<User className="w-5 h-5 mr-2 text-blue-500" /> Student Name

admin/src/components/Student/StudentDetail.jsx

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,13 @@ function StudentDetail() {
4343
<table className="min-w-full bg-white shadow-md rounded-lg overflow-hidden">
4444
<thead>
4545
<tr className="bg-violet-800 text-white text-left">
46-
<th className="px-6 py-3 text-sm font-semibold">Student Photo</th>
46+
<th className="px-6 py-3 text-sm font-semibold">Photo</th>
4747
<th className="px-6 py-3 text-sm font-semibold">Name</th>
48-
<th className="px-6 py-3 text-sm font-semibold">Phone No</th>
48+
<th className="px-6 py-3 text-sm font-semibold hidden sm:table-cell">Phone No</th>
4949
<th className="px-6 py-3 text-sm font-semibold">Roll No</th>
5050
<th className="px-6 py-3 text-sm font-semibold">Batch</th>
5151
<th className="px-6 py-3 text-sm font-semibold">Branch</th>
52-
<th className="px-6 py-3 text-sm font-semibold">Father Name</th>
52+
<th className="px-6 py-3 text-sm font-semibold hidden sm:table-cell">Father Name</th>
5353
<th className="px-6 py-3 text-sm font-semibold">Email</th>
5454
</tr>
5555
</thead>
@@ -61,20 +61,22 @@ function StudentDetail() {
6161
index % 2 === 0 ? "bg-gray-50" : "bg-gray-100"
6262
} hover:bg-gray-200 transition-colors`}
6363
>
64-
<img
65-
src={student.avatar}
66-
className="h-20 m-2 rounded-md"
67-
alt=""
68-
/>
69-
<td className="px-6 py-4 text-gray-700">{student.name}</td>
70-
<td className="px-6 py-4 text-gray-700">{student.phoneNo}</td>
71-
<td className="px-6 py-4 text-gray-700">{student.rollNo}</td>
72-
<td className="px-6 py-4 text-gray-700">{student.batch} </td>
73-
<td className="px-6 py-4 text-gray-700">{student.branch} </td>
74-
<td className="px-6 py-4 text-gray-700">
75-
{student.fatherName}{" "}
64+
<td className="px-6 py-4">
65+
<img
66+
src={student.avatar}
67+
className="h-16 w-16 object-cover rounded-md" // Adjusted size
68+
alt={`${student.name}'s photo`}
69+
/>
7670
</td>
77-
<td className="px-6 py-4 text-gray-700">{student.email} </td>
71+
<td className="px-6 py-4 text-gray-700 align-middle">{student.name}</td>
72+
<td className="px-6 py-4 text-gray-700 align-middle hidden sm:table-cell">{student.phoneNo}</td>
73+
<td className="px-6 py-4 text-gray-700 align-middle">{student.rollNo}</td>
74+
<td className="px-6 py-4 text-gray-700 align-middle">{student.batch}</td>
75+
<td className="px-6 py-4 text-gray-700 align-middle">{student.branch}</td>
76+
<td className="px-6 py-4 text-gray-700 align-middle hidden sm:table-cell">
77+
{student.fatherName}
78+
</td>
79+
<td className="px-6 py-4 text-gray-700 align-middle">{student.email}</td>
7880
</tr>
7981
))}
8082
</tbody>

0 commit comments

Comments
 (0)