Spaces:
Running
Running
Upload folder using huggingface_hub
Browse files- index.html +210 -205
index.html
CHANGED
|
@@ -179,6 +179,7 @@
|
|
| 179 |
table {
|
| 180 |
width: 100%;
|
| 181 |
border-collapse: collapse;
|
|
|
|
| 182 |
}
|
| 183 |
|
| 184 |
th,
|
|
@@ -207,6 +208,7 @@
|
|
| 207 |
border-radius: 20px;
|
| 208 |
font-size: 12px;
|
| 209 |
font-weight: 600;
|
|
|
|
| 210 |
}
|
| 211 |
|
| 212 |
.badge-success {
|
|
@@ -229,6 +231,11 @@
|
|
| 229 |
color: #0ea5e9;
|
| 230 |
}
|
| 231 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 232 |
/* Custom checkbox */
|
| 233 |
.custom-checkbox {
|
| 234 |
appearance: none;
|
|
@@ -265,7 +272,7 @@
|
|
| 265 |
|
| 266 |
<!-- Delete Confirmation Modal -->
|
| 267 |
<div id="deleteModal" class="modal">
|
| 268 |
-
<div class="modal-content p-6">
|
| 269 |
<div class="text-center">
|
| 270 |
<div class="w-16 h-16 bg-danger/20 rounded-full flex items-center justify-center mx-auto mb-4">
|
| 271 |
<i class="fas fa-trash-alt text-danger text-2xl"></i>
|
|
@@ -312,12 +319,12 @@
|
|
| 312 |
</select>
|
| 313 |
</div>
|
| 314 |
<div>
|
| 315 |
-
<label class="block text-sm font-medium mb-2">
|
| 316 |
-
<select id="
|
| 317 |
class="w-full py-3 px-4 bg-background border border-surface-light rounded-xl focus:outline-none focus:border-primary transition-all">
|
| 318 |
-
<option value="
|
| 319 |
-
<option value="
|
| 320 |
-
<option value="
|
| 321 |
</select>
|
| 322 |
</div>
|
| 323 |
</div>
|
|
@@ -329,28 +336,12 @@
|
|
| 329 |
placeholder="49.99">
|
| 330 |
</div>
|
| 331 |
<div>
|
| 332 |
-
<label class="block text-sm font-medium mb-2">
|
| 333 |
-
<input type="
|
| 334 |
class="w-full py-3 px-4 bg-background border border-surface-light rounded-xl focus:outline-none focus:border-primary transition-all"
|
| 335 |
-
placeholder="
|
| 336 |
</div>
|
| 337 |
</div>
|
| 338 |
-
<div>
|
| 339 |
-
<label class="block text-sm font-medium mb-2">Description</label>
|
| 340 |
-
<textarea id="courseDescription" rows="3"
|
| 341 |
-
class="w-full py-3 px-4 bg-background border border-surface-light rounded-xl focus:outline-none focus:border-primary transition-all resize-none"
|
| 342 |
-
placeholder="Course description..."></textarea>
|
| 343 |
-
</div>
|
| 344 |
-
<div>
|
| 345 |
-
<label class="block text-sm font-medium mb-2">Instructor</label>
|
| 346 |
-
<input type="text" id="courseInstructor" required
|
| 347 |
-
class="w-full py-3 px-4 bg-background border border-surface-light rounded-xl focus:outline-none focus:border-primary transition-all"
|
| 348 |
-
placeholder="Instructor name">
|
| 349 |
-
</div>
|
| 350 |
-
<div class="flex items-center gap-3">
|
| 351 |
-
<input type="checkbox" id="coursePublished" class="custom-checkbox">
|
| 352 |
-
<label for="coursePublished" class="text-sm">Publish immediately</label>
|
| 353 |
-
</div>
|
| 354 |
<div class="flex gap-4 pt-4">
|
| 355 |
<button type="button" onclick="closeCourseModal()"
|
| 356 |
class="flex-1 py-3 bg-surface-light rounded-xl hover:bg-surface transition-all">Cancel</button>
|
|
@@ -375,31 +366,25 @@
|
|
| 375 |
<input type="hidden" id="userId">
|
| 376 |
<div class="grid grid-cols-2 gap-4">
|
| 377 |
<div>
|
| 378 |
-
<label class="block text-sm font-medium mb-2">
|
| 379 |
-
<input type="text" id="
|
| 380 |
class="w-full py-3 px-4 bg-background border border-surface-light rounded-xl focus:outline-none focus:border-primary transition-all"
|
| 381 |
-
placeholder="John">
|
| 382 |
</div>
|
| 383 |
<div>
|
| 384 |
-
<label class="block text-sm font-medium mb-2">
|
| 385 |
-
<input type="
|
| 386 |
class="w-full py-3 px-4 bg-background border border-surface-light rounded-xl focus:outline-none focus:border-primary transition-all"
|
| 387 |
-
placeholder="
|
| 388 |
</div>
|
| 389 |
</div>
|
| 390 |
-
<div>
|
| 391 |
-
<label class="block text-sm font-medium mb-2">Email</label>
|
| 392 |
-
<input type="email" id="userEmail" required
|
| 393 |
-
class="w-full py-3 px-4 bg-background border border-surface-light rounded-xl focus:outline-none focus:border-primary transition-all"
|
| 394 |
-
placeholder="john@example.com">
|
| 395 |
-
</div>
|
| 396 |
<div>
|
| 397 |
<label class="block text-sm font-medium mb-2">Role</label>
|
| 398 |
<select id="userRole"
|
| 399 |
class="w-full py-3 px-4 bg-background border border-surface-light rounded-xl focus:outline-none focus:border-primary transition-all">
|
| 400 |
-
<option value="
|
| 401 |
-
<option value="
|
| 402 |
-
<option value="
|
| 403 |
</select>
|
| 404 |
</div>
|
| 405 |
<div>
|
|
@@ -408,7 +393,7 @@
|
|
| 408 |
class="w-full py-3 px-4 bg-background border border-surface-light rounded-xl focus:outline-none focus:border-primary transition-all">
|
| 409 |
<option value="active">Active</option>
|
| 410 |
<option value="inactive">Inactive</option>
|
| 411 |
-
<option value="
|
| 412 |
</select>
|
| 413 |
</div>
|
| 414 |
<div class="flex gap-4 pt-4">
|
|
@@ -435,45 +420,23 @@
|
|
| 435 |
</div>
|
| 436 |
|
| 437 |
<nav class="flex-1 p-4 space-y-2">
|
| 438 |
-
<a href="#" onclick="showSection('dashboard'); return false;"
|
| 439 |
-
class="sidebar-item flex items-center gap-3 px-4 py-3 rounded-xl text-text-primary bg-primary/20 transition-all"
|
| 440 |
-
data-section="dashboard">
|
| 441 |
<i class="fas fa-chart-line w-5"></i>
|
| 442 |
<span class="sidebar-text">Dashboard</span>
|
| 443 |
</a>
|
| 444 |
-
<a href="#" onclick="showSection('courses'); return false;"
|
| 445 |
-
class="sidebar-item flex items-center gap-3 px-4 py-3 rounded-xl text-text-muted hover:text-text-primary hover:bg-surface-light transition-all"
|
| 446 |
-
data-section="courses">
|
| 447 |
<i class="fas fa-book w-5"></i>
|
| 448 |
<span class="sidebar-text">Courses</span>
|
| 449 |
</a>
|
| 450 |
-
<a href="#" onclick="showSection('users'); return false;"
|
| 451 |
-
class="sidebar-item flex items-center gap-3 px-4 py-3 rounded-xl text-text-muted hover:text-text-primary hover:bg-surface-light transition-all"
|
| 452 |
-
data-section="users">
|
| 453 |
<i class="fas fa-users w-5"></i>
|
| 454 |
<span class="sidebar-text">Users</span>
|
| 455 |
</a>
|
| 456 |
-
<a href="#" onclick="showSection('
|
| 457 |
-
class="sidebar-item flex items-center gap-3 px-4 py-3 rounded-xl text-text-muted hover:text-text-primary hover:bg-surface-light transition-all"
|
| 458 |
-
data-section="analytics">
|
| 459 |
-
<i class="fas fa-chart-bar w-5"></i>
|
| 460 |
-
<span class="sidebar-text">Analytics</span>
|
| 461 |
-
</a>
|
| 462 |
-
<a href="#" onclick="showSection('content'); return false;"
|
| 463 |
-
class="sidebar-item flex items-center gap-3 px-4 py-3 rounded-xl text-text-muted hover:text-text-primary hover:bg-surface-light transition-all"
|
| 464 |
-
data-section="content">
|
| 465 |
-
<i class="fas fa-video w-5"></i>
|
| 466 |
-
<span class="sidebar-text">Content</span>
|
| 467 |
-
</a>
|
| 468 |
-
<a href="#" onclick="showSection('payments'); return false;"
|
| 469 |
-
class="sidebar-item flex items-center gap-3 px-4 py-3 rounded-xl text-text-muted hover:text-text-primary hover:bg-surface-light transition-all"
|
| 470 |
-
data-section="payments">
|
| 471 |
-
<i class="fas fa-credit-card w-5"></i>
|
| 472 |
-
<span class="sidebar-text">Payments</span>
|
| 473 |
-
</a>
|
| 474 |
-
<a href="#" onclick="showSection('settings'); return false;"
|
| 475 |
-
class="sidebar-item flex items-center gap-3 px-4 py-3 rounded-xl text-text-muted hover:text-text-primary hover:bg-surface-light transition-all"
|
| 476 |
-
data-section="settings">
|
| 477 |
<i class="fas fa-cog w-5"></i>
|
| 478 |
<span class="sidebar-text">Settings</span>
|
| 479 |
</a>
|
|
@@ -488,7 +451,7 @@
|
|
| 488 |
</aside>
|
| 489 |
|
| 490 |
<!-- Main Content -->
|
| 491 |
-
<main class="flex-1 lg:ml-0">
|
| 492 |
<!-- Top Header -->
|
| 493 |
<header class="bg-surface/95 backdrop-blur-xl border-b border-surface-light px-4 md:px-8 py-4 sticky top-0 z-30">
|
| 494 |
<div class="flex justify-between items-center">
|
|
@@ -510,10 +473,6 @@
|
|
| 510 |
<i class="fas fa-bell text-xl"></i>
|
| 511 |
<span class="absolute top-0 right-0 w-5 h-5 bg-danger text-white text-xs rounded-full flex items-center justify-center">3</span>
|
| 512 |
</button>
|
| 513 |
-
<button class="relative p-2 text-text-muted hover:text-text-primary transition-colors">
|
| 514 |
-
<i class="fas fa-envelope text-xl"></i>
|
| 515 |
-
<span class="absolute top-0 right-0 w-5 h-5 bg-primary text-white text-xs rounded-full flex items-center justify-center">5</span>
|
| 516 |
-
</button>
|
| 517 |
<div class="flex items-center gap-3 pl-4 border-l border-surface-light">
|
| 518 |
<div class="w-10 h-10 rounded-full gradient-bg flex items-center justify-center text-white font-bold">
|
| 519 |
A
|
|
@@ -528,7 +487,7 @@
|
|
| 528 |
</header>
|
| 529 |
|
| 530 |
<!-- Dashboard Section -->
|
| 531 |
-
<section id="
|
| 532 |
<div class="mb-8">
|
| 533 |
<h1 class="text-2xl md:text-3xl font-bold mb-2">Dashboard</h1>
|
| 534 |
<p class="text-text-muted">Welcome back! Here's what's happening with your platform.</p>
|
|
@@ -536,7 +495,7 @@
|
|
| 536 |
|
| 537 |
<!-- Stats Cards -->
|
| 538 |
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6 mb-8">
|
| 539 |
-
<div class="bg-surface rounded-2xl p-6 border border-surface-light
|
| 540 |
<div class="flex justify-between items-start mb-4">
|
| 541 |
<div class="w-12 h-12 rounded-xl bg-primary/20 flex items-center justify-center">
|
| 542 |
<i class="fas fa-users text-primary text-xl"></i>
|
|
@@ -548,7 +507,7 @@
|
|
| 548 |
<h3 class="text-3xl font-bold mb-1">12,847</h3>
|
| 549 |
<p class="text-text-muted text-sm">Total Students</p>
|
| 550 |
</div>
|
| 551 |
-
<div class="bg-surface rounded-2xl p-6 border border-surface-light
|
| 552 |
<div class="flex justify-between items-start mb-4">
|
| 553 |
<div class="w-12 h-12 rounded-xl bg-secondary/20 flex items-center justify-center">
|
| 554 |
<i class="fas fa-book text-secondary text-xl"></i>
|
|
@@ -560,7 +519,7 @@
|
|
| 560 |
<h3 class="text-3xl font-bold mb-1">156</h3>
|
| 561 |
<p class="text-text-muted text-sm">Active Courses</p>
|
| 562 |
</div>
|
| 563 |
-
<div class="bg-surface rounded-2xl p-6 border border-surface-light
|
| 564 |
<div class="flex justify-between items-start mb-4">
|
| 565 |
<div class="w-12 h-12 rounded-xl bg-success/20 flex items-center justify-center">
|
| 566 |
<i class="fas fa-dollar-sign text-success text-xl"></i>
|
|
@@ -572,7 +531,7 @@
|
|
| 572 |
<h3 class="text-3xl font-bold mb-1">$48,295</h3>
|
| 573 |
<p class="text-text-muted text-sm">Revenue (Monthly)</p>
|
| 574 |
</div>
|
| 575 |
-
<div class="bg-surface rounded-2xl p-6 border border-surface-light
|
| 576 |
<div class="flex justify-between items-start mb-4">
|
| 577 |
<div class="w-12 h-12 rounded-xl bg-accent/20 flex items-center justify-center">
|
| 578 |
<i class="fas fa-star text-accent text-xl"></i>
|
|
@@ -597,113 +556,10 @@
|
|
| 597 |
<canvas id="enrollmentChart" height="200"></canvas>
|
| 598 |
</div>
|
| 599 |
</div>
|
| 600 |
-
|
| 601 |
-
<!-- Recent Activity & Top Courses -->
|
| 602 |
-
<div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
|
| 603 |
-
<div class="bg-surface rounded-2xl p-6 border border-surface-light">
|
| 604 |
-
<h3 class="font-bold mb-4">Recent Activity</h3>
|
| 605 |
-
<div class="space-y-4">
|
| 606 |
-
<div class="flex items-center gap-4 p-3 bg-background rounded-xl">
|
| 607 |
-
<div class="w-10 h-10 rounded-full bg-success/20 flex items-center justify-center">
|
| 608 |
-
<i class="fas fa-user-plus text-success"></i>
|
| 609 |
-
</div>
|
| 610 |
-
<div class="flex-1">
|
| 611 |
-
<p class="font-medium text-sm">New student registered</p>
|
| 612 |
-
<p class="text-text-muted text-xs">Sarah Johnson joined Python Basics</p>
|
| 613 |
-
</div>
|
| 614 |
-
<span class="text-text-muted text-xs">2 min ago</span>
|
| 615 |
-
</div>
|
| 616 |
-
<div class="flex items-center gap-4 p-3 bg-background rounded-xl">
|
| 617 |
-
<div class="w-10 h-10 rounded-full bg-primary/20 flex items-center justify-center">
|
| 618 |
-
<i class="fas fa-credit-card text-primary"></i>
|
| 619 |
-
</div>
|
| 620 |
-
<div class="flex-1">
|
| 621 |
-
<p class="font-medium text-sm">Payment received</p>
|
| 622 |
-
<p class="text-text-muted text-xs">$49.99 for Web Development course</p>
|
| 623 |
-
</div>
|
| 624 |
-
<span class="text-text-muted text-xs">15 min ago</span>
|
| 625 |
-
</div>
|
| 626 |
-
<div class="flex items-center gap-4 p-3 bg-background rounded-xl">
|
| 627 |
-
<div class="w-10 h-10 rounded-full bg-accent/20 flex items-center justify-center">
|
| 628 |
-
<i class="fas fa-star text-accent"></i>
|
| 629 |
-
</div>
|
| 630 |
-
<div class="flex-1">
|
| 631 |
-
<p class="font-medium text-sm">New review posted</p>
|
| 632 |
-
<p class="text-text-muted text-xs">5-star review on JavaScript course</p>
|
| 633 |
-
</div>
|
| 634 |
-
<span class="text-text-muted text-xs">1 hour ago</span>
|
| 635 |
-
</div>
|
| 636 |
-
<div class="flex items-center gap-4 p-3 bg-background rounded-xl">
|
| 637 |
-
<div class="w-10 h-10 rounded-full bg-secondary/20 flex items-center justify-center">
|
| 638 |
-
<i class="fas fa-book text-secondary"></i>
|
| 639 |
-
</div>
|
| 640 |
-
<div class="flex-1">
|
| 641 |
-
<p class="font-medium text-sm">Course published</p>
|
| 642 |
-
<p class="text-text-muted text-xs">React Advanced Patterns is now live</p>
|
| 643 |
-
</div>
|
| 644 |
-
<span class="text-text-muted text-xs">3 hours ago</span>
|
| 645 |
-
</div>
|
| 646 |
-
</div>
|
| 647 |
-
</div>
|
| 648 |
-
|
| 649 |
-
<div class="bg-surface rounded-2xl p-6 border border-surface-light">
|
| 650 |
-
<h3 class="font-bold mb-4">Top Performing Courses</h3>
|
| 651 |
-
<div class="space-y-4">
|
| 652 |
-
<div class="flex items-center gap-4">
|
| 653 |
-
<span class="w-8 h-8 rounded-lg gradient-bg flex items-center justify-center text-white font-bold">1</span>
|
| 654 |
-
<div class="flex-1">
|
| 655 |
-
<p class="font-medium">Python for Beginners</p>
|
| 656 |
-
<div class="flex items-center gap-2 text-sm text-text-muted">
|
| 657 |
-
<span>2,456 students</span>
|
| 658 |
-
<span>•</span>
|
| 659 |
-
<span class="text-accent"><i class="fas fa-star"></i> 4.9</span>
|
| 660 |
-
</div>
|
| 661 |
-
</div>
|
| 662 |
-
<span class="text-success font-bold">$12,280</span>
|
| 663 |
-
</div>
|
| 664 |
-
<div class="flex items-center gap-4">
|
| 665 |
-
<span class="w-8 h-8 rounded-lg bg-surface-light flex items-center justify-center font-bold">2</span>
|
| 666 |
-
<div class="flex-1">
|
| 667 |
-
<p class="font-medium">Web Development Bootcamp</p>
|
| 668 |
-
<div class="flex items-center gap-2 text-sm text-text-muted">
|
| 669 |
-
<span>1,892 students</span>
|
| 670 |
-
<span>•</span>
|
| 671 |
-
<span class="text-accent"><i class="fas fa-star"></i> 4.8</span>
|
| 672 |
-
</div>
|
| 673 |
-
</div>
|
| 674 |
-
<span class="text-success font-bold">$9,460</span>
|
| 675 |
-
</div>
|
| 676 |
-
<div class="flex items-center gap-4">
|
| 677 |
-
<span class="w-8 h-8 rounded-lg bg-surface-light flex items-center justify-center font-bold">3</span>
|
| 678 |
-
<div class="flex-1">
|
| 679 |
-
<p class="font-medium">JavaScript Mastery</p>
|
| 680 |
-
<div class="flex items-center gap-2 text-sm text-text-muted">
|
| 681 |
-
<span>1,654 students</span>
|
| 682 |
-
<span>•</span>
|
| 683 |
-
<span class="text-accent"><i class="fas fa-star"></i> 4.7</span>
|
| 684 |
-
</div>
|
| 685 |
-
</div>
|
| 686 |
-
<span class="text-success font-bold">$8,270</span>
|
| 687 |
-
</div>
|
| 688 |
-
<div class="flex items-center gap-4">
|
| 689 |
-
<span class="w-8 h-8 rounded-lg bg-surface-light flex items-center justify-center font-bold">4</span>
|
| 690 |
-
<div class="flex-1">
|
| 691 |
-
<p class="font-medium">Data Science Fundamentals</p>
|
| 692 |
-
<div class="flex items-center gap-2 text-sm text-text-muted">
|
| 693 |
-
<span>1,234 students</span>
|
| 694 |
-
<span>•</span>
|
| 695 |
-
<span class="text-accent"><i class="fas fa-star"></i> 4.6</span>
|
| 696 |
-
</div>
|
| 697 |
-
</div>
|
| 698 |
-
<span class="text-success font-bold">$6,170</span>
|
| 699 |
-
</div>
|
| 700 |
-
</div>
|
| 701 |
-
</div>
|
| 702 |
-
</div>
|
| 703 |
</section>
|
| 704 |
|
| 705 |
<!-- Courses Section -->
|
| 706 |
-
<section id="
|
| 707 |
<div class="flex flex-col md:flex-row justify-between items-start md:items-center gap-4 mb-8">
|
| 708 |
<div>
|
| 709 |
<h1 class="text-2xl md:text-3xl font-bold mb-2">Courses</h1>
|
|
@@ -723,14 +579,6 @@
|
|
| 723 |
<option value="programming">Programming</option>
|
| 724 |
<option value="electronics">Electronics</option>
|
| 725 |
<option value="business">Business</option>
|
| 726 |
-
<option value="science">Science</option>
|
| 727 |
-
</select>
|
| 728 |
-
<select
|
| 729 |
-
class="py-2 px-4 bg-surface border border-surface-light rounded-lg focus:outline-none focus:border-primary">
|
| 730 |
-
<option value="">All Status</option>
|
| 731 |
-
<option value="published">Published</option>
|
| 732 |
-
<option value="draft">Draft</option>
|
| 733 |
-
<option value="archived">Archived</option>
|
| 734 |
</select>
|
| 735 |
<div class="relative flex-1 min-w-[200px]">
|
| 736 |
<i class="fas fa-search absolute left-4 top-1/2 -translate-y-1/2 text-text-muted"></i>
|
|
@@ -760,21 +608,178 @@
|
|
| 760 |
</tbody>
|
| 761 |
</table>
|
| 762 |
</div>
|
| 763 |
-
<div class="p-4 border-t border-surface-light flex justify-between items-center">
|
| 764 |
-
<p class="text-text-muted text-sm">Showing 1-10 of 156 courses</p>
|
| 765 |
-
<div class="flex gap-2">
|
| 766 |
-
<button class="px-4 py-2 bg-surface-light rounded-lg hover:bg-primary/20 transition-all">Previous</button>
|
| 767 |
-
<button class="px-4 py-2 gradient-bg text-white rounded-lg">1</button>
|
| 768 |
-
<button class="px-4 py-2 bg-surface-light rounded-lg hover:bg-primary/20 transition-all">2</button>
|
| 769 |
-
<button class="px-4 py-2 bg-surface-light rounded-lg hover:bg-primary/20 transition-all">3</button>
|
| 770 |
-
<button class="px-4 py-2 bg-surface-light rounded-lg hover:bg-primary/20 transition-all">Next</button>
|
| 771 |
-
</div>
|
| 772 |
-
</div>
|
| 773 |
</div>
|
| 774 |
</section>
|
| 775 |
|
| 776 |
<!-- Users Section -->
|
| 777 |
-
<section id="
|
| 778 |
<div class="flex flex-col md:flex-row justify-between items-start md:items-center gap-4 mb-8">
|
| 779 |
<div>
|
| 780 |
-
<h1 class="text-2xl md:text-3xl font-bold mb-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 179 |
table {
|
| 180 |
width: 100%;
|
| 181 |
border-collapse: collapse;
|
| 182 |
+
min-width: 800px;
|
| 183 |
}
|
| 184 |
|
| 185 |
th,
|
|
|
|
| 208 |
border-radius: 20px;
|
| 209 |
font-size: 12px;
|
| 210 |
font-weight: 600;
|
| 211 |
+
text-transform: capitalize;
|
| 212 |
}
|
| 213 |
|
| 214 |
.badge-success {
|
|
|
|
| 231 |
color: #0ea5e9;
|
| 232 |
}
|
| 233 |
|
| 234 |
+
.badge-secondary {
|
| 235 |
+
background: rgba(148, 163, 184, 0.2);
|
| 236 |
+
color: #94a3b8;
|
| 237 |
+
}
|
| 238 |
+
|
| 239 |
/* Custom checkbox */
|
| 240 |
.custom-checkbox {
|
| 241 |
appearance: none;
|
|
|
|
| 272 |
|
| 273 |
<!-- Delete Confirmation Modal -->
|
| 274 |
<div id="deleteModal" class="modal">
|
| 275 |
+
<div class="modal-content p-6 max-w-sm">
|
| 276 |
<div class="text-center">
|
| 277 |
<div class="w-16 h-16 bg-danger/20 rounded-full flex items-center justify-center mx-auto mb-4">
|
| 278 |
<i class="fas fa-trash-alt text-danger text-2xl"></i>
|
|
|
|
| 319 |
</select>
|
| 320 |
</div>
|
| 321 |
<div>
|
| 322 |
+
<label class="block text-sm font-medium mb-2">Status</label>
|
| 323 |
+
<select id="courseStatus"
|
| 324 |
class="w-full py-3 px-4 bg-background border border-surface-light rounded-xl focus:outline-none focus:border-primary transition-all">
|
| 325 |
+
<option value="published">Published</option>
|
| 326 |
+
<option value="draft">Draft</option>
|
| 327 |
+
<option value="archived">Archived</option>
|
| 328 |
</select>
|
| 329 |
</div>
|
| 330 |
</div>
|
|
|
|
| 336 |
placeholder="49.99">
|
| 337 |
</div>
|
| 338 |
<div>
|
| 339 |
+
<label class="block text-sm font-medium mb-2">Instructor</label>
|
| 340 |
+
<input type="text" id="courseInstructor" required
|
| 341 |
class="w-full py-3 px-4 bg-background border border-surface-light rounded-xl focus:outline-none focus:border-primary transition-all"
|
| 342 |
+
placeholder="Instructor name">
|
| 343 |
</div>
|
| 344 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 345 |
<div class="flex gap-4 pt-4">
|
| 346 |
<button type="button" onclick="closeCourseModal()"
|
| 347 |
class="flex-1 py-3 bg-surface-light rounded-xl hover:bg-surface transition-all">Cancel</button>
|
|
|
|
| 366 |
<input type="hidden" id="userId">
|
| 367 |
<div class="grid grid-cols-2 gap-4">
|
| 368 |
<div>
|
| 369 |
+
<label class="block text-sm font-medium mb-2">Name</label>
|
| 370 |
+
<input type="text" id="userName" required
|
| 371 |
class="w-full py-3 px-4 bg-background border border-surface-light rounded-xl focus:outline-none focus:border-primary transition-all"
|
| 372 |
+
placeholder="John Doe">
|
| 373 |
</div>
|
| 374 |
<div>
|
| 375 |
+
<label class="block text-sm font-medium mb-2">Email</label>
|
| 376 |
+
<input type="email" id="userEmail" required
|
| 377 |
class="w-full py-3 px-4 bg-background border border-surface-light rounded-xl focus:outline-none focus:border-primary transition-all"
|
| 378 |
+
placeholder="john@example.com">
|
| 379 |
</div>
|
| 380 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 381 |
<div>
|
| 382 |
<label class="block text-sm font-medium mb-2">Role</label>
|
| 383 |
<select id="userRole"
|
| 384 |
class="w-full py-3 px-4 bg-background border border-surface-light rounded-xl focus:outline-none focus:border-primary transition-all">
|
| 385 |
+
<option value="Student">Student</option>
|
| 386 |
+
<option value="Instructor">Instructor</option>
|
| 387 |
+
<option value="Admin">Admin</option>
|
| 388 |
</select>
|
| 389 |
</div>
|
| 390 |
<div>
|
|
|
|
| 393 |
class="w-full py-3 px-4 bg-background border border-surface-light rounded-xl focus:outline-none focus:border-primary transition-all">
|
| 394 |
<option value="active">Active</option>
|
| 395 |
<option value="inactive">Inactive</option>
|
| 396 |
+
<option value="banned">Banned</option>
|
| 397 |
</select>
|
| 398 |
</div>
|
| 399 |
<div class="flex gap-4 pt-4">
|
|
|
|
| 420 |
</div>
|
| 421 |
|
| 422 |
<nav class="flex-1 p-4 space-y-2">
|
| 423 |
+
<a href="#" onclick="showSection('dashboard'); return false;" id="nav-dashboard"
|
| 424 |
+
class="sidebar-item flex items-center gap-3 px-4 py-3 rounded-xl text-text-primary bg-primary/20 transition-all">
|
|
|
|
| 425 |
<i class="fas fa-chart-line w-5"></i>
|
| 426 |
<span class="sidebar-text">Dashboard</span>
|
| 427 |
</a>
|
| 428 |
+
<a href="#" onclick="showSection('courses'); return false;" id="nav-courses"
|
| 429 |
+
class="sidebar-item flex items-center gap-3 px-4 py-3 rounded-xl text-text-muted hover:text-text-primary hover:bg-surface-light transition-all">
|
|
|
|
| 430 |
<i class="fas fa-book w-5"></i>
|
| 431 |
<span class="sidebar-text">Courses</span>
|
| 432 |
</a>
|
| 433 |
+
<a href="#" onclick="showSection('users'); return false;" id="nav-users"
|
| 434 |
+
class="sidebar-item flex items-center gap-3 px-4 py-3 rounded-xl text-text-muted hover:text-text-primary hover:bg-surface-light transition-all">
|
|
|
|
| 435 |
<i class="fas fa-users w-5"></i>
|
| 436 |
<span class="sidebar-text">Users</span>
|
| 437 |
</a>
|
| 438 |
+
<a href="#" onclick="showSection('settings'); return false;" id="nav-settings"
|
| 439 |
+
class="sidebar-item flex items-center gap-3 px-4 py-3 rounded-xl text-text-muted hover:text-text-primary hover:bg-surface-light transition-all">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 440 |
<i class="fas fa-cog w-5"></i>
|
| 441 |
<span class="sidebar-text">Settings</span>
|
| 442 |
</a>
|
|
|
|
| 451 |
</aside>
|
| 452 |
|
| 453 |
<!-- Main Content -->
|
| 454 |
+
<main class="flex-1 lg:ml-0 overflow-x-hidden">
|
| 455 |
<!-- Top Header -->
|
| 456 |
<header class="bg-surface/95 backdrop-blur-xl border-b border-surface-light px-4 md:px-8 py-4 sticky top-0 z-30">
|
| 457 |
<div class="flex justify-between items-center">
|
|
|
|
| 473 |
<i class="fas fa-bell text-xl"></i>
|
| 474 |
<span class="absolute top-0 right-0 w-5 h-5 bg-danger text-white text-xs rounded-full flex items-center justify-center">3</span>
|
| 475 |
</button>
|
|
|
|
|
|
|
|
|
|
|
|
|
| 476 |
<div class="flex items-center gap-3 pl-4 border-l border-surface-light">
|
| 477 |
<div class="w-10 h-10 rounded-full gradient-bg flex items-center justify-center text-white font-bold">
|
| 478 |
A
|
|
|
|
| 487 |
</header>
|
| 488 |
|
| 489 |
<!-- Dashboard Section -->
|
| 490 |
+
<section id="dashboard" class="p-4 md:p-8 animate-fade-in">
|
| 491 |
<div class="mb-8">
|
| 492 |
<h1 class="text-2xl md:text-3xl font-bold mb-2">Dashboard</h1>
|
| 493 |
<p class="text-text-muted">Welcome back! Here's what's happening with your platform.</p>
|
|
|
|
| 495 |
|
| 496 |
<!-- Stats Cards -->
|
| 497 |
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6 mb-8">
|
| 498 |
+
<div class="bg-surface rounded-2xl p-6 border border-surface-light">
|
| 499 |
<div class="flex justify-between items-start mb-4">
|
| 500 |
<div class="w-12 h-12 rounded-xl bg-primary/20 flex items-center justify-center">
|
| 501 |
<i class="fas fa-users text-primary text-xl"></i>
|
|
|
|
| 507 |
<h3 class="text-3xl font-bold mb-1">12,847</h3>
|
| 508 |
<p class="text-text-muted text-sm">Total Students</p>
|
| 509 |
</div>
|
| 510 |
+
<div class="bg-surface rounded-2xl p-6 border border-surface-light">
|
| 511 |
<div class="flex justify-between items-start mb-4">
|
| 512 |
<div class="w-12 h-12 rounded-xl bg-secondary/20 flex items-center justify-center">
|
| 513 |
<i class="fas fa-book text-secondary text-xl"></i>
|
|
|
|
| 519 |
<h3 class="text-3xl font-bold mb-1">156</h3>
|
| 520 |
<p class="text-text-muted text-sm">Active Courses</p>
|
| 521 |
</div>
|
| 522 |
+
<div class="bg-surface rounded-2xl p-6 border border-surface-light">
|
| 523 |
<div class="flex justify-between items-start mb-4">
|
| 524 |
<div class="w-12 h-12 rounded-xl bg-success/20 flex items-center justify-center">
|
| 525 |
<i class="fas fa-dollar-sign text-success text-xl"></i>
|
|
|
|
| 531 |
<h3 class="text-3xl font-bold mb-1">$48,295</h3>
|
| 532 |
<p class="text-text-muted text-sm">Revenue (Monthly)</p>
|
| 533 |
</div>
|
| 534 |
+
<div class="bg-surface rounded-2xl p-6 border border-surface-light">
|
| 535 |
<div class="flex justify-between items-start mb-4">
|
| 536 |
<div class="w-12 h-12 rounded-xl bg-accent/20 flex items-center justify-center">
|
| 537 |
<i class="fas fa-star text-accent text-xl"></i>
|
|
|
|
| 556 |
<canvas id="enrollmentChart" height="200"></canvas>
|
| 557 |
</div>
|
| 558 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 559 |
</section>
|
| 560 |
|
| 561 |
<!-- Courses Section -->
|
| 562 |
+
<section id="courses" class="hidden p-4 md:p-8 animate-fade-in">
|
| 563 |
<div class="flex flex-col md:flex-row justify-between items-start md:items-center gap-4 mb-8">
|
| 564 |
<div>
|
| 565 |
<h1 class="text-2xl md:text-3xl font-bold mb-2">Courses</h1>
|
|
|
|
| 579 |
<option value="programming">Programming</option>
|
| 580 |
<option value="electronics">Electronics</option>
|
| 581 |
<option value="business">Business</option>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 582 |
</select>
|
| 583 |
<div class="relative flex-1 min-w-[200px]">
|
| 584 |
<i class="fas fa-search absolute left-4 top-1/2 -translate-y-1/2 text-text-muted"></i>
|
|
|
|
| 608 |
</tbody>
|
| 609 |
</table>
|
| 610 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 611 |
</div>
|
| 612 |
</section>
|
| 613 |
|
| 614 |
<!-- Users Section -->
|
| 615 |
+
<section id="users" class="hidden p-4 md:p-8 animate-fade-in">
|
| 616 |
<div class="flex flex-col md:flex-row justify-between items-start md:items-center gap-4 mb-8">
|
| 617 |
<div>
|
| 618 |
+
<h1 class="text-2xl md:text-3xl font-bold mb-2">Users</h1>
|
| 619 |
+
<p class="text-text-muted">Manage students and instructors</p>
|
| 620 |
+
</div>
|
| 621 |
+
<button onclick="openUserModal()"
|
| 622 |
+
class="px-6 py-3 gradient-bg text-white rounded-xl hover:opacity-90 transition-all flex items-center gap-2">
|
| 623 |
+
<i class="fas fa-plus"></i> Add New User
|
| 624 |
+
</button>
|
| 625 |
+
</div>
|
| 626 |
+
|
| 627 |
+
<!-- Users Table -->
|
| 628 |
+
<div class="bg-surface rounded-2xl border border-surface-light overflow-hidden">
|
| 629 |
+
<div class="table-container">
|
| 630 |
+
<table>
|
| 631 |
+
<thead>
|
| 632 |
+
<tr>
|
| 633 |
+
<th><input type="checkbox" class="custom-checkbox"></th>
|
| 634 |
+
<th>User</th>
|
| 635 |
+
<th>Role</th>
|
| 636 |
+
<th>Status</th>
|
| 637 |
+
<th>Joined Date</th>
|
| 638 |
+
<th>Actions</th>
|
| 639 |
+
</tr>
|
| 640 |
+
</thead>
|
| 641 |
+
<tbody id="usersTableBody">
|
| 642 |
+
<!-- Dynamic content -->
|
| 643 |
+
</tbody>
|
| 644 |
+
</table>
|
| 645 |
+
</div>
|
| 646 |
+
</div>
|
| 647 |
+
</section>
|
| 648 |
+
|
| 649 |
+
<!-- Settings Section -->
|
| 650 |
+
<section id="settings" class="hidden p-4 md:p-8 animate-fade-in">
|
| 651 |
+
<div class="mb-8">
|
| 652 |
+
<h1 class="text-2xl md:text-3xl font-bold mb-2">Settings</h1>
|
| 653 |
+
<p class="text-text-muted">Configure platform preferences</p>
|
| 654 |
+
</div>
|
| 655 |
+
|
| 656 |
+
<div class="grid grid-cols-1 lg:grid-cols-3 gap-8">
|
| 657 |
+
<!-- Profile Card -->
|
| 658 |
+
<div class="bg-surface rounded-2xl border border-surface-light p-6">
|
| 659 |
+
<div class="flex flex-col items-center">
|
| 660 |
+
<div class="w-24 h-24 rounded-full gradient-bg flex items-center justify-center text-white text-3xl font-bold mb-4">
|
| 661 |
+
A
|
| 662 |
+
</div>
|
| 663 |
+
<h3 class="text-xl font-bold">Admin User</h3>
|
| 664 |
+
<p class="text-text-muted text-sm mb-6">Super Administrator</p>
|
| 665 |
+
<button class="w-full py-2 border border-primary text-primary rounded-lg hover:bg-primary/10 transition-all">Edit Profile</button>
|
| 666 |
+
</div>
|
| 667 |
+
</div>
|
| 668 |
+
|
| 669 |
+
<!-- General Settings -->
|
| 670 |
+
<div class="lg:col-span-2 bg-surface rounded-2xl border border-surface-light p-6">
|
| 671 |
+
<h3 class="text-xl font-bold mb-6">General Settings</h3>
|
| 672 |
+
<form class="space-y-6">
|
| 673 |
+
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
| 674 |
+
<div>
|
| 675 |
+
<label class="block text-sm font-medium mb-2">Site Name</label>
|
| 676 |
+
<input type="text" value="EduLearn" class="w-full py-3 px-4 bg-background border border-surface-light rounded-xl focus:outline-none focus:border-primary">
|
| 677 |
+
</div>
|
| 678 |
+
<div>
|
| 679 |
+
<label class="block text-sm font-medium mb-2">Support Email</label>
|
| 680 |
+
<input type="email" value="support@edulearn.com" class="w-full py-3 px-4 bg-background border border-surface-light rounded-xl focus:outline-none focus:border-primary">
|
| 681 |
+
</div>
|
| 682 |
+
</div>
|
| 683 |
+
|
| 684 |
+
<div>
|
| 685 |
+
<label class="block text-sm font-medium mb-2">Platform Currency</label>
|
| 686 |
+
<select class="w-full py-3 px-4 bg-background border border-surface-light rounded-xl focus:outline-none focus:border-primary">
|
| 687 |
+
<option value="USD">USD ($)</option>
|
| 688 |
+
<option value="EUR">EUR (€)</option>
|
| 689 |
+
<option value="GBP">GBP (£)</option>
|
| 690 |
+
</select>
|
| 691 |
+
</div>
|
| 692 |
+
|
| 693 |
+
<div class="flex items-center justify-between p-4 bg-background rounded-xl">
|
| 694 |
+
<div>
|
| 695 |
+
<h4 class="font-medium">Maintenance Mode</h4>
|
| 696 |
+
<p class="text-text-muted text-sm">Disable access for standard users</p>
|
| 697 |
+
</div>
|
| 698 |
+
<label class="relative inline-flex items-center cursor-pointer">
|
| 699 |
+
<input type="checkbox" value="" class="sr-only peer">
|
| 700 |
+
<div class="w-11 h-6 bg-surface-light peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-primary"></div>
|
| 701 |
+
</label>
|
| 702 |
+
</div>
|
| 703 |
+
|
| 704 |
+
<div class="pt-4">
|
| 705 |
+
<button type="button" onclick="showToast('Settings saved successfully!')" class="px-6 py-3 gradient-bg text-white rounded-xl hover:opacity-90 transition-all">Save Changes</button>
|
| 706 |
+
</div>
|
| 707 |
+
</form>
|
| 708 |
+
</div>
|
| 709 |
+
</div>
|
| 710 |
+
</section>
|
| 711 |
+
|
| 712 |
+
</main>
|
| 713 |
+
</div>
|
| 714 |
+
|
| 715 |
+
<script>
|
| 716 |
+
// Mock Data
|
| 717 |
+
let courses = [
|
| 718 |
+
{ id: 1, title: 'Python for Beginners', category: 'Programming', instructor: 'Sarah Johnson', students: 2456, price: 49.99, status: 'published' },
|
| 719 |
+
{ id: 2, title: 'Web Development Bootcamp', category: 'Programming', instructor: 'Mike Chen', students: 1892, price: 89.99, status: 'published' },
|
| 720 |
+
{ id: 3, title: 'Digital Marketing 101', category: 'Business', instructor: 'Emma Wilson', students: 854, price: 39.99, status: 'draft' },
|
| 721 |
+
{ id: 4, title: 'Advanced Electronics', category: 'Electronics', instructor: 'David Brown', students: 432, price: 59.99, status: 'archived' },
|
| 722 |
+
{ id: 5, title: 'UI/UX Design Masterclass', category: 'Design', instructor: 'Lisa Taylor', students: 1205, price: 69.99, status: 'published' },
|
| 723 |
+
];
|
| 724 |
+
|
| 725 |
+
let users = [
|
| 726 |
+
{ id: 1, name: 'Alice Freeman', email: 'alice@example.com', role: 'Student', status: 'active', joined: '2023-01-15' },
|
| 727 |
+
{ id: 2, name: 'Bob Smith', email: 'bob@example.com', role: 'Instructor', status: 'active', joined: '2022-11-20' },
|
| 728 |
+
{ id: 3, name: 'Charlie Davis', email: 'charlie@example.com', role: 'Student', status: 'inactive', joined: '2023-03-10' },
|
| 729 |
+
{ id: 4, name: 'Diana Prince', email: 'diana@example.com', role: 'Admin', status: 'active', joined: '2022-08-05' },
|
| 730 |
+
{ id: 5, name: 'Evan Wright', email: 'evan@example.com', role: 'Student', status: 'banned', joined: '2023-02-28' },
|
| 731 |
+
];
|
| 732 |
+
|
| 733 |
+
let deleteTarget = null; // { type: 'course'|'user', id: number }
|
| 734 |
+
|
| 735 |
+
// Navigation Logic
|
| 736 |
+
function showSection(sectionId) {
|
| 737 |
+
// Hide all sections
|
| 738 |
+
document.querySelectorAll('section').forEach(el => el.classList.add('hidden'));
|
| 739 |
+
// Show target section
|
| 740 |
+
document.getElementById(sectionId).classList.remove('hidden');
|
| 741 |
+
|
| 742 |
+
// Update sidebar active state
|
| 743 |
+
document.querySelectorAll('.sidebar-item').forEach(el => {
|
| 744 |
+
el.classList.remove('bg-primary/20', 'text-text-primary');
|
| 745 |
+
el.classList.add('text-text-muted');
|
| 746 |
+
});
|
| 747 |
+
|
| 748 |
+
const activeLink = document.getElementById(`nav-${sectionId}`);
|
| 749 |
+
if(activeLink) {
|
| 750 |
+
activeLink.classList.remove('text-text-muted');
|
| 751 |
+
activeLink.classList.add('bg-primary/20', 'text-text-primary');
|
| 752 |
+
}
|
| 753 |
+
}
|
| 754 |
+
|
| 755 |
+
// Sidebar Toggle
|
| 756 |
+
function toggleSidebar() {
|
| 757 |
+
const sidebar = document.getElementById('sidebar');
|
| 758 |
+
sidebar.classList.toggle('collapsed');
|
| 759 |
+
|
| 760 |
+
// Mobile logic
|
| 761 |
+
if (window.innerWidth < 1024) {
|
| 762 |
+
if (!sidebar.classList.contains('collapsed')) {
|
| 763 |
+
sidebar.style.transform = 'translateX(0)';
|
| 764 |
+
} else {
|
| 765 |
+
sidebar.style.transform = 'translateX(-100%)';
|
| 766 |
+
}
|
| 767 |
+
}
|
| 768 |
+
}
|
| 769 |
+
|
| 770 |
+
// Render Tables
|
| 771 |
+
function renderCourses() {
|
| 772 |
+
const tbody = document.getElementById('coursesTableBody');
|
| 773 |
+
tbody.innerHTML = courses.map(course => `
|
| 774 |
+
<tr>
|
| 775 |
+
<td><input type="checkbox" class="custom-checkbox"></td>
|
| 776 |
+
<td>
|
| 777 |
+
<div class="font-medium text-text-primary">${course.title}</div>
|
| 778 |
+
</td>
|
| 779 |
+
<td><span class="text-sm text-text-muted">${course.category}</span></td>
|
| 780 |
+
<td>
|
| 781 |
+
<div class="flex items-center gap-2">
|
| 782 |
+
<div class="w-6 h-6 rounded-full bg-surface-light flex items-center justify-center text-xs text-white">
|
| 783 |
+
${course.instructor.charAt(0)}
|
| 784 |
+
</div>
|
| 785 |
+
<span class="text-sm">${
|