Spaces:
Running
Running
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>EduTrack - Learning Management System</title> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> | |
| <style> | |
| .sidebar { | |
| transition: all 0.3s ease; | |
| } | |
| .progress-ring__circle { | |
| transition: stroke-dashoffset 0.35s; | |
| transform: rotate(-90deg); | |
| transform-origin: 50% 50%; | |
| } | |
| .course-card:hover { | |
| transform: translateY(-5px); | |
| box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); | |
| } | |
| @media (max-width: 768px) { | |
| .sidebar { | |
| position: fixed; | |
| left: -100%; | |
| top: 0; | |
| z-index: 50; | |
| height: 100vh; | |
| } | |
| .sidebar.active { | |
| left: 0; | |
| } | |
| } | |
| </style> | |
| </head> | |
| <body class="bg-gray-50 font-sans"> | |
| <!-- Login Screen --> | |
| <div id="loginScreen" class="fixed inset-0 bg-gray-900 bg-opacity-50 flex items-center justify-center z-50"> | |
| <div class="bg-white rounded-xl shadow-xl p-8 w-full max-w-md"> | |
| <div class="text-center mb-8"> | |
| <h1 class="text-3xl font-bold text-blue-600 flex items-center justify-center"> | |
| <i class="fas fa-graduation-cap mr-2"></i> EduTrack | |
| </h1> | |
| <p class="text-gray-600 mt-2">Sign in to your account</p> | |
| </div> | |
| <form id="loginForm" class="space-y-4"> | |
| <div> | |
| <label for="email" class="block text-sm font-medium text-gray-700 mb-1">Email</label> | |
| <input type="email" id="email" required | |
| class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500" | |
| placeholder="your@email.com"> | |
| </div> | |
| <div> | |
| <label for="password" class="block text-sm font-medium text-gray-700 mb-1">Password</label> | |
| <input type="password" id="password" required | |
| class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500" | |
| placeholder="••••••••"> | |
| </div> | |
| <div class="flex items-center justify-between"> | |
| <div class="flex items-center"> | |
| <input id="remember" type="checkbox" | |
| class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded"> | |
| <label for="remember" class="ml-2 block text-sm text-gray-700">Remember me</label> | |
| </div> | |
| <a href="#" class="text-sm text-blue-600 hover:text-blue-800">Forgot password?</a> | |
| </div> | |
| <button type="submit" | |
| class="w-full bg-blue-600 text-white py-2 px-4 rounded-lg hover:bg-blue-700 transition duration-300"> | |
| Sign in | |
| </button> | |
| </form> | |
| <div class="mt-6 text-center"> | |
| <p class="text-sm text-gray-600"> | |
| Don't have an account? | |
| <a href="#" class="text-blue-600 hover:text-blue-800 font-medium">Sign up</a> | |
| </p> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Main Content (hidden initially) --> | |
| <div id="mainContent" class="hidden"> | |
| <!-- Mobile Menu Button --> | |
| <button id="mobileMenuButton" class="md:hidden fixed top-4 left-4 z-50 bg-white p-2 rounded-lg shadow-lg"> | |
| <i class="fas fa-bars text-blue-600 text-xl"></i> | |
| </button> | |
| <!-- Sidebar Navigation --> | |
| <div class="sidebar bg-white w-64 fixed h-full shadow-lg"> | |
| <div class="p-4 border-b border-gray-200"> | |
| <h1 class="text-2xl font-bold text-blue-600 flex items-center"> | |
| <i class="fas fa-graduation-cap mr-2"></i> EduTrack | |
| </h1> | |
| <p class="text-gray-500 text-sm">Learning Management System</p> | |
| </div> | |
| <div class="p-4"> | |
| <div class="flex items-center mb-6"> | |
| <img src="https://randomuser.me/api/portraits/women/44.jpg" alt="User" class="w-10 h-10 rounded-full mr-3"> | |
| <div> | |
| <p class="font-medium">Sarah Johnson</p> | |
| <p class="text-gray-500 text-sm">Student</p> | |
| </div> | |
| </div> | |
| <nav> | |
| <ul> | |
| <li class="mb-1"> | |
| <a href="#" class="flex items-center p-2 text-blue-600 bg-blue-50 rounded-lg"> | |
| <i class="fas fa-home mr-3"></i> Dashboard | |
| </a> | |
| </li> | |
| <li class="mb-1"> | |
| <a href="#" class="flex items-center p-2 text-gray-600 hover:bg-blue-50 rounded-lg"> | |
| <i class="fas fa-book mr-3"></i> My Courses | |
| </a> | |
| </li> | |
| <li class="mb-1"> | |
| <a href="#" class="flex items-center p-2 text-gray-600 hover:bg-blue-50 rounded-lg"> | |
| <i class="fas fa-calendar-alt mr-3"></i> Calendar | |
| </a> | |
| </li> | |
| <li class="mb-1"> | |
| <a href="#" class="flex items-center p-2 text-gray-600 hover:bg-blue-50 rounded-lg"> | |
| <i class="fas fa-tasks mr-3"></i> Assignments | |
| </a> | |
| </li> | |
| <li class="mb-1"> | |
| <a href="#" class="flex items-center p-2 text-gray-600 hover:bg-blue-50 rounded-lg"> | |
| <i class="fas fa-chart-line mr-3"></i> Progress | |
| </a> | |
| </li> | |
| <li class="mb-1"> | |
| <a href="#" class="flex items-center p-2 text-gray-600 hover:bg-blue-50 rounded-lg"> | |
| <i class="fas fa-comments mr-3"></i> Discussions | |
| </a> | |
| </li> | |
| <li class="mb-1"> | |
| <a href="#" class="flex items-center p-2 text-gray-600 hover:bg-blue-50 rounded-lg"> | |
| <i class="fas fa-cog mr-3"></i> Settings | |
| </a> | |
| </li> | |
| </ul> | |
| </nav> | |
| </div> | |
| <div class="absolute bottom-0 w-full p-4 border-t border-gray-200"> | |
| <button data-logout class="flex items-center text-gray-600 hover:text-blue-600 w-full p-2"> | |
| <i class="fas fa-sign-out-alt mr-3"></i> Logout | |
| </button> | |
| </div> | |
| </div> | |
| <!-- Main Content --> | |
| <div id="mainContainer" class="ml-0 md:ml-64 transition-all duration-300"> | |
| <!-- Header --> | |
| <header class="bg-white shadow-sm p-4"> | |
| <div class="flex justify-between items-center"> | |
| <h2 class="text-xl font-semibold text-gray-800">Dashboard</h2> | |
| <div class="flex items-center space-x-4"> | |
| <div class="relative"> | |
| <i class="fas fa-search absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400"></i> | |
| <input type="text" placeholder="Search..." class="pl-10 pr-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"> | |
| </div> | |
| <div class="relative"> | |
| <i class="fas fa-bell text-gray-600 text-xl cursor-pointer"></i> | |
| <span class="absolute top-0 right-0 h-2 w-2 rounded-full bg-red-500"></span> | |
| </div> | |
| </div> | |
| </div> | |
| </header> | |
| <!-- Dashboard Content --> | |
| <main class="p-4 md:p-6"> | |
| <!-- Welcome Banner --> | |
| <div class="bg-gradient-to-r from-blue-500 to-blue-600 rounded-xl p-6 text-white mb-6"> | |
| <div class="flex flex-col md:flex-row justify-between items-start md:items-center"> | |
| <div> | |
| <h3 class="text-2xl font-bold mb-2">Welcome back, Sarah!</h3> | |
| <p class="mb-4">You have 3 active courses and 2 assignments due this week.</p> | |
| <button class="bg-white text-blue-600 px-4 py-2 rounded-lg font-medium hover:bg-blue-50 transition">View Assignments</button> | |
| </div> | |
| <img src="https://cdn-icons-png.flaticon.com/512/3135/3135715.png" alt="Learning" class="w-32 hidden md:block"> | |
| </div> | |
| </div> | |
| <!-- Stats Cards --> | |
| <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-6"> | |
| <div class="bg-white p-6 rounded-xl shadow-sm border-l-4 border-blue-500"> | |
| <div class="flex justify-between items-start"> | |
| <div> | |
| <p class="text-gray-500">Active Courses</p> | |
| <h3 class="text-2xl font-bold mt-2">3</h3> | |
| </div> | |
| <div class="bg-blue-100 p-3 rounded-lg"> | |
| <i class="fas fa-book text-blue-600 text-xl"></i> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="bg-white p-6 rounded-xl shadow-sm border-l-4 border-green-500"> | |
| <div class="flex justify-between items-start"> | |
| <div> | |
| <p class="text-gray-500">Completed</p> | |
| <h3 class="text-2xl font-bold mt-2">5</h3> | |
| </div> | |
| <div class="bg-green-100 p-3 rounded-lg"> | |
| <i class="fas fa-check-circle text-green-600 text-xl"></i> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="bg-white p-6 rounded-xl shadow-sm border-l-4 border-yellow-500"> | |
| <div class="flex justify-between items-start"> | |
| <div> | |
| <p class="text-gray-500">Assignments Due</p> | |
| <h3 class="text-2xl font-bold mt-2">2</h3> | |
| </div> | |
| <div class="bg-yellow-100 p-3 rounded-lg"> | |
| <i class="fas fa-tasks text-yellow-600 text-xl"></i> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="bg-white p-6 rounded-xl shadow-sm border-l-4 border-purple-500"> | |
| <div class="flex justify-between items-start"> | |
| <div> | |
| <p class="text-gray-500">Hours Learned</p> | |
| <h3 class="text-2xl font-bold mt-2">42</h3> | |
| </div> | |
| <div class="bg-purple-100 p-3 rounded-lg"> | |
| <i class="fas fa-clock text-purple-600 text-xl"></i> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Courses Section --> | |
| <div class="mb-6"> | |
| <div class="flex justify-between items-center mb-4"> | |
| <h3 class="text-xl font-semibold text-gray-800">My Courses</h3> | |
| <button class="text-blue-600 hover:text-blue-800 font-medium">View All</button> | |
| </div> | |
| <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6"> | |
| <!-- Course Card 1 --> | |
| <div class="course-card bg-white rounded-xl shadow-sm overflow-hidden transition duration-300"> | |
| <div class="relative"> | |
| <img src="https://images.unsplash.com/photo-1551288049-bebda4e38f71?ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60" alt="Course" class="w-full h-40 object-cover"> | |
| <div class="absolute top-2 right-2 bg-blue-600 text-white text-xs px-2 py-1 rounded">Active</div> | |
| </div> | |
| <div class="p-4"> | |
| <div class="flex justify-between items-start mb-2"> | |
| <h4 class="font-bold text-lg">Data Science Fundamentals</h4> | |
| <div class="flex items-center text-yellow-400"> | |
| <i class="fas fa-star"></i> | |
| <span class="ml-1 text-gray-600">4.8</span> | |
| </div> | |
| </div> | |
| <p class="text-gray-600 text-sm mb-4">Learn the core concepts of data analysis and visualization.</p> | |
| <div class="flex justify-between items-center"> | |
| <div class="flex items-center"> | |
| <div class="w-10 h-10 relative"> | |
| <svg class="w-10 h-10" viewBox="0 0 36 36"> | |
| <circle class="text-gray-200" stroke-width="4" stroke="currentColor" fill="none" cx="18" cy="18" r="16"></circle> | |
| <circle class="text-blue-600" stroke-width="4" stroke-dasharray="80, 100" stroke-linecap="round" stroke="currentColor" fill="none" cx="18" cy="18" r="16"></circle> | |
| </svg> | |
| <div class="absolute inset-0 flex items-center justify-center text-xs font-semibold">80%</div> | |
| </div> | |
| <span class="ml-2 text-sm text-gray-500">Progress</span> | |
| </div> | |
| <button class="bg-blue-600 text-white px-3 py-1 rounded-lg text-sm hover:bg-blue-700">Continue</button> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Course Card 2 --> | |
| <div class="course-card bg-white rounded-xl shadow-sm overflow-hidden transition duration-300"> | |
| <div class="relative"> | |
| <img src="https://images.unsplash.com/photo-1517694712202-14dd9538aa97?ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60" alt="Course" class="w-full h-40 object-cover"> | |
| <div class="absolute top-2 right-2 bg-blue-600 text-white text-xs px-2 py-1 rounded">Active</div> | |
| </div> | |
| <div class="p-4"> | |
| <div class="flex justify-between items-start mb-2"> | |
| <h4 class="font-bold text-lg">Web Development Bootcamp</h4> | |
| <div class="flex items-center text-yellow-400"> | |
| <i class="fas fa-star"></i> | |
| <span class="ml-1 text-gray-600">4.7</span> | |
| </div> | |
| </div> | |
| <p class="text-gray-600 text-sm mb-4">Master HTML, CSS, JavaScript and modern frameworks.</p> | |
| <div class="flex justify-between items-center"> | |
| <div class="flex items-center"> | |
| <div class="w-10 h-10 relative"> | |
| <svg class="w-10 h-10" viewBox="0 0 36 36"> | |
| <circle class="text-gray-200" stroke-width="4" stroke="currentColor" fill="none" cx="18" cy="18" r="16"></circle> | |
| <circle class="text-blue-600" stroke-width="4" stroke-dasharray="65, 100" stroke-linecap="round" stroke="currentColor" fill="none" cx="18" cy="18" r="16"></circle> | |
| </svg> | |
| <div class="absolute inset-0 flex items-center justify-center text-xs font-semibold">65%</div> | |
| </div> | |
| <span class="ml-2 text-sm text-gray-500">Progress</span> | |
| </div> | |
| <button class="bg-blue-600 text-white px-3 py-1 rounded-lg text-sm hover:bg-blue-700">Continue</button> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Course Card 3 --> | |
| <div class="course-card bg-white rounded-xl shadow-sm overflow-hidden transition duration-300"> | |
| <div class="relative"> | |
| <img src="https://images.unsplash.com/photo-1551434678-e076c223a692?ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60" alt="Course" class="w-full h-40 object-cover"> | |
| <div class="absolute top-2 right-2 bg-green-600 text-white text-xs px-2 py-1 rounded">New</div> | |
| </div> | |
| <div class="p-4"> | |
| <div class="flex justify-between items-start mb-2"> | |
| <h4 class="font-bold text-lg">Mobile App Development</h4> | |
| <div class="flex items-center text-yellow-400"> | |
| <i class="fas fa-star"></i> | |
| <span class="ml-1 text-gray-600">4.9</span> | |
| </div> | |
| </div> | |
| <p class="text-gray-600 text-sm mb-4">Build cross-platform apps with React Native.</p> | |
| <div class="flex justify-between items-center"> | |
| <div class="flex items-center"> | |
| <div class="w-10 h-10 relative"> | |
| <svg class="w-10 h-10" viewBox="0 0 36 36"> | |
| <circle class="text-gray-200" stroke-width="4" stroke="currentColor" fill="none" cx="18" cy="18" r="16"></circle> | |
| <circle class="text-blue-600" stroke-width="4" stroke-dasharray="30, 100" stroke-linecap="round" stroke="currentColor" fill="none" cx="18" cy="18" r="16"></circle> | |
| </svg> | |
| <div class="absolute inset-0 flex items-center justify-center text-xs font-semibold">30%</div> | |
| </div> | |
| <span class="ml-2 text-sm text-gray-500">Progress</span> | |
| </div> | |
| <button class="bg-blue-600 text-white px-3 py-1 rounded-lg text-sm hover:bg-blue-700">Continue</button> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Assignments Section --> | |
| <div class="mb-6"> | |
| <div class="flex justify-between items-center mb-4"> | |
| <h3 class="text-xl font-semibold text-gray-800">Upcoming Assignments</h3> | |
| <button class="text-blue-600 hover:text-blue-800 font-medium">View All</button> | |
| </div> | |
| <div class="bg-white rounded-xl shadow-sm overflow-hidden"> | |
| <div class="overflow-x-auto"> | |
| <table class="min-w-full divide-y divide-gray-200"> | |
| <thead class="bg-gray-50"> | |
| <tr> | |
| <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Course</th> | |
| <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Assignment</th> | |
| <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Due Date</th> | |
| <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Status</th> | |
| <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Action</th> | |
| </tr> | |
| </thead> | |
| <tbody class="bg-white divide-y divide-gray-200"> | |
| <tr> | |
| <td class="px-6 py-4 whitespace-nowrap"> | |
| <div class="flex items-center"> | |
| <div class="flex-shrink-0 h-10 w-10"> | |
| <img class="h-10 w-10 rounded-full" src="https://images.unsplash.com/photo-1551288049-bebda4e38f71?ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60" alt=""> | |
| </div> | |
| <div class="ml-4"> | |
| <div class="text-sm font-medium text-gray-900">Data Science</div> | |
| </div> | |
| </div> | |
| </td> | |
| <td class="px-6 py-4 whitespace-nowrap"> | |
| <div class="text-sm text-gray-900">Final Project Submission</div> | |
| </td> | |
| <td class="px-6 py-4 whitespace-nowrap"> | |
| <div class="text-sm text-gray-900">May 15, 2023</div> | |
| <div class="text-sm text-gray-500">3 days left</div> | |
| </td> | |
| <td class="px-6 py-4 whitespace-nowrap"> | |
| <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-yellow-100 text-yellow-800"> | |
| In Progress | |
| </span> | |
| </td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"> | |
| <button class="text-blue-600 hover:text-blue-900">Submit</button> | |
| </td> | |
| </tr> | |
| <tr> | |
| <td class="px-6 py-4 whitespace-nowrap"> | |
| <div class="flex items-center"> | |
| <div class="flex-shrink-0 h-10 w-10"> | |
| <img class="h-10 w-10 rounded-full" src="https://images.unsplash.com/photo-1517694712202-14dd9538aa97?ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60" alt=""> | |
| </div> | |
| <div class="ml-4"> | |
| <div class="text-sm font-medium text-gray-900">Web Development</div> | |
| </div> | |
| </div> | |
| </td> | |
| <td class="px-6 py-4 whitespace-nowrap"> | |
| <div class="text-sm text-gray-900">React Component Library</div> | |
| </td> | |
| <td class="px-6 py-4 whitespace-nowrap"> | |
| <div class="text-sm text-gray-900">May 18, 2023</div> | |
| <div class="text-sm text-gray-500">6 days left</div> | |
| </td> | |
| <td class="px-6 py-4 whitespace-nowrap"> | |
| <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-yellow-100 text-yellow-800"> | |
| In Progress | |
| </span> | |
| </td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"> | |
| <button class="text-blue-600 hover:text-blue-900">Submit</button> | |
| </td> | |
| </tr> | |
| <tr> | |
| <td class="px-6 py-4 whitespace-nowrap"> | |
| <div class="flex items-center"> | |
| <div class="flex-shrink-0 h-10 w-10"> | |
| <img class="h-10 w-10 rounded-full" src="https://images.unsplash.com/photo-1551434678-e076c223a692?ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60" alt=""> | |
| </div> | |
| <div class="ml-4"> | |
| <div class="text-sm font-medium text-gray-900">Mobile App Dev</div> | |
| </div> | |
| </div> | |
| </td> | |
| <td class="px-6 py-4 whitespace-nowrap"> | |
| <div class="text-sm text-gray-900">Navigation Implementation</div> | |
| </td> | |
| <td class="px-6 py-4 whitespace-nowrap"> | |
| <div class="text-sm text-gray-900">May 20, 2023</div> | |
| <div class="text-sm text-gray-500">8 days left</div> | |
| </td> | |
| <td class="px-6 py-4 whitespace-nowrap"> | |
| <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-blue-100 text-blue-800"> | |
| Not Started | |
| </span> | |
| </td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"> | |
| <button class="text-blue-600 hover:text-blue-900">Start</button> | |
| </td> | |
| </tr> | |
| </tbody> | |
| </table> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Recent Activity --> | |
| <div> | |
| <div class="flex justify-between items-center mb-4"> | |
| <h3 class="text-xl font-semibold text-gray-800">Recent Activity</h3> | |
| <button class="text-blue-600 hover:text-blue-800 font-medium">View All</button> | |
| </div> | |
| <div class="bg-white rounded-xl shadow-sm overflow-hidden p-4"> | |
| <div class="space-y-4"> | |
| <div class="flex items-start"> | |
| <div class="flex-shrink-0"> | |
| <div class="bg-blue-100 p-2 rounded-full"> | |
| <i class="fas fa-check-circle text-blue-600"></i> | |
| </div> | |
| </div> | |
| <div class="ml-3"> | |
| <p class="text-sm font-medium text-gray-900">You completed "JavaScript Basics" lesson</p> | |
| <p class="text-sm text-gray-500">2 hours ago</p> | |
| </div> | |
| </div> | |
| <div class="flex items-start"> | |
| <div class="flex-shrink-0"> | |
| <div class="bg-green-100 p-2 rounded-full"> | |
| <i class="fas fa-comment text-green-600"></i> | |
| </div> | |
| </div> | |
| <div class="ml-3"> | |
| <p class="text-sm font-medium text-gray-900">New comment on your assignment submission</p> | |
| <p class="text-sm text-gray-500">5 hours ago</p> | |
| </div> | |
| </div> | |
| <div class="flex items-start"> | |
| <div class="flex-shrink-0"> | |
| <div class="bg-purple-100 p-2 rounded-full"> | |
| <i class="fas fa-book text-purple-600"></i> | |
| </div> | |
| </div> | |
| <div class="ml-3"> | |
| <p class="text-sm font-medium text-gray-900">New course material added to "Data Science"</p> | |
| <p class="text-sm text-gray-500">1 day ago</p> | |
| </div> | |
| </div> | |
| <div class="flex items-start"> | |
| <div class="flex-shrink-0"> | |
| <div class="bg-yellow-100 p-2 rounded-full"> | |
| <i class="fas fa-certificate text-yellow-600"></i> | |
| </div> | |
| </div> | |
| <div class="ml-3"> | |
| <p class="text-sm font-medium text-gray-900">You earned a certificate for "Web Development"</p> | |
| <p class="text-sm text-gray-500">2 days ago</p> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </main> | |
| </div> | |
| <script> | |
| // Database connection (PHP would be used in a real implementation) | |
| async function connectToDatabase() { | |
| // In a real app, this would be a server-side API call | |
| console.log("Connecting to database..."); | |
| return { | |
| query: async (sql, params) => { | |
| // Mock database response | |
| if (sql.includes('SELECT * FROM users')) { | |
| return [ | |
| { id: 1, email: 'test@example.com', password: '$2a$10$N9qo8uLOickgx2ZMRZoMy.MQDvShWRJCi2f6Qx3Fd7JwY7J8nZJdW' } // bcrypt hash of "password123" | |
| ]; | |
| } | |
| return []; | |
| } | |
| }; | |
| } | |
| // Login functionality | |
| const loginScreen = document.getElementById('loginScreen'); | |
| const mainContent = document.getElementById('mainContent'); | |
| const loginForm = document.getElementById('loginForm'); | |
| // Check if user is already logged in (from localStorage) | |
| if(localStorage.getItem('isLoggedIn') === 'true') { | |
| loginScreen.style.display = 'none'; | |
| mainContent.classList.remove('hidden'); | |
| } | |
| loginForm.addEventListener('submit', async function(e) { | |
| e.preventDefault(); | |
| const email = document.getElementById('email').value; | |
| const password = document.getElementById('password').value; | |
| const rememberMe = document.getElementById('remember').checked; | |
| if(email && password) { | |
| try { | |
| const db = await connectToDatabase(); | |
| const users = await db.query( | |
| 'SELECT * FROM users WHERE email = ?', | |
| [email] | |
| ); | |
| if(users.length > 0) { | |
| // In a real app, use bcrypt.compare() to verify password | |
| // This is a mock verification for demo purposes | |
| const isValid = password === 'password123'; // Would be bcrypt.compare(password, user.password) | |
| if(isValid) { | |
| // Store login state | |
| if(rememberMe) { | |
| localStorage.setItem('isLoggedIn', 'true'); | |
| } else { | |
| sessionStorage.setItem('isLoggedIn', 'true'); | |
| } | |
| // Hide login and show main content | |
| loginScreen.style.display = 'none'; | |
| mainContent.classList.remove('hidden'); | |
| return; | |
| } | |
| } | |
| alert('Invalid email or password'); | |
| } catch (error) { | |
| console.error('Login error:', error); | |
| alert('Login failed. Please try again.'); | |
| } | |
| } else { | |
| alert('Please enter both email and password'); | |
| } | |
| }); | |
| // Logout functionality | |
| document.querySelector('.sidebar').addEventListener('click', function(e) { | |
| if(e.target.closest('[data-logout]')) { | |
| localStorage.removeItem('isLoggedIn'); | |
| sessionStorage.removeItem('isLoggedIn'); | |
| location.reload(); | |
| } | |
| }); | |
| // Mobile menu toggle | |
| document.getElementById('mobileMenuButton').addEventListener('click', function() { | |
| document.querySelector('.sidebar').classList.toggle('active'); | |
| }); | |
| // Sample data for charts (would be replaced with real data in production) | |
| const courseProgress = [ | |
| { name: 'Data Science', progress: 80 }, | |
| { name: 'Web Development', progress: 65 }, | |
| { name: 'Mobile App Dev', progress: 30 } | |
| ]; | |
| // Simulate loading data | |
| document.addEventListener('DOMContentLoaded', function() { | |
| console.log('LMS system loaded'); | |
| // In a real app, you would fetch data from an API here | |
| // fetch('/api/courses') | |
| // .then(response => response.json()) | |
| // .then(data => { | |
| // // Process and display data | |
| // }); | |
| }); | |
| </script> | |
| <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=TechMeOut100/edutrack100" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body> | |
| </html> |