Prakhar Singh
commited on
Commit
·
d000035
1
Parent(s):
b811a8f
Spotlight is added in the hero secttion
Browse files
Frontend/src/components/auth/SignUp.tsx
CHANGED
|
@@ -5,7 +5,7 @@ import { User, Mail, Lock, UserPlus, Chrome, X } from 'lucide-react'; // Added '
|
|
| 5 |
interface SignUpProps {
|
| 6 |
onClose: () => void;
|
| 7 |
onSwitchToSignIn: () => void;
|
| 8 |
-
|
| 9 |
}
|
| 10 |
|
| 11 |
const SignUp: React.FC<SignUpProps> = ({ onClose, onSwitchToSignIn }) => {
|
|
|
|
| 5 |
interface SignUpProps {
|
| 6 |
onClose: () => void;
|
| 7 |
onSwitchToSignIn: () => void;
|
| 8 |
+
onAuthSuccess: () => void;// You might want to add onAuthSuccess here later, similar to SignIn
|
| 9 |
}
|
| 10 |
|
| 11 |
const SignUp: React.FC<SignUpProps> = ({ onClose, onSwitchToSignIn }) => {
|
Frontend/src/components/ui/spotlight.tsx
CHANGED
|
@@ -1,55 +1,64 @@
|
|
|
|
|
|
|
|
| 1 |
import { cn } from "../../lib/utils";
|
| 2 |
|
| 3 |
type SpotlightProps = {
|
|
|
|
| 4 |
className?: string;
|
| 5 |
-
fill?: string;
|
| 6 |
};
|
| 7 |
|
| 8 |
-
export const Spotlight = ({
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
return (
|
| 10 |
-
<
|
| 11 |
className={cn(
|
| 12 |
-
"
|
| 13 |
className
|
| 14 |
)}
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
>
|
| 19 |
-
<
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
<
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
y="0.838989"
|
| 35 |
-
width="3785.16"
|
| 36 |
-
height="2840.26"
|
| 37 |
-
filterUnits="userSpaceOnUse"
|
| 38 |
-
colorInterpolationFilters="sRGB"
|
| 39 |
-
>
|
| 40 |
-
<feFlood floodOpacity="0" result="BackgroundImageFix"></feFlood>
|
| 41 |
-
<feBlend
|
| 42 |
-
mode="normal"
|
| 43 |
-
in="SourceGraphic"
|
| 44 |
-
in2="BackgroundImageFix"
|
| 45 |
-
result="shape"
|
| 46 |
-
></feBlend>
|
| 47 |
-
<feGaussianBlur
|
| 48 |
-
stdDeviation="151"
|
| 49 |
-
result="effect1_foregroundBlur_1065_8"
|
| 50 |
-
></feGaussianBlur>
|
| 51 |
-
</filter>
|
| 52 |
-
</defs>
|
| 53 |
-
</svg>
|
| 54 |
);
|
| 55 |
-
};
|
|
|
|
| 1 |
+
import { useEffect, useState } from "react";
|
| 2 |
+
import type { RefObject } from "react";
|
| 3 |
import { cn } from "../../lib/utils";
|
| 4 |
|
| 5 |
type SpotlightProps = {
|
| 6 |
+
parentRef: RefObject<HTMLDivElement|null>;
|
| 7 |
className?: string;
|
|
|
|
| 8 |
};
|
| 9 |
|
| 10 |
+
export const Spotlight = ({ parentRef, className }: SpotlightProps) => {
|
| 11 |
+
const [pos, setPos] = useState({ x: -9999, y: -9999 });
|
| 12 |
+
|
| 13 |
+
useEffect(() => {
|
| 14 |
+
const parent = parentRef.current;
|
| 15 |
+
if (!parent) return;
|
| 16 |
+
|
| 17 |
+
const handleMove = (e: MouseEvent) => {
|
| 18 |
+
const rect = parent.getBoundingClientRect();
|
| 19 |
+
setPos({
|
| 20 |
+
x: e.clientX - rect.left,
|
| 21 |
+
y: e.clientY - rect.top,
|
| 22 |
+
});
|
| 23 |
+
};
|
| 24 |
+
|
| 25 |
+
const handleLeave = () => {
|
| 26 |
+
setPos({ x: -9999, y: -9999 });
|
| 27 |
+
};
|
| 28 |
+
|
| 29 |
+
parent.addEventListener("mousemove", handleMove);
|
| 30 |
+
parent.addEventListener("mouseleave", handleLeave);
|
| 31 |
+
|
| 32 |
+
return () => {
|
| 33 |
+
parent.removeEventListener("mousemove", handleMove);
|
| 34 |
+
parent.removeEventListener("mouseleave", handleLeave);
|
| 35 |
+
};
|
| 36 |
+
}, [parentRef]);
|
| 37 |
+
|
| 38 |
return (
|
| 39 |
+
<div
|
| 40 |
className={cn(
|
| 41 |
+
"pointer-events-none absolute inset-0 z-0 transition-transform duration-75 ease-out",
|
| 42 |
className
|
| 43 |
)}
|
| 44 |
+
style={{
|
| 45 |
+
transform: `translate(${pos.x - 600}px, ${pos.y - 600}px)`,
|
| 46 |
+
}}
|
| 47 |
>
|
| 48 |
+
<svg
|
| 49 |
+
className="w-[1200px] h-[1200px] opacity-40 blur-3xl"
|
| 50 |
+
viewBox="0 0 1200 1200"
|
| 51 |
+
fill="none"
|
| 52 |
+
>
|
| 53 |
+
<defs>
|
| 54 |
+
<radialGradient id="spot" cx="50%" cy="50%" r="50%">
|
| 55 |
+
<stop offset="0%" stopColor="white" stopOpacity="0.35" />
|
| 56 |
+
<stop offset="100%" stopColor="white" stopOpacity="0" />
|
| 57 |
+
</radialGradient>
|
| 58 |
+
</defs>
|
| 59 |
+
|
| 60 |
+
<circle cx="600" cy="600" r="600" fill="url(#spot)" />
|
| 61 |
+
</svg>
|
| 62 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 63 |
);
|
| 64 |
+
};
|
Frontend/src/pages/home.tsx
CHANGED
|
@@ -1,11 +1,10 @@
|
|
| 1 |
-
import React, { useState, useEffect } from 'react';
|
| 2 |
import { Sparkles, Zap, Target, Clock, Award, ChevronRight, Menu, X } from 'lucide-react';
|
| 3 |
import AuthModal from '../components/auth/AuthModal';
|
| 4 |
import SignIn from '../components/auth/SignIn';
|
| 5 |
import SignUp from '../components/auth/SignUp';
|
| 6 |
import { SplineScene } from '../components/ui/splite';
|
| 7 |
import { Spotlight } from '../components/ui/spotlight';
|
| 8 |
-
import { Card } from '../components/ui/card';
|
| 9 |
|
| 10 |
interface Feature {
|
| 11 |
icon: React.ReactNode;
|
|
@@ -90,6 +89,8 @@ const AIInterviewPlatform: React.FC<AIInterviewPlatformProps> = ({ onLogin }) =>
|
|
| 90 |
{ step: "03", title: "Get Feedback", desc: "Receive detailed analysis and improvement tips" }
|
| 91 |
];
|
| 92 |
|
|
|
|
|
|
|
| 93 |
return (
|
| 94 |
<div className="w-full min-h-screen bg-gradient-to-br from-blue-900 to-gray-400 text-white overflow-x-hidden">
|
| 95 |
{/* Navigation Bar */}
|
|
@@ -199,13 +200,10 @@ const AIInterviewPlatform: React.FC<AIInterviewPlatformProps> = ({ onLogin }) =>
|
|
| 199 |
</AuthModal>
|
| 200 |
|
| 201 |
{/* Hero Section */}
|
| 202 |
-
<section id="home" className="min-h-[calc(100vh-68px)] flex items-center pt-10 pb-20 px-4 sm:px-6 lg:px-8 relative overflow-hidden bg-black">
|
|
|
|
|
|
|
| 203 |
<div className="max-w-7xl mx-auto w-full relative z-10">
|
| 204 |
-
{/* Spotlight applied directly to the container as per the demo structure */}
|
| 205 |
-
<Spotlight
|
| 206 |
-
className="-top-40 left-0 md:left-60 md:-top-20"
|
| 207 |
-
fill="white"
|
| 208 |
-
/>
|
| 209 |
<div className="grid grid-cols-1 lg:grid-cols-2 gap-12 items-center">
|
| 210 |
{/* Left side - Text content */}
|
| 211 |
<div>
|
|
|
|
| 1 |
+
import React, { useState, useEffect, useRef } from 'react';
|
| 2 |
import { Sparkles, Zap, Target, Clock, Award, ChevronRight, Menu, X } from 'lucide-react';
|
| 3 |
import AuthModal from '../components/auth/AuthModal';
|
| 4 |
import SignIn from '../components/auth/SignIn';
|
| 5 |
import SignUp from '../components/auth/SignUp';
|
| 6 |
import { SplineScene } from '../components/ui/splite';
|
| 7 |
import { Spotlight } from '../components/ui/spotlight';
|
|
|
|
| 8 |
|
| 9 |
interface Feature {
|
| 10 |
icon: React.ReactNode;
|
|
|
|
| 89 |
{ step: "03", title: "Get Feedback", desc: "Receive detailed analysis and improvement tips" }
|
| 90 |
];
|
| 91 |
|
| 92 |
+
const heroRef = useRef<HTMLDivElement>(null);
|
| 93 |
+
|
| 94 |
return (
|
| 95 |
<div className="w-full min-h-screen bg-gradient-to-br from-blue-900 to-gray-400 text-white overflow-x-hidden">
|
| 96 |
{/* Navigation Bar */}
|
|
|
|
| 200 |
</AuthModal>
|
| 201 |
|
| 202 |
{/* Hero Section */}
|
| 203 |
+
<section ref={heroRef} id="home" className="min-h-[calc(100vh-68px)] flex items-center pt-10 pb-20 px-4 sm:px-6 lg:px-8 relative overflow-hidden bg-black">
|
| 204 |
+
{/* Spotlight applied directly to the container as per the demo structure */}
|
| 205 |
+
<Spotlight parentRef={heroRef} color="#4b9fff" className="mix-blend-screen" />
|
| 206 |
<div className="max-w-7xl mx-auto w-full relative z-10">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 207 |
<div className="grid grid-cols-1 lg:grid-cols-2 gap-12 items-center">
|
| 208 |
{/* Left side - Text content */}
|
| 209 |
<div>
|