Ss
import React, { useState } from 'react'; import { Card, CardContent } from '@/components/ui/card'; import { Button } from '@/components/ui/button'; import { Input } from '@/components/ui/input'; import { BookOpen, LogIn, FileText, ClipboardCheck, Link as LinkIcon, Lock, LogOut, User, GraduationCap, Award, ChevronDown, ChevronUp } from 'lucide-react';
export default function StudentLearningPortal() { const [loggedIn, setLoggedIn] = useState(false); const [username, setUsername] = useState(''); const [password, setPassword] = useState(''); const [selectedSubject, setSelectedSubject] = useState(null); const [openSubject, setOpenSubject] = useState(null); const [subjectAccess, setSubjectAccess] = useState({});
const subjects = [ { id: 'bangla', name: 'বাংলা', icon: '📘', password: 'bangla123', resources: ['MCQ Test', 'Descriptive Notes', 'Assignment', 'Suggestion'] }, { id: 'english', name: 'English', icon: '📗', password: 'english123', resources: ['MCQ Test', 'Descriptive Notes', 'Assignment', 'Suggestion'] }, { id: 'history', name: 'History', icon: '🏛️', password: 'history123', resources: ['MCQ Test', 'Descriptive Notes', 'Assignment', 'Suggestion'] }, { id: 'geography', name: 'Geography', icon: '🌍', password: 'geo123', resources: ['MCQ Test', 'Descriptive Notes', 'Assignment', 'Suggestion'] } ];
const handleLogin = () => { if (username === 'student' && password === '1234') { setLoggedIn(true); } else { alert('Invalid Username or Password'); } };
const handleSubjectAccess = (subject) => { const entered = prompt(${subject.name} Subject Password:); if (entered === subject.password) { setSubjectAccess((prev) => ({ ...prev, [subject.id]: true })); setOpenSubject(subject.id); setSelectedSubject(subject); } else if (entered !== null) { alert('Incorrect Subject Password'); } };
if (!loggedIn) { return (
setUsername(e.target.value)} placeholder="Username" className="pl-12 h-14 rounded-2xl" />
setPassword(e.target.value)} placeholder="Password" className="pl-12 h-14 rounded-2xl" />
);
}
return (
{selectedSubject ? (
<>
); }
🎯 Student Access Flow
{['Login', 'Dashboard', 'Select Subject', 'Study Content', 'Take Exam'].map((step, i) => (
{step}
))} E-School LMS
Premium Student Learning Portal
📚 Student Dashboard
Subjects, Study Materials & Examination Portal
📘 Subjects
{subjects.map((subject) => (
{openSubject === subject.id && subjectAccess[subject.id] && (
))}
{subject.resources.map((item, i) => (
{item}
))}
)}
📝 Examination Portal
{subjects.map((subject) => (
))}
{subject.icon} {subject.name}
{selectedSubject.icon}
{selectedSubject.name}
Access study notes, assignments, suggestions, and tests.
{selectedSubject.resources.map((item, i) => (
>
) : (
<>
{item}
))}
Select a Subject
Choose a subject to unlock learning resources.
> )}
No comments