feat: complete premium NEET/JEE platform with admin, student dashboards, and upgraded branding

This commit is contained in:
2026-06-24 13:47:25 +05:30
parent 6764521f83
commit ce01795aa9
44 changed files with 3131 additions and 76 deletions

View File

@@ -0,0 +1,139 @@
import { Button } from "@/components/ui/button"
import { Badge } from "@/components/ui/badge"
import { Clock, Flag, ChevronLeft, ChevronRight, Pause, MoreVertical } from "lucide-react"
import Image from "next/image"
export default function CBTExamPage({ params }: { params: { examId: string } }) {
return (
<>
<header className="border-b border-border bg-background px-6 py-4 flex items-center justify-between sticky top-0 z-10">
<div className="flex items-center gap-4">
<div className="relative h-14 w-56 shrink-0">
<Image
src="/PragatiVeer_Logo/SVG_Logos/Rectangular_light_background.svg"
alt="PragatiVeer"
fill
className="object-contain object-left scale-135 origin-left dark:hidden"
priority
/>
<Image
src="/PragatiVeer_Logo/SVG_Logos/Rectangular_dark_background.svg"
alt="PragatiVeer"
fill
className="object-contain object-left scale-135 origin-left hidden dark:block"
priority
/>
</div>
<div className="h-6 w-px bg-border hidden md:block"></div>
<div className="hidden md:block">
<h1 className="font-semibold text-sm">AITS Full Syllabus Test 4</h1>
<p className="text-xs text-muted-foreground font-medium mt-0.5">Physics • Section A</p>
</div>
</div>
<div className="flex items-center gap-3 md:gap-6">
<div className="flex items-center gap-2 bg-secondary/50 px-3 py-1.5 md:px-4 md:py-2 rounded-xl font-mono text-base md:text-lg tracking-wider font-medium text-foreground">
<Clock size={18} className="text-muted-foreground" />
02:45:12
</div>
<Button variant="outline" size="sm" className="gap-2 rounded-xl hidden md:flex">
<Pause size={14} /> Pause
</Button>
<Button size="sm" className="rounded-xl">Submit Exam</Button>
</div>
</header>
<div className="flex flex-1 overflow-hidden relative">
{/* Main Question Area */}
<main className="flex-1 overflow-y-auto p-6 lg:p-12 pb-24 lg:pb-12">
<div className="max-w-3xl mx-auto space-y-8">
<div className="flex items-center justify-between border-b border-border pb-4">
<Badge variant="secondary" className="px-3 py-1 text-sm bg-secondary text-secondary-foreground font-medium rounded-lg">Question 12</Badge>
<div className="flex items-center gap-3">
<span className="text-xs font-semibold uppercase tracking-wider text-muted-foreground bg-secondary/30 px-2 py-1 rounded-md">+4 / -1</span>
<Button variant="ghost" size="icon" className="h-8 w-8 text-muted-foreground hover:text-foreground rounded-lg">
<Flag size={16} />
</Button>
</div>
</div>
<div className="prose prose-neutral dark:prose-invert max-w-none text-lg leading-loose text-foreground">
<p>
A solid cylinder of mass <span className="font-mono text-primary bg-secondary/50 px-1.5 py-0.5 rounded-md text-base">M</span> and radius <span className="font-mono text-primary bg-secondary/50 px-1.5 py-0.5 rounded-md text-base">R</span> is rolling without slipping down an inclined plane of angle <span className="font-mono text-primary bg-secondary/50 px-1.5 py-0.5 rounded-md text-base">θ</span>.
What is the minimum coefficient of static friction <span className="font-mono text-primary bg-secondary/50 px-1.5 py-0.5 rounded-md text-base">μ_s</span> required to prevent slipping?
</p>
</div>
<div className="space-y-3 mt-8">
{['(1/3) tan θ', '(2/3) tan θ', '(1/2) tan θ', 'tan θ'].map((option, idx) => (
<button
key={idx}
className="w-full text-left p-4 rounded-xl border border-border bg-background hover:border-primary/50 hover:bg-secondary/20 transition-all duration-300 flex items-center gap-4 group focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent"
>
<div className="flex-shrink-0 size-8 rounded-lg border border-border flex items-center justify-center font-medium text-muted-foreground group-hover:border-primary/50 group-hover:text-primary group-hover:bg-primary/5 transition-colors">
{String.fromCharCode(65 + idx)}
</div>
<span className="text-base font-medium">{option}</span>
</button>
))}
</div>
</div>
</main>
{/* Side Panel for Question Grid */}
<aside className="w-80 border-l border-border bg-secondary/10 flex flex-col hidden lg:flex">
<div className="p-5 border-b border-border flex items-center justify-between bg-background">
<h3 className="font-semibold text-sm tracking-tight uppercase text-muted-foreground">Question Palette</h3>
<Button variant="ghost" size="icon" className="h-8 w-8 rounded-lg"><MoreVertical size={16}/></Button>
</div>
<div className="flex-1 overflow-y-auto p-5">
<div className="mb-8 space-y-3 bg-background border border-border p-4 rounded-xl">
<div className="flex items-center justify-between text-xs font-medium text-muted-foreground">
<div className="flex items-center gap-2"><div className="size-3.5 rounded-full bg-primary shadow-sm"></div> Answered <span className="text-foreground ml-1">(11)</span></div>
<div className="flex items-center gap-2"><div className="size-3.5 rounded-full border-2 border-border bg-background"></div> Not Visited <span className="text-foreground ml-1">(28)</span></div>
</div>
<div className="flex items-center justify-between text-xs font-medium text-muted-foreground">
<div className="flex items-center gap-2"><div className="size-3.5 rounded-full bg-destructive shadow-sm"></div> Not Answered <span className="text-foreground ml-1">(4)</span></div>
<div className="flex items-center gap-2"><div className="size-3.5 rounded-full bg-amber-500 shadow-sm"></div> Marked <span className="text-foreground ml-1">(2)</span></div>
</div>
</div>
<div className="space-y-6">
<div>
<h4 className="text-xs font-semibold uppercase tracking-wider text-muted-foreground mb-4 flex items-center gap-2">
<span className="h-px bg-border flex-1"></span> Physics <span className="h-px bg-border flex-1"></span>
</h4>
<div className="grid grid-cols-5 gap-2.5">
{Array.from({length: 20}).map((_, i) => (
<button
key={i}
className={`size-11 rounded-lg flex items-center justify-center text-sm font-medium transition-all duration-200 border focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary
${i === 11 ? 'ring-2 ring-primary ring-offset-2 ring-offset-background border-transparent bg-background shadow-sm' : ''}
${i < 5 ? 'bg-primary border-primary text-primary-foreground shadow-sm' : ''}
${i >= 5 && i < 7 ? 'bg-destructive border-destructive text-destructive-foreground shadow-sm' : ''}
${i === 7 ? 'bg-amber-500 border-amber-500 text-amber-50-foreground shadow-sm' : ''}
${i > 11 ? 'bg-background border-border text-muted-foreground hover:border-primary/50 hover:text-foreground' : ''}
`}
>
{i + 1}
</button>
))}
</div>
</div>
</div>
</div>
<div className="p-5 border-t border-border bg-background grid grid-cols-2 gap-3">
<Button variant="outline" className="rounded-xl w-full gap-1.5 h-12"><ChevronLeft size={16}/> Previous</Button>
<Button className="rounded-xl w-full gap-1.5 h-12 shadow-sm">Save & Next <ChevronRight size={16}/></Button>
</div>
</aside>
{/* Mobile bottom nav */}
<div className="lg:hidden absolute bottom-0 left-0 right-0 p-4 border-t border-border bg-background/95 backdrop-blur-sm grid grid-cols-2 gap-3">
<Button variant="outline" className="rounded-xl w-full gap-1.5 h-12"><ChevronLeft size={16}/> Previous</Button>
<Button className="rounded-xl w-full gap-1.5 h-12 shadow-sm">Save & Next <ChevronRight size={16}/></Button>
</div>
</div>
</>
)
}