From 86ed31672835e27dc43c5204768b196eaf4bc53f Mon Sep 17 00:00:00 2001 From: LaxmiB Date: Wed, 7 Jan 2026 17:32:40 +0530 Subject: [PATCH] Updated Careers page and Projects styling --- src/pages/Careers.jsx | 264 +++++++++++++++++++++++++--------------- src/styles/Projects.css | 114 ++++++++--------- 2 files changed, 212 insertions(+), 166 deletions(-) diff --git a/src/pages/Careers.jsx b/src/pages/Careers.jsx index a37448b..8a1967a 100644 --- a/src/pages/Careers.jsx +++ b/src/pages/Careers.jsx @@ -1,4 +1,4 @@ -import React, { useState, useEffect } from 'react'; +import React, { useState, useEffect , useRef } from 'react'; import { useNavigate } from 'react-router-dom'; import careersBanner from '../assets/careers-banner.jpg'; import careerImg from '../assets/career.jpg'; @@ -24,7 +24,8 @@ const Careers = () => { }); const [filteredJobs, setFilteredJobs] = useState([]); const [activeOnly, setActiveOnly] = useState(true); - + const [showSuccessMessage, setShowSuccessMessage] = useState(false); + const resumeInputRef = useRef(null); // useEffect(() => { // const handleShortcut = (e) => { // if (e.altKey && e.key.toLowerCase() === "n") { @@ -581,109 +582,170 @@ const Careers = () => { */} -
-

HR Contact Form

-
-
- - -
- -
- - -
- -
- - -
- -
- - -
- -
- {/* */} +
+ {/* Success Popup */} + {showSuccessMessage && ( +
+
+

Thank you for connecting!

+

We will get back to you soon.

- -
+
+ )} + +

Let’s Connect With Us

+
{ + e.preventDefault(); + + if (!formData.resume) { + alert("Please upload your resume."); + return; + } + + setLoading(true); + try { + const data = new FormData(); + data.append("fullName", formData.fullName); + data.append("email", formData.email); + data.append("phone", formData.phone); + data.append("resume", formData.resume); + + const response = await fetch(`${process.env.REACT_APP_API_BASE_URL}/api/careers/contact`, { + method: "POST", + body: data, + }); + + const result = await response.json(); + + if (response.ok) { + // Show popup message + setShowSuccessMessage(true); + + // Reset the form + setFormData({ + fullName: "", + email: "", + phone: "", + resume: null, + }); + if (resumeInputRef.current) { + resumeInputRef.current.value = null; + } + } else { + alert(result.error || "Failed to submit the form. Please try again."); + } + } catch (error) { + console.error("Error submitting form:", error); + alert("Server error. Please try again later."); + } + setLoading(false); + }} + > + {/* Full Name */} +
+ + +
+ + {/* Email */} +
+ + +
+ + {/* Phone */} +
+ + +
+ + {/* Resume */} +
+ + +
+ +
+ +
+
+
+
diff --git a/src/styles/Projects.css b/src/styles/Projects.css index 1df53fb..7a5d2b8 100644 --- a/src/styles/Projects.css +++ b/src/styles/Projects.css @@ -1,73 +1,57 @@ -/* Projects.css */ +/* ===================== + Projects.css +===================== */ + +/* Force cards to match height */ +.radar-like-slider .slick-track { + display: flex !important; + align-items: stretch; +} -/* Slider override */ .radar-like-slider .slick-slide { - padding: 0 0.75rem; + height: inherit !important; + display: flex !important; } -/* Card */ -.radar-card { - text-align: center; - cursor: pointer; +.radar-like-slider .slick-slide > div { + width: 100% !important; + height: 100% !important; +} +/* --- Fix for Overlapping Dots Grid --- */ +.radar-like-slider .slick-dots { + bottom: -40px !important; + display: flex !important; + flex-direction: row !important; + flex-wrap: nowrap !important; /* Forces dots into a single horizontal row */ + justify-content: center !important; + list-style: none !important; + padding: 0 !important; + width: 100% !important; } -.radar-image { - width: 100%; - height: 12rem; - object-fit: cover; - border-radius: 0.75rem; - transition: transform 0.3s ease-in-out, box-shadow 0.3s ease; -} +/* --- Mobile View Adjustments --- */ +@media (max-width: 768px) { + /* Force the single card to fill the screen width to stop congestion */ + .radar-like-slider .slick-slide { + width: 100% !important; + padding: 0 15px; + } -.radar-image:hover { - transform: translateY(-6px) scale(1.05); - box-shadow: 0 8px 20px rgba(0,0,0,0.15); -} + /* Expand image area for the single-card layout */ + .radar-image-container { + aspect-ratio: 16 / 9 !important; + width: 100%; + border-radius: 12px 12px 0 0 !important; + } -.radar-title { - margin-top: 0.5rem; - font-size: 1rem; - font-weight: 600; - color: #1f2937; /* text-gray-800 */ -} - -/* Filter buttons */ -.filter-buttons { - display: flex; - flex-wrap: wrap; - gap: 0.5rem; - margin-bottom: 1.5rem; - justify-content: center; -} - -.sector-btn { - background: #2563eb; - color: #fff; - padding: 0.6rem 1rem; - border-radius: 9999px; - font-weight: 600; - transition: 0.3s; -} - -.sector-btn.selected, -.sector-btn:hover { - background: #1e40af; - transform: scale(1.05); -} - -/* Lightbox */ -.lightbox { - position: fixed; - inset: 0; - background: rgba(0,0,0,0.85); - display: flex; - align-items: center; - justify-content: center; - z-index: 1000; -} - -.lightbox img { - max-width: 90%; - max-height: 90%; - border-radius: 0.5rem; -} + /* Position arrows so they are easy to use on mobile */ + .slick-prev, .slick-next { + z-index: 20 !important; + top: 40% !important; + width: 35px !important; + height: 35px !important; + } + + .slick-prev { left: 5px !important; } + .slick-next { right: 5px !important; } +} \ No newline at end of file