elearning-platform / index.html
ZakheTH's picture
Add 1 files
16c5d0c verified
Raw History Blame Contribute Delete
39.2 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="EduLearn - Modern eLearning Platform for Online Education">
<meta name="keywords" content="elearning, online courses, education, moodle alternative">
<title>EduLearn - Online Learning Platform</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
<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">
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>🎓</text></svg>">
<style>
:root {
--primary-color: #3b82f6;
--primary-hover: #2563eb;
--sidebar-width: 16rem;
--sidebar-collapsed: 4.5rem;
}
body {
font-family: 'Inter', sans-serif;
background-color: #f8fafc;
}
.course-card:hover .course-overlay {
opacity: 1;
transform: translateY(0);
}
.course-overlay {
transition: all 0.3s ease;
opacity: 0;
transform: translateY(10px);
}
.sidebar {
transition: all 0.3s ease;
width: var(--sidebar-width);
}
.sidebar-collapsed {
width: var(--sidebar-collapsed);
}
.sidebar-collapsed .sidebar-text {
display: none;
}
.sidebar-collapsed .logo-text {
display: none;
}
.progress-ring__circle {
transition: stroke-dashoffset 0.35s;
transform: rotate(-90deg);
transform-origin: 50% 50%;
}
.dropdown:hover .dropdown-menu {
display: block;
}
@keyframes pulse {
0%, 100% {
opacity: 1;
}
50% {
opacity: 0.5;
}
}
.animate-pulse {
animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
/* Mobile menu */
.mobile-menu {
transform: translateX(-100%);
transition: transform 0.3s ease;
}
.mobile-menu-open {
transform: translateX(0);
}
/* Dark mode toggle */
.dark-mode-toggle {
transition: all 0.3s ease;
}
.dark-mode-toggle:hover {
transform: scale(1.1);
}
/* Dark mode styles */
.dark {
background-color: #0f172a;
color: #f8fafc;
}
.dark .bg-white {
background-color: #1e293b !important;
color: #f8fafc !important;
}
.dark .text-gray-800 {
color: #f8fafc !important;
}
.dark .text-gray-600 {
color: #cbd5e1 !important;
}
.dark .border-gray-200 {
border-color: #334155 !important;
}
.dark .bg-gray-100 {
background-color: #334155 !important;
color: #f8fafc !important;
}
.dark .hover\:bg-gray-200:hover {
background-color: #475569 !important;
}
/* Print styles */
@media print {
header, aside, .no-print {
display: none !important;
}
main {
margin-left: 0 !important;
padding-top: 0 !important;
}
}
/* Responsive adjustments */
@media (max-width: 1024px) {
.sidebar {
transform: translateX(-100%);
position: fixed;
z-index: 50;
height: 100vh;
}
.sidebar-open {
transform: translateX(0);
}
main {
margin-left: 0 !important;
}
.grid-cols-4 {
grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}
}
@media (max-width: 768px) {
.grid-cols-4 {
grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
}
.search-bar {
display: none !important;
}
.header-icons {
margin-left: auto;
}
.course-grid {
grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
}
}
@media (max-width: 640px) {
.header-logo .logo-text {
display: none;
}
.two-column-layout {
grid-template-columns: 1fr !important;
}
}
</style>
</head>
<body class="bg-gray-100">
<!-- Header -->
<header class="bg-white shadow-sm fixed w-full z-30">
<div class="flex items-center justify-between px-4 py-3">
<div class="flex items-center space-x-2">
<button id="sidebar-toggle" class="text-gray-600 hover:text-blue-600 lg:hidden">
<i class="fas fa-bars text-xl"></i>
</button>
<button id="desktop-sidebar-toggle" class="text-gray-600 hover:text-blue-600 hidden lg:block">
<i class="fas fa-bars text-xl"></i>
</button>
<div class="flex items-center header-logo">
<i class="fas fa-graduation-cap text-blue-600 text-2xl mr-2"></i>
<span class="text-xl font-bold text-blue-600 logo-text">EduLearn</span>
</div>
</div>
<div class="flex-1 max-w-xl mx-4 hidden md:block">
<div class="relative search-bar">
<input type="text" placeholder="Search courses..." class="w-full pl-10 pr-4 py-2 rounded-full border border-gray-300 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent">
<i class="fas fa-search absolute left-3 top-3 text-gray-400"></i>
</div>
</div>
<div class="flex items-center space-x-4 header-icons">
<button id="mobile-search-toggle" class="text-gray-600 hover:text-blue-600 md:hidden">
<i class="fas fa-search text-xl"></i>
</button>
<button class="text-gray-600 hover:text-blue-600 relative hidden sm:inline-block">
<i class="fas fa-bell text-xl"></i>
<span class="absolute top-0 right-0 h-2 w-2 rounded-full bg-red-500"></span>
</button>
<button class="text-gray-600 hover:text-blue-600 hidden sm:inline-block">
<i class="fas fa-envelope text-xl"></i>
</button>
<button id="dark-mode-toggle" class="dark-mode-toggle text-gray-600 hover:text-blue-600 hidden sm:inline-block">
<i class="fas fa-moon text-xl"></i>
</button>
<div class="dropdown relative">
<button class="flex items-center space-x-2 focus:outline-none">
<div class="w-8 h-8 rounded-full bg-blue-500 flex items-center justify-center text-white font-semibold">JS</div>
<span class="hidden md:inline">John Smith</span>
<i class="fas fa-chevron-down text-xs hidden md:inline"></i>
</button>
<div class="dropdown-menu absolute right-0 mt-2 w-48 bg-white rounded-md shadow-lg py-1 z-20 hidden border border-gray-200">
<a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">Profile</a>
<a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">Dashboard</a>
<a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">Settings</a>
<div class="border-t border-gray-200"></div>
<a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">Logout</a>
</div>
</div>
</div>
</div>
<!-- Mobile search bar -->
<div id="mobile-search" class="px-4 py-2 bg-white border-t border-gray-200 hidden md:hidden">
<div class="relative">
<input type="text" placeholder="Search courses..." class="w-full pl-10 pr-4 py-2 rounded-full border border-gray-300 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent">
<i class="fas fa-search absolute left-3 top-3 text-gray-400"></i>
</div>
</div>
</header>
<!-- Mobile menu overlay -->
<div id="mobile-overlay" class="fixed inset-0 bg-black bg-opacity-50 z-40 hidden"></div>
<!-- Sidebar -->
<aside id="sidebar" class="sidebar bg-blue-800 text-white h-screen fixed pt-16 lg:block hidden">
<nav class="mt-6">
<div class="px-4 py-3 hover:bg-blue-700 cursor-pointer flex items-center text-blue-100">
<i class="fas fa-home text-lg w-6"></i>
<span class="ml-3 sidebar-text">Dashboard</span>
</div>
<div class="px-4 py-3 hover:bg-blue-700 cursor-pointer flex items-center text-blue-100">
<i class="fas fa-book text-lg w-6"></i>
<span class="ml-3 sidebar-text">My Courses</span>
</div>
<div class="px-4 py-3 hover:bg-blue-700 cursor-pointer flex items-center text-blue-100">
<i class="fas fa-calendar-alt text-lg w-6"></i>
<span class="ml-3 sidebar-text">Calendar</span>
</div>
<div class="px-4 py-3 hover:bg-blue-700 cursor-pointer flex items-center text-blue-100">
<i class="fas fa-tasks text-lg w-6"></i>
<span class="ml-3 sidebar-text">Assignments</span>
</div>
<div class="px-4 py-3 hover:bg-blue-700 cursor-pointer flex items-center text-blue-100">
<i class="fas fa-graduation-cap text-lg w-6"></i>
<span class="ml-3 sidebar-text">Grades</span>
</div>
<div class="px-4 py-3 hover:bg-blue-700 cursor-pointer flex items-center text-blue-100">
<i class="fas fa-users text-lg w-6"></i>
<span class="ml-3 sidebar-text">Participants</span>
</div>
<div class="px-4 py-3 hover:bg-blue-700 cursor-pointer flex items-center text-blue-100">
<i class="fas fa-comments text-lg w-6"></i>
<span class="ml-3 sidebar-text">Messages</span>
</div>
<div class="px-4 py-3 hover:bg-blue-700 cursor-pointer flex items-center text-blue-100">
<i class="fas fa-cog text-lg w-6"></i>
<span class="ml-3 sidebar-text">Settings</span>
</div>
</nav>
<div class="absolute bottom-0 w-full px-4 py-3 bg-blue-900">
<div class="flex items-center">
<i class="fas fa-question-circle text-lg w-6"></i>
<span class="ml-3 sidebar-text">Help & Support</span>
</div>
</div>
</aside>
<!-- Main Content -->
<main class="lg:ml-64 pt-16 px-4 pb-6 transition-all duration-300" id="main-content">
<!-- Dashboard Overview -->
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4 mb-6">
<div class="bg-white rounded-lg shadow p-4 sm:p-6">
<div class="flex items-center justify-between">
<div>
<p class="text-gray-500 text-sm sm:text-base">Active Courses</p>
<h3 class="text-xl sm:text-2xl font-bold">5</h3>
</div>
<div class="w-10 h-10 sm:w-12 sm:h-12 rounded-full bg-blue-100 flex items-center justify-center">
<i class="fas fa-book text-blue-600 text-lg sm:text-xl"></i>
</div>
</div>
<div class="mt-3 sm:mt-4 text-sm text-blue-600 font-medium">
<a href="#" class="hover:underline">View all courses</a>
</div>
</div>
<div class="bg-white rounded-lg shadow p-4 sm:p-6">
<div class="flex items-center justify-between">
<div>
<p class="text-gray-500 text-sm sm:text-base">Assignments Due</p>
<h3 class="text-xl sm:text-2xl font-bold">3</h3>
</div>
<div class="w-10 h-10 sm:w-12 sm:h-12 rounded-full bg-orange-100 flex items-center justify-center">
<i class="fas fa-tasks text-orange-600 text-lg sm:text-xl"></i>
</div>
</div>
<div class="mt-3 sm:mt-4 text-sm text-orange-600 font-medium">
<a href="#" class="hover:underline">View assignments</a>
</div>
</div>
<div class="bg-white rounded-lg shadow p-4 sm:p-6">
<div class="flex items-center justify-between">
<div>
<p class="text-gray-500 text-sm sm:text-base">Messages</p>
<h3 class="text-xl sm:text-2xl font-bold">7</h3>
</div>
<div class="w-10 h-10 sm:w-12 sm:h-12 rounded-full bg-green-100 flex items-center justify-center">
<i class="fas fa-envelope text-green-600 text-lg sm:text-xl"></i>
</div>
</div>
<div class="mt-3 sm:mt-4 text-sm text-green-600 font-medium">
<a href="#" class="hover:underline">View messages</a>
</div>
</div>
<div class="bg-white rounded-lg shadow p-4 sm:p-6">
<div class="flex items-center justify-between">
<div>
<p class="text-gray-500 text-sm sm:text-base">Overall Progress</p>
<div class="flex items-center">
<div class="relative w-8 h-8 sm:w-10 sm:h-10 mr-2 sm:mr-3">
<svg class="w-full h-full" viewBox="0 0 36 36">
<circle cx="18" cy="18" r="16" fill="none" class="stroke-gray-200" stroke-width="3"></circle>
<circle cx="18" cy="18" r="16" fill="none" class="stroke-blue-600 progress-ring__circle" stroke-width="3" stroke-dasharray="100" stroke-dashoffset="35"></circle>
</svg>
<div class="absolute inset-0 flex items-center justify-center text-xs font-bold">65%</div>
</div>
<h3 class="text-xl sm:text-2xl font-bold">Good</h3>
</div>
</div>
<div class="w-10 h-10 sm:w-12 sm:h-12 rounded-full bg-purple-100 flex items-center justify-center">
<i class="fas fa-chart-line text-purple-600 text-lg sm:text-xl"></i>
</div>
</div>
<div class="mt-3 sm:mt-4 text-sm text-purple-600 font-medium">
<a href="#" class="hover:underline">View progress</a>
</div>
</div>
</div>
<!-- Current Courses -->
<div class="bg-white rounded-lg shadow mb-6">
<div class="px-4 sm:px-6 py-4 border-b border-gray-200">
<h2 class="text-lg sm:text-xl font-semibold text-gray-800">My Current Courses</h2>
</div>
<div class="p-4 sm:p-6">
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4 sm:gap-6 course-grid">
<!-- Course Card 1 -->
<div class="course-card bg-white rounded-lg border border-gray-200 overflow-hidden hover:shadow-lg transition-shadow duration-300 relative">
<div class="h-32 sm:h-40 bg-gradient-to-r from-blue-500 to-blue-400 flex items-center justify-center">
<i class="fas fa-laptop-code text-white text-4xl sm:text-5xl"></i>
</div>
<div class="p-3 sm:p-4">
<div class="flex justify-between items-start">
<div>
<h3 class="font-bold text-base sm:text-lg mb-1">Web Development</h3>
<p class="text-gray-600 text-xs sm:text-sm">Prof. Sarah Johnson</p>
</div>
<span class="bg-blue-100 text-blue-800 text-xs px-2 py-1 rounded-full">Active</span>
</div>
<div class="mt-3 sm:mt-4 flex items-center justify-between">
<div class="w-full bg-gray-200 rounded-full h-2">
<div class="bg-blue-600 h-2 rounded-full" style="width: 75%"></div>
</div>
<span class="ml-2 text-xs sm:text-sm text-gray-600">75%</span>
</div>
</div>
<div class="course-overlay absolute inset-0 bg-black bg-opacity-70 flex items-center justify-center space-x-2">
<button class="bg-white text-blue-600 px-3 py-1 sm:px-4 sm:py-2 rounded-lg font-medium hover:bg-blue-50 text-sm sm:text-base">
<i class="fas fa-play mr-1"></i> Continue
</button>
<button class="bg-blue-600 text-white px-3 py-1 sm:px-4 sm:py-2 rounded-lg font-medium hover:bg-blue-700 text-sm sm:text-base">
<i class="fas fa-info-circle mr-1"></i> Details
</button>
</div>
</div>
<!-- Course Card 2 -->
<div class="course-card bg-white rounded-lg border border-gray-200 overflow-hidden hover:shadow-lg transition-shadow duration-300 relative">
<div class="h-32 sm:h-40 bg-gradient-to-r from-purple-500 to-purple-400 flex items-center justify-center">
<i class="fas fa-database text-white text-4xl sm:text-5xl"></i>
</div>
<div class="p-3 sm:p-4">
<div class="flex justify-between items-start">
<div>
<h3 class="font-bold text-base sm:text-lg mb-1">Database Design</h3>
<p class="text-gray-600 text-xs sm:text-sm">Prof. Michael Chen</p>
</div>
<span class="bg-purple-100 text-purple-800 text-xs px-2 py-1 rounded-full">Active</span>
</div>
<div class="mt-3 sm:mt-4 flex items-center justify-between">
<div class="w-full bg-gray-200 rounded-full h-2">
<div class="bg-purple-600 h-2 rounded-full" style="width: 45%"></div>
</div>
<span class="ml-2 text-xs sm:text-sm text-gray-600">45%</span>
</div>
</div>
<div class="course-overlay absolute inset-0 bg-black bg-opacity-70 flex items-center justify-center space-x-2">
<button class="bg-white text-purple-600 px-3 py-1 sm:px-4 sm:py-2 rounded-lg font-medium hover:bg-purple-50 text-sm sm:text-base">
<i class="fas fa-play mr-1"></i> Continue
</button>
<button class="bg-purple-600 text-white px-3 py-1 sm:px-4 sm:py-2 rounded-lg font-medium hover:bg-purple-700 text-sm sm:text-base">
<i class="fas fa-info-circle mr-1"></i> Details
</button>
</div>
</div>
<!-- Course Card 3 -->
<div class="course-card bg-white rounded-lg border border-gray-200 overflow-hidden hover:shadow-lg transition-shadow duration-300 relative">
<div class="h-32 sm:h-40 bg-gradient-to-r from-green-500 to-green-400 flex items-center justify-center">
<i class="fas fa-mobile-alt text-white text-4xl sm:text-5xl"></i>
</div>
<div class="p-3 sm:p-4">
<div class="flex justify-between items-start">
<div>
<h3 class="font-bold text-base sm:text-lg mb-1">Mobile App Development</h3>
<p class="text-gray-600 text-xs sm:text-sm">Prof. Emily Rodriguez</p>
</div>
<span class="bg-green-100 text-green-800 text-xs px-2 py-1 rounded-full">Active</span>
</div>
<div class="mt-3 sm:mt-4 flex items-center justify-between">
<div class="w-full bg-gray-200 rounded-full h-2">
<div class="bg-green-600 h-2 rounded-full" style="width: 60%"></div>
</div>
<span class="ml-2 text-xs sm:text-sm text-gray-600">60%</span>
</div>
</div>
<div class="course-overlay absolute inset-0 bg-black bg-opacity-70 flex items-center justify-center space-x-2">
<button class="bg-white text-green-600 px-3 py-1 sm:px-4 sm:py-2 rounded-lg font-medium hover:bg-green-50 text-sm sm:text-base">
<i class="fas fa-play mr-1"></i> Continue
</button>
<button class="bg-green-600 text-white px-3 py-1 sm:px-4 sm:py-2 rounded-lg font-medium hover:bg-green-700 text-sm sm:text-base">
<i class="fas fa-info-circle mr-1"></i> Details
</button>
</div>
</div>
</div>
<div class="mt-6 text-center">
<button class="bg-white border border-blue-500 text-blue-500 px-4 sm:px-6 py-2 rounded-lg font-medium hover:bg-blue-50 hover:text-blue-600 text-sm sm:text-base">
View All Courses
</button>
</div>
</div>
</div>
<!-- Upcoming Deadlines & Recent Activity -->
<div class="grid grid-cols-1 lg:grid-cols-2 gap-4 sm:gap-6 two-column-layout">
<!-- Upcoming Deadlines -->
<div class="bg-white rounded-lg shadow">
<div class="px-4 sm:px-6 py-4 border-b border-gray-200">
<h2 class="text-lg sm:text-xl font-semibold text-gray-800">Upcoming Deadlines</h2>
</div>
<div class="p-4 sm:p-6">
<div class="space-y-3 sm:space-y-4">
<!-- Deadline 1 -->
<div class="flex items-start">
<div class="flex-shrink-0 mt-1">
<div class="w-8 h-8 sm:w-10 sm:h-10 rounded-full bg-red-100 flex items-center justify-center">
<i class="fas fa-exclamation text-red-600 text-sm sm:text-base"></i>
</div>
</div>
<div class="ml-3 sm:ml-4">
<h3 class="font-medium text-gray-900 text-sm sm:text-base">Web Development Project</h3>
<p class="text-gray-500 text-xs sm:text-sm">Due in 2 days - May 15, 2023</p>
<div class="mt-1 flex items-center text-gray-500 text-xs sm:text-sm">
<i class="fas fa-book mr-1"></i>
<span>Web Development Course</span>
</div>
</div>
</div>
<!-- Deadline 2 -->
<div class="flex items-start">
<div class="flex-shrink-0 mt-1">
<div class="w-8 h-8 sm:w-10 sm:h-10 rounded-full bg-yellow-100 flex items-center justify-center">
<i class="fas fa-tasks text-yellow-600 text-sm sm:text-base"></i>
</div>
</div>
<div class="ml-3 sm:ml-4">
<h3 class="font-medium text-gray-900 text-sm sm:text-base">Database Design Quiz</h3>
<p class="text-gray-500 text-xs sm:text-sm">Due in 5 days - May 18, 2023</p>
<div class="mt-1 flex items-center text-gray-500 text-xs sm:text-sm">
<i class="fas fa-book mr-1"></i>
<span>Database Design Course</span>
</div>
</div>
</div>
<!-- Deadline 3 -->
<div class="flex items-start">
<div class="flex-shrink-0 mt-1">
<div class="w-8 h-8 sm:w-10 sm:h-10 rounded-full bg-blue-100 flex items-center justify-center">
<i class="fas fa-file-alt text-blue-600 text-sm sm:text-base"></i>
</div>
</div>
<div class="ml-3 sm:ml-4">
<h3 class="font-medium text-gray-900 text-sm sm:text-base">Mobile App Wireframes</h3>
<p class="text-gray-500 text-xs sm:text-sm">Due in 7 days - May 20, 2023</p>
<div class="mt-1 flex items-center text-gray-500 text-xs sm:text-sm">
<i class="fas fa-book mr-1"></i>
<span>Mobile App Development</span>
</div>
</div>
</div>
</div>
<div class="mt-4 sm:mt-6">
<button class="w-full bg-gray-100 hover:bg-gray-200 text-gray-800 font-medium py-2 px-4 rounded-lg text-sm sm:text-base">
View All Deadlines
</button>
</div>
</div>
</div>
<!-- Recent Activity -->
<div class="bg-white rounded-lg shadow">
<div class="px-4 sm:px-6 py-4 border-b border-gray-200">
<h2 class="text-lg sm:text-xl font-semibold text-gray-800">Recent Activity</h2>
</div>
<div class="p-4 sm:p-6">
<div class="space-y-3 sm:space-y-4">
<!-- Activity 1 -->
<div class="flex">
<div class="flex-shrink-0">
<div class="w-8 h-8 sm:w-10 sm:h-10 rounded-full bg-blue-100 flex items-center justify-center">
<i class="fas fa-comment text-blue-600 text-sm sm:text-base"></i>
</div>
</div>
<div class="ml-3 sm:ml-4">
<p class="text-gray-800 text-sm sm:text-base">
<span class="font-medium">Prof. Sarah Johnson</span> posted a new announcement in <span class="font-medium text-blue-600">Web Development</span>
</p>
<p class="text-gray-500 text-xs sm:text-sm mt-1">2 hours ago</p>
</div>
</div>
<!-- Activity 2 -->
<div class="flex">
<div class="flex-shrink-0">
<div class="w-8 h-8 sm:w-10 sm:h-10 rounded-full bg-green-100 flex items-center justify-center">
<i class="fas fa-check-circle text-green-600 text-sm sm:text-base"></i>
</div>
</div>
<div class="ml-3 sm:ml-4">
<p class="text-gray-800 text-sm sm:text-base">
You submitted <span class="font-medium">Assignment #3</span> for <span class="font-medium text-green-600">Database Design</span>
</p>
<p class="text-gray-500 text-xs sm:text-sm mt-1">1 day ago</p>
</div>
</div>
<!-- Activity 3 -->
<div class="flex">
<div class="flex-shrink-0">
<div class="w-8 h-8 sm:w-10 sm:h-10 rounded-full bg-purple-100 flex items-center justify-center">
<i class="fas fa-graduation-cap text-purple-600 text-sm sm:text-base"></i>
</div>
</div>
<div class="ml-3 sm:ml-4">
<p class="text-gray-800 text-sm sm:text-base">
You earned a badge <span class="font-medium">"Quick Learner"</span> in <span class="font-medium text-purple-600">Mobile App Development</span>
</p>
<p class="text-gray-500 text-xs sm:text-sm mt-1">2 days ago</p>
</div>
</div>
</div>
<div class="mt-4 sm:mt-6">
<button class="w-full bg-gray-100 hover:bg-gray-200 text-gray-800 font-medium py-2 px-4 rounded-lg text-sm sm:text-base">
View All Activity
</button>
</div>
</div>
</div>
</div>
<!-- Footer -->
<footer class="mt-8 text-center text-gray-500 text-sm no-print">
<p>© 2023 EduLearn. All rights reserved.</p>
<div class="mt-2 flex justify-center space-x-4">
<a href="#" class="hover:text-blue-600">Terms of Service</a>
<a href="#" class="hover:text-blue-600">Privacy Policy</a>
<a href="#" class="hover:text-blue-600">Contact Us</a>
</div>
</footer>
</main>
<script>
// Toggle mobile sidebar
document.getElementById('sidebar-toggle').addEventListener('click', function() {
const sidebar = document.getElementById('sidebar');
const overlay = document.getElementById('mobile-overlay');
sidebar.classList.toggle('hidden');
sidebar.classList.toggle('sidebar-open');
overlay.classList.toggle('hidden');
});
// Toggle desktop sidebar
let sidebarCollapsed = false;
document.getElementById('desktop-sidebar-toggle').addEventListener('click', function() {
const sidebar = document.getElementById('sidebar');
const mainContent = document.getElementById('main-content');
sidebarCollapsed = !sidebarCollapsed;
sidebar.classList.toggle('sidebar-collapsed');
mainContent.classList.toggle('lg:ml-64');
mainContent.classList.toggle('lg:ml-20');
// Save preference to localStorage
localStorage.setItem('sidebarCollapsed', sidebarCollapsed);
});
// Close mobile sidebar when clicking overlay
document.getElementById('mobile-overlay').addEventListener('click', function() {
const sidebar = document.getElementById('sidebar');
const overlay = document.getElementById('mobile-overlay');
sidebar.classList.add('hidden');
sidebar.classList.remove('sidebar-open');
overlay.classList.add('hidden');
});
// Toggle mobile search
document.getElementById('mobile-search-toggle').addEventListener('click', function() {
const mobileSearch = document.getElementById('mobile-search');
mobileSearch.classList.toggle('hidden');
});
// Dark mode toggle
const darkModeToggle = document.getElementById('dark-mode-toggle');
const html = document.documentElement;
// Check for saved user preference
if (localStorage.getItem('darkMode') === 'enabled') {
html.classList.add('dark');
darkModeToggle.innerHTML = '<i class="fas fa-sun text-xl"></i>';
}
darkModeToggle.addEventListener('click', function() {
if (html.classList.contains('dark')) {
html.classList.remove('dark');
darkModeToggle.innerHTML = '<i class="fas fa-moon text-xl"></i>';
localStorage.setItem('darkMode', 'disabled');
} else {
html.classList.add('dark');
darkModeToggle.innerHTML = '<i class="fas fa-sun text-xl"></i>';
localStorage.setItem('darkMode', 'enabled');
}
});
// Check for saved sidebar state
if (localStorage.getItem('sidebarCollapsed') === 'true') {
const sidebar = document.getElementById('sidebar');
const mainContent = document.getElementById('main-content');
sidebar.classList.add('sidebar-collapsed');
mainContent.classList.remove('lg:ml-64');
mainContent.classList.add('lg:ml-20');
sidebarCollapsed = true;
}
// Dropdown functionality
document.querySelectorAll('.dropdown').forEach(dropdown => {
const button = dropdown.querySelector('button');
const menu = dropdown.querySelector('.dropdown-menu');
button.addEventListener('click', function(e) {
e.stopPropagation();
menu.classList.toggle('hidden');
});
// Close when clicking outside
document.addEventListener('click', function(e) {
if (!dropdown.contains(e.target)) {
menu.classList.add('hidden');
}
});
});
// Simulate loading courses (for demo purposes)
document.addEventListener('DOMContentLoaded', function() {
// You could add AJAX calls here to load real data
console.log('Platform loaded');
// Example: Add click event to course cards
const courseCards = document.querySelectorAll('.course-card');
courseCards.forEach(card => {
card.addEventListener('click', function(e) {
if(!e.target.closest('button')) {
// Navigate to course details if not clicking a button
console.log('Navigating to course details');
}
});
});
// Check for prefers-color-scheme
if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches && !localStorage.getItem('darkMode')) {
html.classList.add('dark');
darkModeToggle.innerHTML = '<i class="fas fa-sun text-xl"></i>';
}
// Watch for system color scheme changes
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', event => {
if (!localStorage.getItem('darkMode')) {
if (event.matches) {
html.classList.add('dark');
darkModeToggle.innerHTML = '<i class="fas fa-sun text-xl"></i>';
} else {
html.classList.remove('dark');
darkModeToggle.innerHTML = '<i class="fas fa-moon text-xl"></i>';
}
}
});
});
// Service worker registration for PWA
if ('serviceWorker' in navigator) {
window.addEventListener('load', () => {
navigator.serviceWorker.register('/sw.js').then(registration => {
console.log('ServiceWorker registration successful with scope: ', registration.scope);
}).catch(err => {
console.log('ServiceWorker registration failed: ', err);
});
});
}
</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=ZakheTH/elearning-platform" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>