This commit is contained in:
KaviSaparamadu 2026-08-07 12:41:16 +05:30
parent 5f2abd44b4
commit 523179880e
2 changed files with 321 additions and 29 deletions

View File

@ -4,18 +4,28 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="csrf-token" content="{{ csrf_token() }}">
<title>@yield('title', 'Automobile Academic')</title>
<title>@yield('title', 'Home') | AutoEdu - Automobile Engineering Academy</title>
<link rel="icon" type="image/svg+xml" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Crect width='64' height='64' rx='14' fill='%232D355B'/%3E%3Cpath d='M18 28 L24 16 L40 16 L46 28 Z' fill='%23FFEA85'/%3E%3Crect x='8' y='28' width='48' height='14' rx='6' fill='%23FFEA85'/%3E%3Ccircle cx='20' cy='44' r='6' fill='%231F2541' stroke='%23FFEA85' stroke-width='2'/%3E%3Ccircle cx='44' cy='44' r='6' fill='%231F2541' stroke='%23FFEA85' stroke-width='2'/%3E%3C/svg%3E">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.6.0/css/all.min.css">
<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@400;500;600;700&family=Poppins:wght@600;700;800&display=swap" rel="stylesheet">
<style>
body {
font-family: 'Segoe UI', sans-serif;
font-family: 'Inter', 'Segoe UI', sans-serif;
background: #F6F6F6;
padding-top: 83px;
}
h1, h2, h3, h4, h5, h6,
.navbar-brand, .site-footer h4 {
font-family: 'Poppins', 'Segoe UI', sans-serif;
}
.navbar {
background:#2D355B;
/* background: #3E51B8; */

View File

@ -30,7 +30,7 @@
/* ===== Global Improvements ===== */
body {
font-family: 'Segoe UI', Arial, sans-serif;
font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
color: #1E293B;
background-color: #ffffff;
}
@ -41,8 +41,9 @@ body {
.section-title, h2, h3, h4, h5, h6 {
font-family: 'Segoe UI', Arial, sans-serif;
font-family: 'Poppins', 'Segoe UI', Arial, sans-serif;
font-weight: 700;
letter-spacing: -0.01em;
color: var(--primary);
}
@ -110,16 +111,76 @@ body {
overflow: hidden;
display: flex;
align-items: center;
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');
box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.28);
}
.hero-slideshow {
position: absolute;
inset: 0;
z-index: 0;
}
.hero-slide {
position: absolute;
inset: 0;
background-position: center;
background-size: cover;
box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.28);
opacity: 0;
transform: scale(1);
transition: opacity 2s ease-in-out, transform 7s ease-out;
}
.hero-slide.active {
opacity: 1;
transform: scale(1.09);
}
.hero-dots {
position: absolute;
left: 0;
right: 0;
bottom: 26px;
z-index: 3;
display: flex;
justify-content: center;
gap: 10px;
}
.hero-dot {
width: 10px;
height: 10px;
border-radius: 50%;
border: 2px solid rgba(255, 255, 255, 0.6);
background: rgba(255, 255, 255, 0.15);
padding: 0;
cursor: pointer;
transition: all 0.3s ease;
}
.hero-dot:hover {
background: rgba(255, 255, 255, 0.5);
}
.hero-dot.active {
background: #f2e862;
border-color: #f2e862;
width: 26px;
border-radius: 999px;
}
.hero-overlay {
position: absolute;
inset: 0;
z-index: 1;
background: linear-gradient(rgba(207, 226, 255, 0.88), rgba(0, 9, 15, 0.75));
pointer-events: none;
}
.hero::before {
content: '';
position: absolute;
inset: 0;
z-index: 2;
background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.12), transparent 28%),
radial-gradient(circle at bottom left, rgba(255, 255, 255, 0.08), transparent 30%);
pointer-events: none;
@ -127,7 +188,7 @@ body {
.hero-content {
position: relative;
z-index: 1;
z-index: 3;
width: 100%;
max-width: 980px;
margin: 0 auto;
@ -225,6 +286,7 @@ body {
font-size: 17px;
font-weight: 800;
line-height: 1;
font-variant-numeric: tabular-nums;
}
.hero-stat-pill span {
@ -254,17 +316,33 @@ body {
}
.course-card {
position: relative;
border: 1px solid var(--card-border);
border-radius: 18px;
overflow: hidden;
background: #fff;
transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), border-color 0.4s ease;
box-shadow: 0 5px 15px var(--shadow-color);
}
.course-card::after {
content: '';
position: absolute;
inset: 0;
z-index: 3;
pointer-events: none;
background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, 0.35) 50%, transparent 60%);
transform: translateX(-120%);
transition: transform 0.9s ease;
}
.course-card:hover::after {
transform: translateX(120%);
}
.course-card:hover {
transform: translateY(-6px);
box-shadow: 0 20px 40px rgba(15, 44, 89, 0.14);
transform: translateY(-8px);
box-shadow: 0 24px 45px rgba(15, 44, 89, 0.16);
border-color: rgba(48, 133, 195, 0.25);
}
@ -278,17 +356,24 @@ body {
height: 100%;
width: 100%;
object-fit: cover;
transition: transform 0.6s ease;
transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.course-card:hover img {
transform: scale(1.06);
transform: scale(1.12);
}
.courses-section .row.g-4 > div {
perspective: 1200px;
}
.badge-floating {
position: absolute;
top: 15px;
left: 15px;
display: inline-flex;
align-items: center;
gap: 5px;
background: #BC1A1A;
color: #fff;
font-weight: 700;
@ -298,7 +383,14 @@ body {
text-transform: uppercase;
letter-spacing: 0.05em;
z-index: 2;
box-shadow: 0 4px 10px rgba(0,0,0,0.15);
box-shadow: 0 4px 10px rgba(0,0,0,0.15), 0 0 0 0 rgba(188, 26, 26, 0.45);
animation: badgePulse 2.4s ease-out infinite;
}
@keyframes badgePulse {
0% { box-shadow: 0 4px 10px rgba(0,0,0,0.15), 0 0 0 0 rgba(188, 26, 26, 0.45); }
70% { box-shadow: 0 4px 10px rgba(0,0,0,0.15), 0 0 0 8px rgba(188, 26, 26, 0); }
100% { box-shadow: 0 4px 10px rgba(0,0,0,0.15), 0 0 0 0 rgba(188, 26, 26, 0); }
}
.course-card .card-body {
@ -355,6 +447,12 @@ body {
display: inline-flex;
align-items: center;
gap: 6px;
transition: transform 0.3s ease, background-color 0.3s ease;
}
.course-card:hover .feature-pill {
background: rgba(48, 133, 195, 0.15);
transform: translateY(-2px);
}
.course-footer {
@ -374,6 +472,9 @@ body {
color: #f39c12;
font-weight: 700;
font-size: 14px;
display: inline-flex;
align-items: center;
gap: 6px;
}
.rating-count {
@ -381,23 +482,60 @@ body {
font-weight: 500;
}
.star-rating {
position: relative;
display: inline-block;
font-size: 12px;
line-height: 1;
letter-spacing: 2px;
}
.star-rating-bg {
color: #dde3ea;
}
.star-rating-fill {
position: absolute;
top: 0;
left: 0;
overflow: hidden;
white-space: nowrap;
width: 0;
color: #f39c12;
transition: width 1.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.star-rating.filled .star-rating-fill {
width: calc(var(--rating) / 5 * 100%);
}
.read-btn {
background:#822424;
color: white;
padding: 10px 20px;
font-weight: 700;
border-radius: 6px;
border-radius: 8px;
font-size: 14px;
transition: all 0.3s ease;
text-decoration: none;
display: block;
text-align: center;
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
}
.read-btn .read-btn-arrow {
transition: transform 0.3s ease;
}
.course-card:hover .read-btn {
background: #822424;
border-color: #e3eb73;
background: #6a1c1c;
color: #fff;
box-shadow: 0 8px 18px rgba(130, 36, 36, 0.3);
}
.course-card:hover .read-btn .read-btn-arrow {
transform: translateX(4px);
}
/* ===== Why Choose Us ===== */
@ -461,10 +599,10 @@ body {
/* ===== Animations ===== */
.animate-on-scroll {
opacity: 0;
transition: all 0.8s ease-out;
transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.fade-up-init { transform: translateY(30px); }
.fade-up-init { transform: translateY(34px) scale(0.98); }
.zoom-in-init { transform: scale(0.95); }
.animate-on-scroll.animated {
opacity: 1;
@ -547,7 +685,30 @@ body {
</style>
{{-- ===================== HERO ===================== --}}
@php
$heroSlides = [
'https://images.unsplash.com/photo-1517524206127-48bbd363f3d7?auto=format&fit=crop&w=1600&q=80',
'https://images.unsplash.com/photo-1553440569-bcc63803a83d?auto=format&fit=crop&w=1600&q=80',
'https://images.unsplash.com/photo-1486262715619-67b85e0b08d3?auto=format&fit=crop&w=1600&q=80',
'https://images.unsplash.com/photo-1503376780353-7e6692767b70?auto=format&fit=crop&w=1600&q=80',
'https://images.unsplash.com/photo-1493238792000-8113da705763?auto=format&fit=crop&w=1600&q=80',
'https://images.unsplash.com/photo-1502877338535-766e1452684a?auto=format&fit=crop&w=1600&q=80',
'https://images.unsplash.com/photo-1581093803931-46e730e7622e?auto=format&fit=crop&w=1600&q=80',
'https://images.unsplash.com/photo-1487754180451-c456f719a1fc?auto=format&fit=crop&w=1600&q=80',
];
@endphp
<section class="hero" role="banner" aria-label="Automobile Engineering Academy Introduction">
<div class="hero-slideshow" aria-hidden="true">
@foreach($heroSlides as $index => $slideImage)
<div class="hero-slide {{ $index === 0 ? 'active' : '' }}" style="background-image: url('{{ $slideImage }}');"></div>
@endforeach
</div>
<div class="hero-overlay" aria-hidden="true"></div>
<div class="hero-dots" aria-hidden="true">
@foreach($heroSlides as $index => $slideImage)
<button type="button" class="hero-dot {{ $index === 0 ? 'active' : '' }}" data-slide-index="{{ $index }}" aria-label="Show slide {{ $index + 1 }}"></button>
@endforeach
</div>
<div class="container h-100">
<div class="hero-content text-center animate-on-scroll animated fade-up-init">
<span class="hero-badge"><i class="fa-solid fa-award"></i> Accredited Automotive Engineering Institute</span>
@ -569,19 +730,19 @@ body {
<div class="hero-stats">
<div class="hero-stat-pill">
<i class="fa-solid fa-user-graduate"></i>
<div><strong>2.5k+</strong><span>Graduates</span></div>
<div><strong class="count-up" data-count-target="2.5" data-count-decimals="1" data-count-suffix="k+">0k+</strong><span>Graduates</span></div>
</div>
<div class="hero-stat-pill">
<i class="fa-solid fa-chalkboard-user"></i>
<div><strong>12+</strong><span>Expert Lecturers</span></div>
<div><strong class="count-up" data-count-target="12" data-count-suffix="+">0+</strong><span>Expert Lecturers</span></div>
</div>
<div class="hero-stat-pill">
<i class="fa-solid fa-briefcase"></i>
<div><strong>95%</strong><span>Placement Rate</span></div>
<div><strong class="count-up" data-count-target="95" data-count-suffix="%">0%</strong><span>Placement Rate</span></div>
</div>
<div class="hero-stat-pill">
<i class="fa-solid fa-award"></i>
<div><strong>15+</strong><span>Yrs Excellence</span></div>
<div><strong class="count-up" data-count-target="15" data-count-suffix="+">0+</strong><span>Yrs Excellence</span></div>
</div>
</div>
</div>
@ -644,7 +805,7 @@ body {
<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>
<span class="badge-floating"><i class="fa-solid fa-bolt"></i> {{ $course['badge'] }}</span>
<img src="{{ $course['image'] }}" alt="{{ $course['title'] }}" loading="lazy">
</div>
@ -663,12 +824,16 @@ body {
<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="star-rating" style="--rating: {{ $course['rating'] }};">
<span class="star-rating-bg">★★★★★</span>
<span class="star-rating-fill">★★★★★</span>
</span>
{{ $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>
<a href="/courses" class="read-btn">View Details <i class="fa-solid fa-arrow-right read-btn-arrow"></i></a>
</div>
</div>
</a>
@ -868,6 +1033,123 @@ body {
<script>
document.addEventListener('DOMContentLoaded', function () {
// 0. Hero Background Slideshow
const heroSlides = document.querySelectorAll('.hero-slide');
const heroDots = document.querySelectorAll('.hero-dot');
if (heroSlides.length > 1) {
let activeSlide = 0;
let slideTimer;
const goToSlide = (index) => {
heroSlides[activeSlide].classList.remove('active');
heroDots[activeSlide]?.classList.remove('active');
activeSlide = index;
heroSlides[activeSlide].classList.add('active');
heroDots[activeSlide]?.classList.add('active');
};
const startSlideTimer = () => {
clearInterval(slideTimer);
slideTimer = setInterval(() => {
goToSlide((activeSlide + 1) % heroSlides.length);
}, 5500);
};
heroDots.forEach(dot => {
dot.addEventListener('click', () => {
goToSlide(parseInt(dot.dataset.slideIndex, 10));
startSlideTimer();
});
});
startSlideTimer();
}
// 0b. Stat Counters (count up when scrolled into view)
const counters = document.querySelectorAll('.count-up');
if (counters.length) {
const animateCounter = (el) => {
const target = parseFloat(el.dataset.countTarget);
const decimals = parseInt(el.dataset.countDecimals || '0', 10);
const suffix = el.dataset.countSuffix || '';
const duration = 1600;
const startTime = performance.now();
const tick = (now) => {
const progress = Math.min((now - startTime) / duration, 1);
const eased = 1 - Math.pow(1 - progress, 3);
const value = target * eased;
el.textContent = value.toFixed(decimals) + suffix;
if (progress < 1) {
requestAnimationFrame(tick);
} else {
el.textContent = target.toFixed(decimals) + suffix;
}
};
requestAnimationFrame(tick);
};
const counterObserver = new IntersectionObserver((entries) => {
entries.forEach(entry => {
if (entry.isIntersecting) {
animateCounter(entry.target);
counterObserver.unobserve(entry.target);
}
});
}, { threshold: 0.4 });
counters.forEach(el => counterObserver.observe(el));
}
// 0c. Course Card 3D Tilt + Image Parallax
const canHover = window.matchMedia('(hover: hover) and (pointer: fine)').matches;
if (canHover) {
document.querySelectorAll('.course-card').forEach(card => {
const img = card.querySelector('.course-image-wrapper img');
card.addEventListener('mouseenter', () => {
card.style.transition = 'box-shadow 0.4s ease, border-color 0.4s ease';
if (img) img.style.transition = 'none';
});
card.addEventListener('mousemove', (e) => {
const rect = card.getBoundingClientRect();
const relX = (e.clientX - rect.left) / rect.width;
const relY = (e.clientY - rect.top) / rect.height;
const rotateY = (relX - 0.5) * 12;
const rotateX = (0.5 - relY) * 12;
card.style.transform = `translateY(-8px) scale(1.015) rotateX(${rotateX}deg) rotateY(${rotateY}deg)`;
if (img) {
img.style.transform = `scale(1.14) translate(${(relX - 0.5) * -14}px, ${(relY - 0.5) * -14}px)`;
}
});
card.addEventListener('mouseleave', () => {
card.style.transition = 'transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease, border-color 0.4s ease';
card.style.transform = '';
if (img) {
img.style.transition = 'transform 0.6s cubic-bezier(0.16, 1, 0.3, 1)';
img.style.transform = '';
}
});
});
}
// 0d. Animated Star Rating Fill
const starRatings = document.querySelectorAll('.star-rating');
if (starRatings.length) {
const starObserver = new IntersectionObserver((entries) => {
entries.forEach(entry => {
if (entry.isIntersecting) {
entry.target.classList.add('filled');
starObserver.unobserve(entry.target);
}
});
}, { threshold: 0.4 });
starRatings.forEach(el => starObserver.observe(el));
}
// 1. Scroll Animations
const animatedElements = document.querySelectorAll('.animate-on-scroll');
const observer = new IntersectionObserver((entries) => {