projectspro20's picture
create view to select and display course then select modules they want each module will have a respective price, display the total price below then allow it to be saved
714995a verified
Raw History Blame Contribute Delete
25.5 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>LearnFlow - Course Explorer</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/feather-icons"></script>
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
<link href="https://cdn.jsdelivr.net/npm/@tailwindcss/custom-forms@0.2.1/dist/custom-forms.min.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/gh/alpinejs/alpine@v2.8.2/dist/alpine.min.js" defer></script>
<style>
.module-content {
transition: all 0.3s ease;
max-height: 0;
overflow: hidden;
}
.module-content.expanded {
max-height: 1000px;
}
.progress-circle {
transition: stroke-dashoffset 0.5s ease-in-out;
}
</style>
</head>
<body class="bg-gray-50 font-sans antialiased">
<div class="min-h-screen" x-data="courseApp()">
<!-- Header -->
<header class="bg-indigo-700 text-white shadow-lg">
<div class="container mx-auto px-4 py-6">
<div class="flex justify-between items-center">
<div class="flex items-center space-x-2">
<i data-feather="book-open" class="w-8 h-8"></i>
<h1 class="text-2xl font-bold">LearnFlow</h1>
</div>
<nav class="hidden md:flex space-x-6">
<a href="index.html" class="hover:text-indigo-200">Dashboard</a>
<a href="course-selection.html" class="hover:text-indigo-200">Courses</a>
<a href="index.html" class="hover:text-indigo-200">Progress</a>
<div class="flex items-center space-x-2">
<img src="http://static.photos/people/40x40/42" alt="User" class="w-8 h-8 rounded-full">
<span>John Doe</span>
</div>
</nav>
<button class="md:hidden" @click="mobileMenuOpen = !mobileMenuOpen">
<i data-feather="menu" class="w-6 h-6"></i>
</button>
</div>
</div>
</header>
<!-- Mobile Menu -->
<div class="md:hidden bg-indigo-800 text-white" x-show="mobileMenuOpen" x-transition>
<div class="container mx-auto px-4 py-3 space-y-3">
<a href="index.html" class="block py-2 hover:text-indigo-200">Dashboard</a>
<a href="course-selection.html" class="block py-2 hover:text-indigo-200">Courses</a>
<a href="index.html" class="block py-2 hover:text-indigo-200">Progress</a>
<div class="flex items-center space-x-2 py-2">
<img src="http://static.photos/people/40x40/42" alt="User" class="w-8 h-8 rounded-full">
<span>John Doe</span>
</div>
</div>
</div>
<!-- Main Content -->
<main class="container mx-auto px-4 py-8">
<!-- Course Header -->
<div class="bg-white rounded-xl shadow-md overflow-hidden mb-8">
<div class="md:flex">
<div class="md:flex-shrink-0 md:w-1/3">
<img class="h-48 w-full object-cover md:h-full" src="http://static.photos/education/640x360/101" alt="Course cover">
</div>
<div class="p-8 flex-1">
<div class="flex justify-between items-start">
<div>
<div class="uppercase tracking-wide text-sm text-indigo-600 font-semibold">Web Development</div>
<h2 class="mt-2 text-3xl font-bold text-gray-900">Master Laravel & Livewire</h2>
<p class="mt-3 text-gray-600">Become a full-stack developer with this comprehensive course covering everything from basics to advanced concepts.</p>
</div>
<div class="text-right">
<div class="inline-flex items-center px-3 py-1 rounded-full text-sm font-medium bg-green-100 text-green-800">
<i data-feather="award" class="w-4 h-4 mr-1"></i>
Beginner to Advanced
</div>
<div class="mt-2 text-gray-500">45 lessons • 8 hours</div>
</div>
</div>
<div class="mt-6 flex flex-wrap items-center gap-4">
<div class="flex items-center text-gray-600">
<i data-feather="user" class="w-4 h-4 mr-1"></i>
<span>Instructor: Sarah Johnson</span>
</div>
<div class="flex items-center text-gray-600">
<i data-feather="calendar" class="w-4 h-4 mr-1"></i>
<span>Last updated: June 2023</span>
</div>
<div class="flex items-center text-gray-600">
<i data-feather="bar-chart-2" class="w-4 h-4 mr-1"></i>
<span>78% completion</span>
</div>
</div>
<div class="mt-6 w-full bg-gray-200 rounded-full h-2.5">
<div class="bg-indigo-600 h-2.5 rounded-full" style="width: 78%"></div>
</div>
</div>
</div>
</div>
<!-- Modules Section -->
<div class="bg-white rounded-xl shadow-md overflow-hidden">
<div class="px-6 py-4 border-b border-gray-200">
<h3 class="text-xl font-semibold text-gray-800">Course Modules</h3>
</div>
<!-- Module List -->
<div class="divide-y divide-gray-200">
<!-- Module 1 -->
<div class="p-6 hover:bg-gray-50 transition" x-data="{ expanded: false }">
<div class="flex justify-between items-start cursor-pointer" @click="expanded = !expanded">
<div class="flex items-start space-x-4">
<div class="flex-shrink-0">
<div class="relative w-12 h-12">
<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="2"></circle>
<circle cx="18" cy="18" r="16" fill="none" class="stroke-indigo-500 progress-circle" stroke-width="2" stroke-dasharray="100" stroke-dashoffset="30" stroke-linecap="round"></circle>
</svg>
<div class="absolute inset-0 flex items-center justify-center text-xs font-bold text-indigo-600">70%</div>
</div>
</div>
<div>
<h4 class="text-lg font-medium text-gray-900">1. Introduction to Laravel</h4>
<p class="mt-1 text-sm text-gray-500">4 lessons • 45 minutes</p>
</div>
</div>
<button class="text-gray-500 hover:text-gray-700 transition-transform duration-200" :class="{ 'rotate-180': expanded }">
<i data-feather="chevron-down" class="w-5 h-5"></i>
</button>
</div>
<div class="module-content mt-4 ml-16" :class="{ 'expanded': expanded }">
<div class="space-y-4">
<div class="flex items-center p-3 rounded-lg bg-gray-50 hover:bg-gray-100 cursor-pointer">
<div class="flex-shrink-0 w-8 h-8 rounded-full bg-green-100 flex items-center justify-center">
<i data-feather="check" class="w-4 h-4 text-green-600"></i>
</div>
<div class="ml-3 flex-1">
<p class="text-sm font-medium text-gray-900">1.1 What is Laravel?</p>
<p class="text-sm text-gray-500">10 min • Video</p>
</div>
<i data-feather="play" class="w-5 h-5 text-indigo-500"></i>
</div>
<div class="flex items-center p-3 rounded-lg bg-gray-50 hover:bg-gray-100 cursor-pointer">
<div class="flex-shrink-0 w-8 h-8 rounded-full bg-green-100 flex items-center justify-center">
<i data-feather="check" class="w-4 h-4 text-green-600"></i>
</div>
<div class="ml-3 flex-1">
<p class="text-sm font-medium text-gray-900">1.2 Setting Up Your Environment</p>
<p class="text-sm text-gray-500">15 min • Video</p>
</div>
<i data-feather="play" class="w-5 h-5 text-indigo-500"></i>
</div>
<div class="flex items-center p-3 rounded-lg bg-gray-50 hover:bg-gray-100 cursor-pointer">
<div class="flex-shrink-0 w-8 h-8 rounded-full bg-blue-100 flex items-center justify-center">
<i data-feather="book" class="w-4 h-4 text-blue-600"></i>
</div>
<div class="ml-3 flex-1">
<p class="text-sm font-medium text-gray-900">1.3 Laravel Directory Structure</p>
<p class="text-sm text-gray-500">12 min • Reading</p>
</div>
<i data-feather="arrow-right" class="w-5 h-5 text-indigo-500"></i>
</div>
<div class="flex items-center p-3 rounded-lg bg-gray-50 hover:bg-gray-100 cursor-pointer">
<div class="flex-shrink-0 w-8 h-8 rounded-full bg-gray-100 flex items-center justify-center">
<i data-feather="lock" class="w-4 h-4 text-gray-500"></i>
</div>
<div class="ml-3 flex-1">
<p class="text-sm font-medium text-gray-900">1.4 Your First Laravel App</p>
<p class="text-sm text-gray-500">8 min • Exercise</p>
</div>
<i data-feather="lock" class="w-5 h-5 text-gray-400"></i>
</div>
</div>
</div>
</div>
<!-- Module 2 -->
<div class="p-6 hover:bg-gray-50 transition" x-data="{ expanded: false }">
<div class="flex justify-between items-start cursor-pointer" @click="expanded = !expanded">
<div class="flex items-start space-x-4">
<div class="flex-shrink-0">
<div class="relative w-12 h-12">
<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="2"></circle>
<circle cx="18" cy="18" r="16" fill="none" class="stroke-indigo-500 progress-circle" stroke-width="2" stroke-dasharray="100" stroke-dashoffset="50" stroke-linecap="round"></circle>
</svg>
<div class="absolute inset-0 flex items-center justify-center text-xs font-bold text-indigo-600">50%</div>
</div>
</div>
<div>
<h4 class="text-lg font-medium text-gray-900">2. Laravel Fundamentals</h4>
<p class="mt-1 text-sm text-gray-500">6 lessons • 1 hour 20 minutes</p>
</div>
</div>
<button class="text-gray-500 hover:text-gray-700 transition-transform duration-200" :class="{ 'rotate-180': expanded }">
<i data-feather="chevron-down" class="w-5 h-5"></i>
</button>
</div>
<div class="module-content mt-4 ml-16" :class="{ 'expanded': expanded }">
<div class="space-y-4">
<a href="lesson-detail.html" class="flex items-center p-3 rounded-lg bg-gray-50 hover:bg-gray-100">
<div class="flex-shrink-0 w-8 h-8 rounded-full bg-green-100 flex items-center justify-center">
<i data-feather="check" class="w-4 h-4 text-green-600"></i>
</div>
<div class="ml-3 flex-1">
<p class="text-sm font-medium text-gray-900">2.1 Routing Basics</p>
<p class="text-sm text-gray-500">15 min • Video</p>
</div>
<i data-feather="play" class="w-5 h-5 text-indigo-500"></i>
</a>
<div class="flex items-center p-3 rounded-lg bg-gray-50 hover:bg-gray-100 cursor-pointer">
<div class="flex-shrink-0 w-8 h-8 rounded-full bg-green-100 flex items-center justify-center">
<i data-feather="check" class="w-4 h-4 text-green-600"></i>
</div>
<div class="ml-3 flex-1">
<p class="text-sm font-medium text-gray-900">2.2 Controllers 101</p>
<p class="text-sm text-gray-500">18 min • Video</p>
</div>
<i data-feather="play" class="w-5 h-5 text-indigo-500"></i>
</div>
<div class="flex items-center p-3 rounded-lg bg-gray-50 hover:bg-gray-100 cursor-pointer">
<div class="flex-shrink-0 w-8 h-8 rounded-full bg-blue-100 flex items-center justify-center">
<i data-feather="book" class="w-4 h-4 text-blue-600"></i>
</div>
<div class="ml-3 flex-1">
<p class="text-sm font-medium text-gray-900">2.3 Blade Templating</p>
<p class="text-sm text-gray-500">20 min • Reading</p>
</div>
<i data-feather="arrow-right" class="w-5 h-5 text-indigo-500"></i>
</div>
<div class="flex items-center p-3 rounded-lg bg-gray-50 hover:bg-gray-100 cursor-pointer">
<div class="flex-shrink-0 w-8 h-8 rounded-full bg-gray-100 flex items-center justify-center">
<i data-feather="lock" class="w-4 h-4 text-gray-500"></i>
</div>
<div class="ml-3 flex-1">
<p class="text-sm font-medium text-gray-900">2.4 Middleware</p>
<p class="text-sm text-gray-500">12 min • Video</p>
</div>
<i data-feather="lock" class="w-5 h-5 text-gray-400"></i>
</div>
<div class="flex items-center p-3 rounded-lg bg-gray-50 hover:bg-gray-100 cursor-pointer">
<div class="flex-shrink-0 w-8 h-8 rounded-full bg-gray-100 flex items-center justify-center">
<i data-feather="lock" class="w-4 h-4 text-gray-500"></i>
</div>
<div class="ml-3 flex-1">
<p class="text-sm font-medium text-gray-900">2.5 Requests & Responses</p>
<p class="text-sm text-gray-500">15 min • Video</p>
</div>
<i data-feather="lock" class="w-5 h-5 text-gray-400"></i>
</div>
</div>
</div>
</div>
<!-- Module 3 -->
<div class="p-6 hover:bg-gray-50 transition" x-data="{ expanded: false }">
<div class="flex justify-between items-start cursor-pointer" @click="expanded = !expanded">
<div class="flex items-start space-x-4">
<div class="flex-shrink-0">
<div class="relative w-12 h-12">
<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="2"></circle>
<circle cx="18" cy="18" r="16" fill="none" class="stroke-indigo-500 progress-circle" stroke-width="2" stroke-dasharray="100" stroke-dashoffset="80" stroke-linecap="round"></circle>
</svg>
<div class="absolute inset-0 flex items-center justify-center text-xs font-bold text-indigo-600">20%</div>
</div>
</div>
<div>
<h4 class="text-lg font-medium text-gray-900">3. Working with Databases</h4>
<p class="mt-1 text-sm text-gray-500">8 lessons • 2 hours</p>
</div>
</div>
<button class="text-gray-500 hover:text-gray-700 transition-transform duration-200" :class="{ 'rotate-180': expanded }">
<i data-feather="chevron-down" class="w-5 h-5"></i>
</button>
</div>
<div class="module-content mt-4 ml-16" :class="{ 'expanded': expanded }">
<div class="space-y-4">
<div class="flex items-center p-3 rounded-lg bg-gray-50 hover:bg-gray-100 cursor-pointer">
<div class="flex-shrink-0 w-8 h-8 rounded-full bg-green-100 flex items-center justify-center">
<i data-feather="check" class="w-4 h-4 text-green-600"></i>
</div>
<div class="ml-3 flex-1">
<p class="text-sm font-medium text-gray-900">3.1 Eloquent ORM Basics</p>
<p class="text-sm text-gray-500">25 min • Video</p>
</div>
<i data-feather="play" class="w-5 h-5 text-indigo-500"></i>
</div>
<div class="flex items-center p-3 rounded-lg bg-gray-50 hover:bg-gray-100 cursor-pointer">
<div class="flex-shrink-0 w-8 h-8 rounded-full bg-gray-100 flex items-center justify-center">
<i data-feather="lock" class="w-4 h-4 text-gray-500"></i>
</div>
<div class="ml-3 flex-1">
<p class="text-sm font-medium text-gray-900">3.2 Migrations & Seeders</p>
<p class="text-sm text-gray-500">20 min • Video</p>
</div>
<i data-feather="lock" class="w-5 h-5 text-gray-400"></i>
</div>
<!-- More lessons would be here -->
</div>
</div>
</div>
</div>
</div>
<!-- Course Actions -->
<div class="mt-8 flex flex-col sm:flex-row justify-between gap-4">
<button class="px-6 py-3 bg-white border border-gray-300 rounded-lg text-gray-700 font-medium hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 transition">
<div class="flex items-center justify-center space-x-2">
<i data-feather="arrow-left" class="w-5 h-5"></i>
<span>Back to Courses</span>
</div>
</button>
<button class="px-6 py-3 bg-indigo-600 rounded-lg text-white font-medium hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 transition">
<div class="flex items-center justify-center space-x-2">
<i data-feather="message-square" class="w-5 h-5"></i>
<span>Ask a Question</span>
</div>
</button>
</div>
</main>
<!-- Footer -->
<footer class="bg-gray-800 text-white py-8">
<div class="container mx-auto px-4">
<div class="grid grid-cols-1 md:grid-cols-4 gap-8">
<div>
<h3 class="text-lg font-semibold mb-4">LearnFlow</h3>
<p class="text-gray-400">Master modern web development with our interactive courses.</p>
</div>
<div>
<h4 class="text-md font-semibold mb-4">Courses</h4>
<ul class="space-y-2">
<li><a href="#" class="text-gray-400 hover:text-white">Web Development</a></li>
<li><a href="#" class="text-gray-400 hover:text-white">Mobile Apps</a></li>
<li><a href="#" class="text-gray-400 hover:text-white">Data Science</a></li>
</ul>
</div>
<div>
<h4 class="text-md font-semibold mb-4">Resources</h4>
<ul class="space-y-2">
<li><a href="#" class="text-gray-400 hover:text-white">Documentation</a></li>
<li><a href="#" class="text-gray-400 hover:text-white">Community</a></li>
<li><a href="#" class="text-gray-400 hover:text-white">Blog</a></li>
</ul>
</div>
<div>
<h4 class="text-md font-semibold mb-4">Connect</h4>
<div class="flex space-x-4">
<a href="#" class="text-gray-400 hover:text-white"><i data-feather="twitter"></i></a>
<a href="#" class="text-gray-400 hover:text-white"><i data-feather="facebook"></i></a>
<a href="#" class="text-gray-400 hover:text-white"><i data-feather="linkedin"></i></a>
<a href="#" class="text-gray-400 hover:text-white"><i data-feather="github"></i></a>
</div>
</div>
</div>
<div class="mt-8 pt-8 border-t border-gray-700 text-center text-gray-400">
<p>© 2023 LearnFlow. All rights reserved.</p>
</div>
</div>
</footer>
</div>
<script>
function courseApp() {
return {
mobileMenuOpen: false,
init() {
feather.replace();
}
}
}
</script>
<script>feather.replace();</script>
</body>
</html>