723 lines
28 KiB
PHP
723 lines
28 KiB
PHP
@extends('layouts.app')
|
|
|
|
@section('title', 'Home')
|
|
|
|
@push('styles')
|
|
<link rel="preload" as="image"
|
|
href="https://images.unsplash.com/photo-1517524206127-48bbd363f3d7?auto=format&fit=crop&w=1600&q=80"
|
|
fetchpriority="high">
|
|
<link rel="stylesheet" href="{{ asset('css/pages/home.css') }}">
|
|
@endpush
|
|
|
|
@section('content')
|
|
|
|
<style>
|
|
:root {
|
|
/* Modern, Sleek Automotive Palette */
|
|
--primary: #0F2C59; /* Deep Navy */
|
|
--secondary: #E36414; /* Electric Industrial Orange */
|
|
--secondary-hover: #C5530E; /* Deeper burnt orange */
|
|
--accent-light: #E6FFFA;
|
|
--accent-blue: #3085C3; /* Premium Tech Blue */
|
|
--bg-light: #F4F6F9; /* Soft slate light gray */
|
|
|
|
/* Semantic Adjustments */
|
|
--text-main: #1E293B;
|
|
--text-muted: #64748B;
|
|
--card-border: rgba(15, 44, 89, 0.08);
|
|
--shadow-color: rgba(15, 44, 89, 0.06);
|
|
}
|
|
|
|
/* ===== Global Improvements ===== */
|
|
body {
|
|
font-family: 'Segoe UI', Arial, sans-serif;
|
|
color: #1E293B;
|
|
background-color: #ffffff;
|
|
}
|
|
|
|
.section {
|
|
padding: 53px 0;
|
|
}
|
|
|
|
|
|
.section-title, h2, h3, h4, h5, h6 {
|
|
font-family: 'Segoe UI', Arial, sans-serif;
|
|
font-weight: 700;
|
|
color: var(--primary);
|
|
}
|
|
|
|
/* ===== Premium Theme Buttons ===== */
|
|
.btn-theme {
|
|
background: #305CB1;
|
|
color: #fff;
|
|
padding: 14px 35px;
|
|
border-radius: 40px;
|
|
font-weight: 600;
|
|
transition: all 0.3s ease;
|
|
font-weight: bolder;
|
|
}
|
|
|
|
.btn-theme:hover {
|
|
background: var(--secondary-hover);
|
|
border-color: var(--secondary-hover);
|
|
color: #fff;
|
|
transform: translateY(-3px);
|
|
box-shadow: 0 8px 20px rgba(227, 100, 20, 0.3);
|
|
}
|
|
|
|
.btn-outline-theme {
|
|
background: transparent;
|
|
color: #fff;
|
|
border: 2px solid #fff;
|
|
padding: 12px 32px;
|
|
border-radius: 40px;
|
|
font-weight: 600;
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.btn-outline-theme:hover {
|
|
background: #fff;
|
|
color: var(--primary);
|
|
transform: translateY(-3px);
|
|
}
|
|
|
|
.btn-outline-light-custom {
|
|
background: #f2e862;
|
|
color: #000000;
|
|
border: 2px solid rgba(255, 255, 255, 0.25);
|
|
padding: 12px 32px;
|
|
border-radius: 40px;
|
|
font-weight: 600;
|
|
backdrop-filter: blur(5px);
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.btn-outline-light-custom:hover {
|
|
background: #f2e862;
|
|
color: var(--primary);
|
|
border-color: #fff;
|
|
transform: translateY(-3px);
|
|
}
|
|
|
|
.hero {
|
|
height:636px;
|
|
background: linear-gradient(rgba(207, 226, 255, 0.88), rgba(0, 9, 15, 0.75)), url('https://images.unsplash.com/photo-1517524206127-48bbd363f3d7?auto=format&fit=crop&w=1600&q=80');
|
|
background-position: center;
|
|
background-size: cover;
|
|
}
|
|
|
|
.hero-content {
|
|
height: 100%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
flex-direction: column;
|
|
color: #fff;
|
|
padding-top: 38px;
|
|
}
|
|
|
|
.hero h1 {
|
|
font-size: 63px;
|
|
font-weight: 800;
|
|
margin-top: -87px;
|
|
text-shadow: 0 2px 15px rgba(0,0,0,0.3);
|
|
}
|
|
|
|
.hero p {
|
|
font-size: 22px;
|
|
max-width: 700px;
|
|
color: white;
|
|
}
|
|
|
|
.courses-section {
|
|
background-color: var(--bg-light);
|
|
}
|
|
|
|
.course-card {
|
|
border: 1px solid var(--card-border);
|
|
overflow: hidden;
|
|
background: #fff;
|
|
transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
|
|
box-shadow: 0 5px 15px var(--shadow-color);
|
|
}
|
|
|
|
.course-card:hover {
|
|
transform: translateY(-6px);
|
|
box-shadow: 0 15px 35px rgba(15, 44, 89, 0.12);
|
|
border-color: rgba(48, 133, 195, 0.25);
|
|
}
|
|
|
|
.course-image-wrapper {
|
|
position: relative;
|
|
overflow: hidden;
|
|
height: 210px;
|
|
}
|
|
|
|
.course-card img {
|
|
height: 100%;
|
|
width: 100%;
|
|
object-fit: cover;
|
|
transition: transform 0.6s ease;
|
|
}
|
|
|
|
.course-card:hover img {
|
|
transform: scale(1.06);
|
|
}
|
|
|
|
.badge-floating {
|
|
position: absolute;
|
|
top: 15px;
|
|
left: 15px;
|
|
background: #BC1A1A;
|
|
color: #fff;
|
|
font-weight: 700;
|
|
font-size: 11px;
|
|
padding: 5px 12px;
|
|
border-radius: 30px;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.05em;
|
|
z-index: 2;
|
|
box-shadow: 0 4px 10px rgba(0,0,0,0.15);
|
|
}
|
|
|
|
.course-card .card-body {
|
|
padding: 24px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
flex-grow: 1;
|
|
}
|
|
|
|
.course-title {
|
|
font-size: 20px;
|
|
font-weight: 700;
|
|
color: var(--primary);
|
|
margin-bottom: 8px;
|
|
line-height: 1.4;
|
|
transition: color 0.3s ease;
|
|
}
|
|
|
|
.course-card:hover .course-title {
|
|
color: #914040;
|
|
}
|
|
|
|
.course-author {
|
|
font-size: 13.5px;
|
|
font-weight: 500;
|
|
color: var(--accent-blue);
|
|
margin-bottom: 12px;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
}
|
|
|
|
.course-short-desc {
|
|
font-size: 14px;
|
|
color: #556575;
|
|
line-height: 1.6;
|
|
margin-bottom: 15px;
|
|
}
|
|
|
|
.course-features-container {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 8px;
|
|
margin-bottom: 15px;
|
|
}
|
|
|
|
.feature-pill {
|
|
background: rgba(48, 133, 195, 0.08);
|
|
color: var(--accent-blue);
|
|
font-size: 12px;
|
|
font-weight: 600;
|
|
padding: 4px 10px;
|
|
border-radius: 6px;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
}
|
|
|
|
.course-footer {
|
|
margin-top: auto;
|
|
padding-top: 15px;
|
|
border-top: 1px solid rgba(15, 44, 89, 0.08);
|
|
}
|
|
|
|
.course-meta-row {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
margin-bottom: 15px;
|
|
}
|
|
|
|
.rating-star {
|
|
color: #f39c12;
|
|
font-weight: 700;
|
|
font-size: 14px;
|
|
}
|
|
|
|
.rating-count {
|
|
color: var(--text-muted);
|
|
font-weight: 500;
|
|
}
|
|
|
|
.read-btn {
|
|
background:#822424;
|
|
color: white;
|
|
padding: 10px 20px;
|
|
font-weight: 700;
|
|
border-radius: 6px;
|
|
font-size: 14px;
|
|
transition: all 0.3s ease;
|
|
text-decoration: none;
|
|
display: block;
|
|
text-align: center;
|
|
}
|
|
|
|
.course-card:hover .read-btn {
|
|
background: #822424;
|
|
border-color: #e3eb73;
|
|
color: #fff;
|
|
}
|
|
|
|
/* ===== Why Choose Us ===== */
|
|
.why-overlay {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
background: linear-gradient(rgba(17, 17, 39, 0.9), rgba(0, 9, 15, 0.31)), url('https://images.unsplash.com/photo-1581093803931-46e730e7622e?auto=format&fit=crop&w=1600&q=80');
|
|
background-position: center;
|
|
background-size: cover;
|
|
z-index: 1;
|
|
}
|
|
|
|
.why-content-wrapper {
|
|
position: relative;
|
|
z-index: 2;
|
|
}
|
|
|
|
.custom-feature-card {
|
|
background: rgba(255, 255, 255, 0.43);
|
|
backdrop-filter: blur(10px);
|
|
-webkit-backdrop-filter: blur(10px);
|
|
border: 1px solid rgba(255, 255, 255, 0.08);
|
|
border-radius: 16px;
|
|
padding: 30px;
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.custom-feature-card:hover {
|
|
transform: translateY(-5px);
|
|
background: rgba(255, 255, 255, 0.07);
|
|
border-color: rgba(255, 255, 255, 0.2);
|
|
}
|
|
|
|
.icon-box {
|
|
background: #6a2525;
|
|
color: #FFE618;
|
|
width: 60px;
|
|
height: 60px;
|
|
border-radius: 12px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
margin-bottom: 20px;
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.custom-feature-card:hover .icon-box {
|
|
background: #6a2525;
|
|
color: #faf9f5;
|
|
}
|
|
|
|
/* ===== Animations ===== */
|
|
.animate-on-scroll {
|
|
opacity: 0;
|
|
transition: all 0.8s ease-out;
|
|
}
|
|
|
|
.fade-up-init { transform: translateY(30px); }
|
|
.zoom-in-init { transform: scale(0.95); }
|
|
.animate-on-scroll.animated {
|
|
opacity: 1;
|
|
transform: translateY(0) scale(1);
|
|
}
|
|
|
|
/* ===== Modal Styling ===== */
|
|
.custom-modal-header {
|
|
background-color: white;
|
|
color: #fff;
|
|
border-bottom: 3px solid var(--secondary);
|
|
padding: 23px;
|
|
}
|
|
</style>
|
|
|
|
{{-- ===================== HERO ===================== --}}
|
|
<section class="hero" role="banner" aria-label="Automobile Engineering Academy Introduction">
|
|
<div class="container h-100">
|
|
<div class="hero-content text-center animate-on-scroll animated fade-up-init">
|
|
<h1 class="display-4">Automobile Engineering Academy</h1>
|
|
<p class="mb-4">Driving Innovation Through Education, Research & Technology</p>
|
|
|
|
<div class="d-flex flex-wrap justify-content-center gap-3">
|
|
<a href="{{ Route::has('apply') ? route('apply') : '#' }}" class="btn btn-theme" style="background: #822424;border: 2px solid #FFF;">
|
|
<i class="fa-solid fa-user-plus me-2"></i>Apply Now
|
|
</a>
|
|
<a href="/courses" class="btn btn-outline-theme">
|
|
<i class="fa-solid fa-book-open me-2"></i>Explore Courses
|
|
</a>
|
|
<a href="mailto:imadhigp@gmail.com" class="btn btn-outline-light-custom">
|
|
<i class="fa-solid fa-phone me-2"></i>Contact Admissions
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
{{-- ===================== COURSES SECTION ===================== --}}
|
|
<section class="section courses-section" aria-labelledby="courses-heading">
|
|
<div class="container">
|
|
<div class="text-center mb-5 animate-on-scroll fade-up-init">
|
|
<span class="text-uppercase fw-bold small d-block mb-2" style="color: #822424; letter-spacing: 0.1em;">Academic Programs</span>
|
|
<h2 id="courses-heading" class="display-5 mb-2" style="font-weight: normal; color:#2D355B;">Our Top Courses</h2>
|
|
<p class="text-muted fs-5">Explore our professional, industry-recognized automotive engineering curriculums.</p>
|
|
</div>
|
|
|
|
@php
|
|
$courses = [
|
|
[
|
|
'id' => 'course-1',
|
|
'category' => 'mechanical',
|
|
'level' => 'ol',
|
|
'image' => 'https://images.unsplash.com/photo-1486262715619-67b85e0b08d3?auto=format&fit=crop&w=800&q=80',
|
|
'title' => 'Automotive Engineering Course',
|
|
'desc' => 'Learn vehicle design, engine technology, diagnostics and manufacturing workflows comprehensively.',
|
|
'author' => 'Automotive Engineering Dept.',
|
|
'rating' => '4.9',
|
|
'students' => '1.2k students',
|
|
'badge' => 'Popular'
|
|
],
|
|
[
|
|
'id' => 'course-2',
|
|
'category' => 'mechanical',
|
|
'level' => 'al',
|
|
'image' => 'https://images.unsplash.com/photo-1503376780353-7e6692767b70?auto=format&fit=crop&w=800&q=80',
|
|
'title' => 'Mechanical Systems Course',
|
|
'desc' => 'Study power transmission systems, active suspension, breaking dynamics and diagnostics.',
|
|
'author' => 'Tech & Service Campus',
|
|
'rating' => '4.7',
|
|
'students' => '850 students',
|
|
'badge' => 'Bestseller'
|
|
],
|
|
[
|
|
'id' => 'course-3',
|
|
'category' => 'ev',
|
|
'level' => 'al',
|
|
'image' => 'https://images.unsplash.com/photo-1502877338535-766e1452684a?auto=format&fit=crop&w=800&q=80',
|
|
'title' => 'Electric Vehicle Tech Course',
|
|
'desc' => 'Master advanced EV battery management, powertrains, smart networks and electric mobility.',
|
|
'author' => 'EV Research Institute',
|
|
'rating' => '4.8',
|
|
'students' => '640 students',
|
|
'badge' => 'New'
|
|
]
|
|
];
|
|
@endphp
|
|
|
|
<div class="row g-4 mb-5">
|
|
@foreach($courses as $key => $course)
|
|
<div class="col-lg-4 col-md-6 d-flex align-items-stretch animate-on-scroll fade-up-init" style="transition-delay: {{ $key * 100 }}ms;">
|
|
<div class="card course-card w-100 d-flex flex-column">
|
|
<a href="/courses" style="text-decoration:none;">
|
|
<div class="course-image-wrapper">
|
|
<span class="badge-floating">{{ $course['badge'] }}</span>
|
|
<img src="{{ $course['image'] }}" alt="{{ $course['title'] }}" loading="lazy">
|
|
</div>
|
|
|
|
<div class="card-body">
|
|
<h4 class="course-title">{{ $course['title'] }}</h4>
|
|
<div class="course-author">
|
|
<i class="fa-solid fa-graduation-cap"></i> {{ $course['author'] }}
|
|
</div>
|
|
<p class="course-short-desc">{{ $course['desc'] }}</p>
|
|
|
|
<div class="course-features-container">
|
|
<span class="feature-pill"><i class="fas fa-tools"></i> Practical Labs</span>
|
|
<span class="feature-pill"><i class="fas fa-certificate"></i> Accredited</span>
|
|
</div>
|
|
|
|
<div class="course-footer">
|
|
<div class="course-meta-row">
|
|
<span class="rating-star">
|
|
<i class="fas fa-star me-1"></i>{{ $course['rating'] }}
|
|
<span class="rating-count">({{ $course['students'] }})</span>
|
|
</span>
|
|
<span class="small fw-bold" style="color: #2ecc71;"><i class="fa-solid fa-circle-check me-1"></i>Active</span>
|
|
</div>
|
|
<a href="/courses" class="read-btn">View Details</a>
|
|
</div>
|
|
</div>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
@endforeach
|
|
</div>
|
|
|
|
<div class="text-center animate-on-scroll fade-up-init">
|
|
<a href="/courses" class="btn btn-theme" style="background:#822424;">
|
|
View All Courses <i class="fa-solid fa-arrow-right ms-2"></i>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
{{-- ===================== WHY CHOOSE US ===================== --}}
|
|
<section class="section why-section text-white position-relative overflow-hidden" aria-labelledby="why-us-heading" style="background-attachment: fixed;">
|
|
<div class="why-overlay"></div>
|
|
<div class="position-absolute top-0 start-0 w-100 h-100" style="z-index: 0;">
|
|
<img src="https://images.unsplash.com/photo-1487754180451-c456f719a1fc?auto=format&fit=crop&w=1600&q=80"
|
|
alt="Background Lab" class="w-100 h-100" style="object-fit: cover; opacity: 0.12; filter: grayscale(30%) brightness(80%);">
|
|
</div>
|
|
|
|
<div class="container why-content-wrapper position-relative" style="z-index: 2;">
|
|
<div class="text-center mb-5 animate-on-scroll fade-up-init">
|
|
<h2 id="why-us-heading" class="display-5 text-white mb-0 fw-bold" style="letter-spacing: -0.02em;">Why Choose Us?</h2>
|
|
</div>
|
|
|
|
<div class="row g-4 justify-content-center animate-on-scroll fade-up-init">
|
|
<div class="col-md-6 col-lg-4">
|
|
<div class="custom-feature-card h-100 d-flex flex-column align-items-center text-center p-4" style="border-radius: 20px; transition: all 0.4s ease;">
|
|
<div class="icon-box d-flex align-items-center justify-content-center" style="box-shadow: 0 10px 20px rgba(0,0,0,0.15); border-radius: 16px;">
|
|
<i class="fa-solid fa-flask-vial fs-3 fa-beat-hover"></i>
|
|
</div>
|
|
<h4 class="text-white fs-5 mb-3 fw-semibold">Modern Laboratories</h4>
|
|
<p class="text-white-50 small mb-0 lh-base">State-of-the-art facilities equipped with latest industrial testing tools.</p>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-md-6 col-lg-4">
|
|
<div class="custom-feature-card h-100 d-flex flex-column align-items-center text-center p-4" style="border-radius: 20px; transition: all 0.4s ease;">
|
|
<div class="icon-box d-flex align-items-center justify-content-center" style="box-shadow: 0 10px 20px rgba(0,0,0,0.15); border-radius: 16px;">
|
|
<i class="fa-solid fa-graduation-cap fs-3 fa-bounce-hover"></i>
|
|
</div>
|
|
<h4 class="text-white fs-5 mb-3 fw-semibold">Qualified Lecturers</h4>
|
|
<p class="text-white-50 small mb-0 lh-base">Learn directly from veteran automotive engineers and researchers.</p>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-md-6 col-lg-4">
|
|
<div class="custom-feature-card h-100 d-flex flex-column align-items-center text-center p-4" style="border-radius: 20px; transition: all 0.4s ease;">
|
|
<div class="icon-box d-flex align-items-center justify-content-center" style="box-shadow: 0 10px 20px rgba(0,0,0,0.15); border-radius: 16px;">
|
|
<i class="fa-solid fa-car fs-3 fa-shake-hover"></i>
|
|
</div>
|
|
<h4 class="text-white fs-5 mb-3 fw-semibold">Hands-on Training</h4>
|
|
<p class="text-white-50 small mb-0 lh-base">Gain real-world diagnostics experience inside our dedicated workshop floors.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
{{-- ===================== CALL TO ACTION ===================== --}}
|
|
<section class="section py-5 text-center animate-on-scroll zoom-in-init">
|
|
<div class="container">
|
|
<h2 class="display-6 mb-3">Join the Future of Automotive Engineering</h2>
|
|
<p class="text-muted mb-4 max-width-600 mx-auto">Shape your technical career through modern innovation, practical mastery, and expert guidance.</p>
|
|
<a href="{{ Route::has('apply') ? route('apply') : '#' }}" class="btn btn-theme" style="background: #822424;">Apply Now</a>
|
|
</div>
|
|
</section>
|
|
|
|
{{-- ===================== COURSE FINDER MODAL ===================== --}}
|
|
|
|
<div class="modal fade" id="courseFinderModal" tabindex="-1" aria-labelledby="courseFinderModalLabel" aria-hidden="true">
|
|
<div class="modal-dialog modal-dialog-centered modal-lg modal-dialog-scrollable">
|
|
<div class="modal-content border-0 shadow">
|
|
|
|
<div class="modal-header custom-modal-header text-white">
|
|
<h5 class="modal-title fw-bold fs-6 fs-md-5" id="courseFinderModalLabel">
|
|
<i class="fa-solid fa-compass me-2"></i>Find Your Course
|
|
</h5>
|
|
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal" aria-label="Close"></button>
|
|
</div>
|
|
|
|
<div class="modal-body p-3 p-md-4">
|
|
<form id="courseFinderForm">
|
|
|
|
{{-- Qualification Field --}}
|
|
<div class="mb-3">
|
|
<label for="educationLevel" class="form-label fw-semibold text-dark small fs-6">
|
|
<i class="fa-solid fa-user-degree me-1 text-primary"></i> What is your highest educational qualification?
|
|
</label>
|
|
<select class="form-select form-select-lg border-2 fs-6" id="educationLevel" required>
|
|
<option value="" selected disabled>Select Educational Qualification</option>
|
|
<option value="ol">Completed Ordinary Level (O/L)</option>
|
|
<option value="al">Completed Advanced Level (A/L)</option>
|
|
<option value="diploma">Diploma / Vocational Qualification</option>
|
|
</select>
|
|
</div>
|
|
|
|
{{-- Interest Area Field --}}
|
|
<div class="mb-4">
|
|
<label for="interestArea" class="form-label fw-semibold text-dark small fs-6">
|
|
<i class="fa-solid fa-car-battery me-1 text-primary"></i> Which area of Automotive Engineering interests you most?
|
|
</label>
|
|
<select class="form-select form-select-lg border-2 fs-6" id="interestArea" required>
|
|
<option value="" selected disabled>Select Field of Interest</option>
|
|
<option value="mechanical">Automotive Mechanical & Diagnostics</option>
|
|
<option value="ev">Electric Vehicles (EV) & Battery Technology</option>
|
|
<option value="all">General Automotive Engineering (All Areas)</option>
|
|
</select>
|
|
</div>
|
|
|
|
{{-- Submit Button --}}
|
|
<button type="submit" class="btn btn-theme w-100 py-2.5 fw-bold text-white shadow-sm" style="background:#822424;">
|
|
<i class="fa-solid fa-magnifying-glass me-2"></i>Find Recommended Courses
|
|
</button>
|
|
</form>
|
|
|
|
{{-- Result Area --}}
|
|
<div id="recommendedResults" class="mt-4" style="display: none;">
|
|
<hr class="my-3 my-md-4">
|
|
<h5 class="fw-bold text-success mb-3 fs-6 fs-md-5">
|
|
<i class="fa-solid fa-circle-check me-2"></i>Recommended Courses for You:
|
|
</h5>
|
|
<div id="resultsContainer" class="row g-3">
|
|
<!-- JS injected courses will appear here -->
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<!-- <div class="modal fade" id="courseFinderModal" tabindex="-1" aria-labelledby="courseFinderModalLabel" aria-hidden="true">
|
|
<div class="modal-dialog modal-dialog-centered modal-lg">
|
|
<div class="modal-content" style="width:60%;">
|
|
<div class="modal-header custom-modal-header">
|
|
<h5 class="modal-title fw-bold" id="courseFinderModalLabel">
|
|
<i class="fa-solid fa-compass me-2"></i>Find Your Course
|
|
</h5>
|
|
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal" aria-label="Close"></button>
|
|
</div>
|
|
<div class="modal-body p-4">
|
|
<form id="courseFinderForm">
|
|
<div class="mb-3">
|
|
<label for="educationLevel" class="form-label fw-semibold text-dark">
|
|
<i class="fa-solid fa-user-degree me-1 text-primary"></i> What is your highest educational qualification?
|
|
</label>
|
|
<select class="form-select border-2" id="educationLevel" required style=" padding: .375rem 2.25rem 2.375rem .75rem;height: 89px;">
|
|
<option value="" selected disabled>Select Educational Qualification</option>
|
|
<option value="ol">Completed Ordinary Level (O/L)</option>
|
|
<option value="al">Completed Advanced Level (A/L)</option>
|
|
<option value="diploma">Diploma / Vocational Qualification</option>
|
|
</select>
|
|
</div>
|
|
|
|
<div class="mb-4">
|
|
<label for="interestArea" class="form-label fw-semibold text-dark">
|
|
Which area of Automotive Engineering interests you most?
|
|
</label>
|
|
<select class="form-select border-2" id="interestArea" required style=" padding: .375rem 2.25rem 2.375rem .75rem;height: 89px;">
|
|
<option value="" selected disabled>Select Field of Interest</option>
|
|
<option value="mechanical">Automotive Mechanical & Diagnostics</option>
|
|
<option value="ev">Electric Vehicles (EV) & Battery Technology</option>
|
|
<option value="all">General Automotive Engineering (All Areas)</option>
|
|
</select>
|
|
</div>
|
|
|
|
<button type="submit" class="btn btn-theme w-100" style="background:#822424;">
|
|
<i class="fa-solid fa-magnifying-glass me-2"></i>Find Recommended Courses
|
|
</button>
|
|
</form> -->
|
|
|
|
{{-- Result Area --}}
|
|
<!-- <div id="recommendedResults" class="mt-4" style="display: none;">
|
|
<hr class="my-4">
|
|
<h5 class="fw-bold text-success mb-3">
|
|
<i class="fa-solid fa-circle-check me-2"></i>Recommended Courses for You:
|
|
</h5>
|
|
<div id="resultsContainer" class="row g-3">
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div> -->
|
|
|
|
<script>
|
|
document.addEventListener('DOMContentLoaded', function () {
|
|
// 1. Scroll Animations
|
|
const animatedElements = document.querySelectorAll('.animate-on-scroll');
|
|
const observer = new IntersectionObserver((entries) => {
|
|
entries.forEach(entry => {
|
|
if (entry.isIntersecting) {
|
|
entry.target.classList.add('animated');
|
|
observer.unobserve(entry.target);
|
|
}
|
|
});
|
|
}, { threshold: 0.1 });
|
|
animatedElements.forEach(el => observer.observe(el));
|
|
|
|
// 2. Auto Open Modal on Site Load
|
|
const courseModalElement = document.getElementById('courseFinderModal');
|
|
if (courseModalElement && typeof bootstrap !== 'undefined') {
|
|
const courseModal = new bootstrap.Modal(courseModalElement);
|
|
courseModal.show();
|
|
}
|
|
|
|
// 3. Course Recommendation Logic
|
|
const allCourses = @json($courses);
|
|
const form = document.getElementById('courseFinderForm');
|
|
const resultsArea = document.getElementById('recommendedResults');
|
|
const resultsContainer = document.getElementById('resultsContainer');
|
|
|
|
form.addEventListener('submit', function (e) {
|
|
e.preventDefault();
|
|
|
|
const selectedLevel = document.getElementById('educationLevel').value;
|
|
const selectedInterest = document.getElementById('interestArea').value;
|
|
|
|
// Filter logic
|
|
const filtered = allCourses.filter(course => {
|
|
const matchCategory = (selectedInterest === 'all') || (course.category === selectedInterest);
|
|
const matchLevel = (selectedLevel === 'ol' && course.level === 'ol') ||
|
|
(selectedLevel === 'al') ||
|
|
(selectedLevel === 'diploma');
|
|
return matchCategory && matchLevel;
|
|
});
|
|
|
|
// Display Results
|
|
resultsContainer.innerHTML = '';
|
|
if (filtered.length > 0) {
|
|
filtered.forEach(course => {
|
|
const cardHTML = `
|
|
<div class="col-md-6">
|
|
<div class="card h-100 border shadow-sm">
|
|
<img src="${course.image}" class="card-img-top" style="height: 120px; object-fit: cover;" alt="${course.title}">
|
|
<div class="card-body p-3 d-flex flex-column justify-content-between">
|
|
<div>
|
|
<h6 class="fw-bold mb-1" style="color: var(--primary);">${course.title}</h6>
|
|
<p class="small text-muted mb-2">${course.desc.substring(0, 60)}...</p>
|
|
</div>
|
|
<a href="/courses" class="btn btn-sm btn-outline-primary mt-2" style="color: #fff;
|
|
background: #953f3f;border-color:white;">View Details</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
`;
|
|
resultsContainer.innerHTML += cardHTML;
|
|
});
|
|
} else {
|
|
resultsContainer.innerHTML = `<p class="text-muted">No specific courses matched your criteria. Please explore all available courses.</p>`;
|
|
}
|
|
|
|
resultsArea.style.display = 'block';
|
|
});
|
|
});
|
|
</script>
|
|
|
|
@endsection |