Skip to content

Commit

Permalink
Added dark theme
Browse files Browse the repository at this point in the history
  • Loading branch information
Waqibsk committed Feb 19, 2025
1 parent bb84399 commit 54bf533
Show file tree
Hide file tree
Showing 8 changed files with 58 additions and 57 deletions.
Binary file added backend/uploads/starwars2.webp
Binary file not shown.
4 changes: 2 additions & 2 deletions frontend/src/components/Events.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,10 @@ export default function Events() {
onCatagoryChange={handleCatagoryChange}
/>
</div>
<div className="grid grid-cols-5 max-lg:grid-cols-4 max-md:grid-cols-3 max-sm:grid-cols-2 max-[380px]:grid-cols-1 max">
<div className="grid grid-cols-5 max-lg:grid-cols-4 max-md:grid-cols-3 bg-black min-h-screen max-sm:grid-cols-2 max-[380px]:grid-cols-1 max">

{filteredEvents.length === 0 ? (
<p className="p-4">Hi no events yet</p>
<p className="p-4 text-white">Hi no events yet</p>
) : (
filteredEvents.map((event, index) => (
<Eventcard
Expand Down
47 changes: 24 additions & 23 deletions frontend/src/pages/AddEvent.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,18 +72,18 @@ export default function AddEvent() {
<>
<div>
<Navbar />
<div className="flex justify-center items-center min-h-screen bg-gray-100">
<form className="w-full max-w-md bg-white shadow-md rounded-lg p-6">
<h2 className="text-2xl font-bold mb-6 text-gray-800 text-center">
<div className="flex justify-center items-center min-h-screen bg-black">
<form className="w-full max-w-md bg-gray-800 shadow-md rounded-lg p-6 my-2">
<h2 className="text-2xl font-bold mb-6 text-white text-center">
Add Event
</h2>
<div className="space-y-4">
<div>
<label className="block text-sm font-medium text-gray-700 mb-2">
<label className="block text-sm font-medium text-white mb-2">
Title
</label>
<input
className="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-yellow-300 focus:border-transparent"
className="w-full px-4 py-2 border text-black border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-300 focus:border-transparent"
type="text"
placeholder="Enter title"
name="title"
Expand All @@ -92,10 +92,10 @@ export default function AddEvent() {
</div>

<div>
<label className="block text-sm font-medium text-gray-700 mb-2">
<label className="block text-sm font-medium text-white mb-2">
Poster Option
</label>
<div className="flex space-x-4">
<div className="flex space-x-4 text-white">
<label>
<input
type="radio"
Expand All @@ -106,22 +106,23 @@ export default function AddEvent() {
/>
<span className="ml-2">Use URL</span>
</label>
<label>
<label >
<input

type="radio"
name="posterOption"
value="file"
checked={posterOption === "file"}
onChange={() => setPosterOption("file")}
/>
<span className="ml-2">Upload File</span>
<span className="ml-2 text-white">Upload File</span>
</label>
</div>
</div>

{posterOption === "url" && (
<div>
<label className="block text-sm font-medium text-gray-700 mb-2">
<label className="block text-sm font-medium text-white mb-2">
Poster URL
</label>
<input
Expand All @@ -134,11 +135,11 @@ export default function AddEvent() {

{posterOption === "file" && (
<div>
<label className="block text-sm font-medium text-gray-700 mb-2">
<label className="block text-sm font-medium text-white mb-2">
Upload Poster
</label>
<input
className="w-full px-4 py-2 border rounded-lg"
className="w-full text-white px-4 py-2 border rounded-lg"
type="file"
accept="image/*"
onChange={(e) => setPosterFile(e.target.files[0])}
Expand All @@ -147,33 +148,33 @@ export default function AddEvent() {
)}

<div>
<label className="block text-sm font-medium text-gray-700 mb-2">
<label className="block text-sm font-medium text-white mb-2">
Society
</label>
<input
className="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-yellow-300 focus:border-transparent"
className="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-300 focus:border-transparent"
type="text"
placeholder="Enter society"
onChange={(e) => setSociety(e.target.value)}
/>
</div>
<div>
<label className="block text-sm font-medium text-gray-700 mb-2">
<label className="block text-sm font-medium text-white mb-2">
Tags
</label>
<input
className="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-yellow-300 focus:border-transparent"
className="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-300 focus:border-transparent"
type="text"
placeholder="Enter tags separated by spaces"
onChange={handleTagChange}
/>
</div>
<div>
<label className="block text-sm font-medium text-gray-700 mb-2">
<label className="block text-sm font-medium text-white mb-2">
Description
</label>
<textarea
className="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-yellow-300 focus:border-transparent"
className="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-300 focus:border-transparent"
placeholder="Enter description"
name="description"
rows="8"
Expand All @@ -182,22 +183,22 @@ export default function AddEvent() {
</div>
<div className="flex space-x-4">
<div>
<label className="block text-sm font-medium text-gray-700 mb-2">
<label className="block text-sm font-medium text-white mb-2">
Date
</label>
<input
className="px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-yellow-300 focus:border-transparent"
className="px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-300 focus:border-transparent"
type="date"
name="date"
onChange={(e) => setDate(e.target.value)}
/>
</div>
<div>
<label className="block text-sm font-medium text-gray-700 mb-2">
<label className="block text-sm font-medium text-white mb-2">
Time
</label>
<input
className="px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-yellow-300 focus:border-transparent"
className="px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-300 focus:border-transparent"
type="time"
name="time"
onChange={(e) => setTime(e.target.value)}
Expand All @@ -206,7 +207,7 @@ export default function AddEvent() {
</div>
<div>
<button
className="w-full bg-yellow-300 text-gray-900 font-bold py-2 px-4 rounded-lg hover:bg-yellow-400 focus:outline-none focus:ring-2 focus:ring-yellow-500"
className="w-full bg-gray-900 text-white font-bold py-2 px-4 rounded-lg hover:bg-white hover:text-black transition duration-300 "
onClick={handleSubmit}
>
Submit
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/pages/AdminPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,20 @@ export default function AdminPage() {


return (
<div>
<div className="bg-black min-h-screen">
<div>
<Navbar />
</div>
<div>
<h1 className="p-4 text-3xl font-bold">
<h1 className="p-4 text-3xl font-bold text-white">
Pending societies
</h1>
</div>
<div>


{ (pendingSocieties.length===0)?(
<p className="p-4"> No pending societies</p>
<p className="p-4 text-white"> No pending societies</p>
):(pendingSocieties.map((soc) => (
<SocietyCard
id={soc._id}
Expand Down
8 changes: 4 additions & 4 deletions frontend/src/pages/ArchivedEvents.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ export default function ArchivedEvents() {
return (
<div>
<Navbar />
<div className="p-4">
<h2 className="text-3xl font-bold">Archived Events</h2>
<div className="p-4 bg-black min-h-screen">
<h2 className="text-3xl font-bold text-white ">Archived Events</h2>
{pastEvents.length === 0 ? (
<p>No past events to show.</p>
<p className='text-white my-4'>No past events to show.</p>
) : (
<div className="grid grid-cols-5 gap-4">
<div className="grid grid-cols-5 gap-4 ">
{pastEvents.map((event, index) => (
<Eventcard
id={event._id}
Expand Down
8 changes: 4 additions & 4 deletions frontend/src/pages/EventPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ export default function EventPage() {
return (
<div>
<Navbar />
<div className="flex ">
<div className="p-5 w-3/5">
<h1 className="text-5xl p-3 font-semibold">{eventDetails.title.charAt(0).toUpperCase()+eventDetails.title.slice(1)}</h1>
<div className="flex bg-black min-h-screen">
<div className="p-5 w-3/5 ">
<h1 className="text-5xl p-3 font-semibold text-white">{eventDetails.title.charAt(0).toUpperCase()+eventDetails.title.slice(1)}</h1>
<p
className="text-xl p-4 font-poppins"
className="text-xl p-4 font-poppins text-white"
dangerouslySetInnerHTML={{
__html: makeLinksClickable(eventDetails.description).replace(/\n/g, "<br>"),
}}
Expand Down
28 changes: 14 additions & 14 deletions frontend/src/pages/Register.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,74 +43,74 @@ export default function Register() {
</div>

<div>
<div className="bg-gray-100 flex items-center justify-center min-h-screen">
<div className="bg-white p-6 rounded-lg shadow-lg w-full max-w-lg">
<h2 className="text-2xl font-bold mb-4 text-center">
<div className="bg-black flex items-center justify-center min-h-screen">
<div className="bg-gray-800 p-6 rounded-lg shadow-lg w-full max-w-lg">
<h2 className="text-2xl text-white font-bold mb-4 text-center">
Register Society
</h2>
<form >
<div className="mb-4">
<label className="block text-gray-700 font-semibold mb-2">
<label className="block text-white font-semibold mb-2">
Society Name
</label>
<input
type="text"
className="w-full p-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"
className="w-full text-black p-2 border border-white rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"
onChange={(e) => {
setName(e.target.value);
}}
required
/>
</div>
<div className="mb-4">
<label className="block text-gray-700 font-semibold mb-2">
<label className="block text-white font-semibold mb-2">
Mail
</label>
<input
type="email"
className="w-full p-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"
className="w-full p-2 border text-black border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"
onChange={(e) => {
setMail(e.target.value);
}}
required
/>
</div>
<div className="mb-4">
<label className="block text-gray-700 font-semibold mb-2">
<label className="block text-white font-semibold mb-2">
Phone
</label>
<input
type="text"
className="w-full p-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"
className="w-full p-2 border text-black border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"
onChange={(e) => {
setPhone(e.target.value);
}}
/>
</div>
<div className="mb-4">
<label className="block text-gray-700 font-semibold mb-2">
<label className="block text-white font-semibold mb-2">
Password
</label>
<input
type="text"
className="w-full p-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"
className="w-full p-2 border border-gray-300 text-black rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"
onChange={(e) => {
setPassword(e.target.value);
}}
/>
</div>
<div className="mb-4">
<label className="block text-gray-700 font-semibold mb-2">
<label className="block text-white font-semibold mb-2">
Description
</label>
<textarea className="w-full p-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 " onChange={(e)=>{
<textarea className="w-full p-2 border border-gray-300 text-black rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 " onChange={(e)=>{
setDescription(e.target.value)
}}></textarea>
</div>

<button
type="submit"
className="w-full bg-blue-500 text-white p-2 rounded-lg hover:bg-blue-600"
className="w-full bg-gray-900 text-white p-2 rounded-lg font-semibold hover:bg-white hover:text-black transition duration-300"
onClick={handleSubmit}
>
Submit
Expand Down
14 changes: 7 additions & 7 deletions frontend/src/pages/Signin.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,30 +32,30 @@ export default function Signin() {
<div>
<Navbar />
</div>
<div className="bg-gray-100 flex items-center justify-center min-h-screen">
<div className="bg-white p-6 rounded-lg shadow-lg w-full max-w-lg">
<div className="bg-black flex text-white items-center justify-center min-h-screen">
<div className="bg-gray-800 p-6 rounded-lg shadow-lg w-full max-w-lg">
<h2 className="text-2xl font-bold mb-4 text-center">Signin</h2>
<form>
<div className="mb-4">
<label className="block text-gray-700 font-semibold mb-2">
<label className="block text-white font-semibold mb-2">
Mail
</label>
<input
type="text"
className="w-full p-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"
className="w-full p-2 border text-black border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"
onChange={(e) => {
setMail(e.target.value);
}}
required
/>
</div>
<div className="mb-4">
<label className="block text-gray-700 font-semibold mb-2">
<label className="block text-white font-semibold mb-2">
password
</label>
<input
type="email"
className="w-full p-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"
className="w-full text-black p-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"
onChange={(e) => {
setPassword(e.target.value);
}}
Expand All @@ -65,7 +65,7 @@ export default function Signin() {

<button
type="submit"
className="w-full bg-blue-500 text-white p-2 rounded-lg hover:bg-blue-600"
className="w-full bg-gray-900 text-white p-2 font-semibold rounded-lg hover:bg-white hover:text-black transition duration-300"
onClick={handleSubmit}
>
Submit
Expand Down

0 comments on commit 54bf533

Please sign in to comment.