358 lines
13 KiB
PHP
358 lines
13 KiB
PHP
@extends('layouts.studentportalnav')
|
|
|
|
@section('title', 'My Course')
|
|
|
|
@section('content')
|
|
|
|
<style>
|
|
:root {
|
|
--theme-navy: #2D355B; /* Primary Navy */
|
|
--theme-navy-dark: #1F2541; /* Dark Navy */
|
|
--theme-red: #822424; /* Primary Accent Red */
|
|
--theme-red-hover: #df2c3e; /* Red Hover */
|
|
--theme-yellow: #FFEA85; /* Accent Yellow/Gold */
|
|
--bg-light: #F6F6F6; /* Page Background */
|
|
--white: #ffffff;
|
|
}
|
|
|
|
body {
|
|
background: var(--bg-light);
|
|
font-family: 'Segoe UI', sans-serif;
|
|
}
|
|
|
|
.main-portal-content {
|
|
padding: 10px 5px;
|
|
min-height: 100vh;
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
/* Premium Hero Section */
|
|
.hero {
|
|
background: linear-gradient(135deg, #2B293F 0%, #94A6F959 100%) !important;
|
|
color: var(--white) !important;
|
|
border-radius: 16px;
|
|
padding: 35px 30px;
|
|
margin-bottom: 30px;
|
|
box-shadow: 0 8px 25px rgba(31, 37, 65, 0.15);
|
|
position: relative;
|
|
overflow: hidden;
|
|
border-left: 5px solid var(--theme-red);
|
|
}
|
|
|
|
.hero::after {
|
|
content: '';
|
|
position: absolute;
|
|
top: -30%;
|
|
right: -10%;
|
|
width: 350px;
|
|
height: 350px;
|
|
background: rgba(255, 255, 255, 0.04);
|
|
border-radius: 50%;
|
|
pointer-events: none;
|
|
}
|
|
|
|
/* Course Card */
|
|
.course-card {
|
|
border: 1px solid #e2e8f0 !important;
|
|
border-radius: 16px !important;
|
|
overflow: hidden;
|
|
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05) !important;
|
|
background: var(--white);
|
|
margin-bottom: 30px;
|
|
}
|
|
|
|
.course-card img {
|
|
height: 240px;
|
|
object-fit: cover;
|
|
width: 100%;
|
|
}
|
|
|
|
/* Sidebar Info Boxes */
|
|
.info-box {
|
|
border-radius: 12px !important;
|
|
padding: 20px 24px;
|
|
background: var(--white);
|
|
box-shadow: 0 4px 12px rgba(219, 240, 99, 0.04) !important;
|
|
border: 1px solid #e2e8f0 !important;
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.info-box:hover {
|
|
transform: translateY(-3px);
|
|
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08) !important;
|
|
border-color: var(--theme-navy) !important;
|
|
}
|
|
|
|
.stat-icon {
|
|
width: 48px;
|
|
height: 48px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
border-radius: 10px;
|
|
font-size: 18px;
|
|
background: var(--theme-red) !important;
|
|
color: #ffff8d;
|
|
}
|
|
|
|
/* Modules Card */
|
|
.module-card {
|
|
border: 1px solid #e2e8f0 !important;
|
|
border-radius: 14px !important;
|
|
transition: all 0.3s ease;
|
|
background: var(--white);
|
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03) !important;
|
|
}
|
|
|
|
.module-card:hover {
|
|
transform: translateY(-4px);
|
|
box-shadow: 0 10px 22px rgba(0, 0, 0, 0.08) !important;
|
|
border-color: var(--theme-red) !important;
|
|
}
|
|
|
|
/* Progress bar customizations */
|
|
.progress {
|
|
height: 10px !important;
|
|
border-radius: 50px !important;
|
|
background-color: #e2e8f0 !important;
|
|
}
|
|
|
|
.progress-bar {
|
|
border-radius: 50px !important;
|
|
background: linear-gradient(90deg, var(--theme-red), var(--theme-red-hover)) !important;
|
|
}
|
|
|
|
/* Status Badges */
|
|
.status {
|
|
font-size: 11px;
|
|
font-weight: 700;
|
|
padding: 6px 14px;
|
|
border-radius: 50px;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.5px;
|
|
}
|
|
|
|
.completed { background: rgba(45, 53, 91, 0.12); color: var(--theme-navy); }
|
|
.progressing { background: rgba(247, 63, 82, 0.15); color: var(--theme-red); }
|
|
.locked { background: #e2e8f0; color: #64748b; }
|
|
|
|
/* Custom Buttons */
|
|
.btn-theme-red {
|
|
background-color: var(--theme-red) !important;
|
|
border-color: var(--theme-red) !important;
|
|
color: #fff !important;
|
|
border-radius: 8px;
|
|
font-weight: 600;
|
|
transition: all 0.2s ease;
|
|
}
|
|
.btn-theme-red:hover {
|
|
background-color: var(--theme-red-hover) !important;
|
|
border-color: var(--theme-red-hover) !important;
|
|
}
|
|
|
|
.btn-theme-navy {
|
|
background-color: var(--theme-navy) !important;
|
|
border-color: var(--theme-navy) !important;
|
|
color: #fff !important;
|
|
border-radius: 8px;
|
|
font-weight: 600;
|
|
transition: all 0.2s ease;
|
|
}
|
|
.btn-theme-navy:hover {
|
|
background-color: var(--theme-navy-dark) !important;
|
|
}
|
|
|
|
.btn-continue {
|
|
background-color: var(--theme-red) !important;
|
|
color: #ffffff !important;
|
|
border-radius: 8px;
|
|
transition: all 0.2s ease;
|
|
}
|
|
.btn-continue:hover {
|
|
background-color: var(--theme-red-hover) !important;
|
|
}
|
|
|
|
/* Section Title Indicator */
|
|
.section-title-wrapper {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
margin: 30px 0 20px;
|
|
}
|
|
|
|
.section-title-wrapper::before {
|
|
content: '';
|
|
display: inline-block;
|
|
width: 5px;
|
|
height: 24px;
|
|
background-color: var(--theme-red);
|
|
border-radius: 2px;
|
|
}
|
|
|
|
@media (min-width: 768px) {
|
|
.main-portal-content { padding: 10px; }
|
|
.hero { padding: 40px; }
|
|
.course-card img { height: 280px; }
|
|
}
|
|
</style>
|
|
|
|
<div class="main-portal-content">
|
|
<div class="container-fluid">
|
|
|
|
@if($course)
|
|
|
|
{{-- Dynamic Image URL Handler --}}
|
|
@php
|
|
$imageSrc = Str::startsWith($course->image, ['http://', 'https://'])
|
|
? $course->image
|
|
: asset('storage/' . $course->image);
|
|
@endphp
|
|
|
|
<!-- Hero Section -->
|
|
<div class="hero">
|
|
<div class="row align-items-center">
|
|
<div class="col-lg-9 col-md-8 text-start">
|
|
<h1 class="fw-bold display-6 mb-2">{{ $course->title }}</h1>
|
|
<p class="lead mb-4 small opacity-75">Welcome back! Continue your learning journey and complete all modules.</p>
|
|
<a href="#" class="btn btn-continue px-4 py-2 fw-semibold shadow-sm">
|
|
<i class="fa fa-play me-2"></i> Continue Learning
|
|
</a>
|
|
</div>
|
|
<div class="col-lg-3 col-md-4 text-center d-none d-md-block">
|
|
<i class="fa-solid fa-graduation-cap" style="font-size: 140px; opacity: 0.35; color: #8C080F;"></i>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Main Content Grid -->
|
|
<div class="row g-4">
|
|
|
|
<!-- LEFT COLUMN: Course details & Modules -->
|
|
<div class="col-lg-8 col-12">
|
|
|
|
<!-- Main Course Card -->
|
|
<div class="card course-card">
|
|
<img src="{{ $imageSrc }}" alt="{{ $course->title }}" onerror="this.onerror=null;this.src='https://images.unsplash.com/photo-1486262715619-67b85e0b08d3?auto=format&fit=crop&w=1200&q=80';">
|
|
<div class="card-body p-4">
|
|
<div class="d-flex flex-wrap justify-content-between align-items-start gap-2 mb-3">
|
|
<div>
|
|
<h3 class="fw-bold mb-1" style="color: var(--theme-navy);">{{ $course->course_code ?? $course->title }}</h3>
|
|
<p class="text-muted small mb-0">
|
|
<i class="fa-solid fa-user me-1" style="color: var(--theme-red);"></i> {{ $course->author ?? 'Instructor' }}
|
|
</p>
|
|
</div>
|
|
<span class="badge px-3 py-2 rounded-pill" style="background-color: var(--theme-navy); color: var(--theme-yellow);">
|
|
{{ $course->badge ?? 'Active Course' }}
|
|
</span>
|
|
</div>
|
|
|
|
<p class="text-secondary small lh-base">
|
|
{{ $course->desc ?? 'No description available for this course.' }}
|
|
</p>
|
|
|
|
<div class="mt-4">
|
|
<div class="d-flex justify-content-between mb-2 small">
|
|
<span class="fw-semibold" style="color: var(--theme-navy);">Overall Progress</span>
|
|
<span class="fw-bold" style="color: var(--theme-red);">0%</span>
|
|
</div>
|
|
<div class="progress">
|
|
<div class="progress-bar" style="width:0%"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Modules Header -->
|
|
<div class="section-title-wrapper">
|
|
<h4 class="fw-bold mb-0" style="color: var(--theme-navy);">
|
|
Course Modules
|
|
</h4>
|
|
</div>
|
|
|
|
<!-- Modules Sub-Grid (Sample Modules Interface) -->
|
|
<div class="row g-4">
|
|
<div class="col-md-6 col-12">
|
|
<div class="card module-card h-100">
|
|
<div class="card-body p-4 d-flex flex-column justify-content-between">
|
|
<div>
|
|
<div class="d-flex justify-content-between align-items-start gap-2 mb-2">
|
|
<h6 class="fw-bold mb-0" style="color: var(--theme-navy);">Introduction & Fundamentals</h6>
|
|
<span class="status progressing">In Progress</span>
|
|
</div>
|
|
<p class="text-muted small mb-0">Basic concepts and core theories.</p>
|
|
</div>
|
|
<div class="mt-4">
|
|
<button type="button" onclick="goToModule(1)" class="btn btn-theme-red w-100 btn-sm py-2">
|
|
Continue Learning
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!-- RIGHT COLUMN: Sidebar Statistics -->
|
|
<div class="col-lg-4 col-12">
|
|
<div class="row g-3">
|
|
<div class="col-12">
|
|
<div class="info-box d-flex align-items-center">
|
|
<div class="stat-icon"><i class="fa fa-layer-group"></i></div>
|
|
<div class="ms-3">
|
|
<h5 class="fw-bold mb-0" style="color: var(--theme-navy);">{{ $course->level ?? 'General' }}</h5>
|
|
<span class="text-muted small">Course Level</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-12">
|
|
<div class="info-box d-flex align-items-center">
|
|
<div class="stat-icon"><i class="fa fa-clock"></i></div>
|
|
<div class="ms-3">
|
|
<h5 class="fw-bold mb-0" style="color: var(--theme-navy);">{{ $course->duration ?? 'N/A' }}</h5>
|
|
<span class="text-muted small">Course Duration</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-12">
|
|
<div class="info-box d-flex align-items-center">
|
|
<div class="stat-icon"><i class="fa fa-award"></i></div>
|
|
<div class="ms-3">
|
|
<h5 class="fw-bold mb-0" style="color: var(--theme-navy);">{{ $course->status ?? 'Enrolled' }}</h5>
|
|
<span class="text-muted small">Status</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div> <!-- End Row -->
|
|
|
|
@else
|
|
|
|
<!-- Empty State: When no course is assigned -->
|
|
<div class="row justify-content-center py-5">
|
|
<div class="col-md-8 text-center">
|
|
<div class="p-5 rounded-4 shadow-sm bg-white border">
|
|
<i class="fas fa-graduation-cap fa-4x text-muted mb-3"></i>
|
|
<h3 class="fw-bold text-dark mb-2">No Assigned Course Found</h3>
|
|
<p class="text-muted mb-0">You do not have any course assigned to your profile yet. Please contact the administration for assistance.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
@endif
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
function goToModule(moduleId) {
|
|
|
|
window.location.href = "{{ url('/module') }}/" + moduleId;
|
|
}
|
|
</script>
|
|
|
|
@endsection |