490 lines
16 KiB
PHP
490 lines
16 KiB
PHP
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<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', '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: '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; */
|
|
z-index: 1000;
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
box-shadow: 0 4px 24px rgba(0,0,0,0.16);
|
|
border-bottom: 1px solid rgba(255,255,255,0.06);
|
|
height: 83px;
|
|
display: flex;
|
|
align-items: center;
|
|
backdrop-filter: blur(10px);
|
|
-webkit-backdrop-filter: blur(10px);
|
|
transition: box-shadow 0.3s ease;
|
|
}
|
|
|
|
.navbar .container {
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
.navbar-brand {
|
|
color: white;
|
|
font-weight: bold;
|
|
font-size: 22px;
|
|
letter-spacing: -0.01em;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
transition: opacity 0.2s ease;
|
|
}
|
|
|
|
.navbar-brand i {
|
|
color: #FFEA85;
|
|
background: rgba(255, 234, 133, 0.12);
|
|
width: 42px;
|
|
height: 42px;
|
|
border-radius: 12px;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 18px;
|
|
transition: transform 0.25s ease;
|
|
}
|
|
|
|
.navbar-brand:hover i {
|
|
transform: rotate(-8deg) scale(1.05);
|
|
}
|
|
|
|
.navbar-brand:hover {
|
|
color: #f4f4f8;
|
|
opacity: 0.9;
|
|
}
|
|
|
|
.navbar-toggler {
|
|
border: none;
|
|
box-shadow: none !important;
|
|
}
|
|
|
|
.navbar-nav {
|
|
align-items: center;
|
|
gap: 2px;
|
|
}
|
|
|
|
.nav-link {
|
|
color: rgba(255, 255, 255, 0.85) !important;
|
|
margin-left: 2px;
|
|
padding: 9px 16px !important;
|
|
border-radius: 999px;
|
|
transition: color 0.2s ease, background-color 0.2s ease;
|
|
font-weight: 600;
|
|
font-size: 15.5px;
|
|
position: relative;
|
|
}
|
|
|
|
.nav-link:hover,
|
|
.nav-link.active-page {
|
|
color: #FFEA85 !important;
|
|
background: rgba(255, 255, 255, 0.07);
|
|
font-weight: 600;
|
|
}
|
|
|
|
.navbar .btn-outline-light,
|
|
.navbar .btn-theme-register {
|
|
border-radius: 999px;
|
|
font-weight: 600;
|
|
padding: 8px 22px !important;
|
|
transition: transform 0.2s ease, box-shadow 0.2s ease;
|
|
}
|
|
|
|
.navbar .btn-outline-light:hover,
|
|
.navbar .btn-theme-register:hover {
|
|
transform: translateY(-2px);
|
|
}
|
|
|
|
.navbar .btn-theme-register {
|
|
box-shadow: 0 8px 20px rgba(130, 36, 36, 0.35);
|
|
}
|
|
|
|
.site-footer {
|
|
background:#1F2541;
|
|
/* background: #182EA4; */
|
|
color: #ffffff;
|
|
padding: 64px 0 30px;
|
|
border-top: 3px solid #FFEA85;
|
|
}
|
|
|
|
.site-footer h4 {
|
|
color: #FFEA85;
|
|
font-weight: 700;
|
|
margin-bottom: 20px;
|
|
letter-spacing: 0.02em;
|
|
font-size: 16px;
|
|
text-transform: uppercase;
|
|
}
|
|
|
|
.site-footer p {
|
|
color: #f1f3f9;
|
|
line-height: 1.7;
|
|
}
|
|
|
|
.footer-social {
|
|
display: flex;
|
|
gap: 10px;
|
|
margin-top: 22px;
|
|
}
|
|
|
|
.footer-social a {
|
|
width: 38px;
|
|
height: 38px;
|
|
border-radius: 50%;
|
|
background: rgba(255, 234, 133, 0.1);
|
|
color: #FFEA85;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 14px;
|
|
transition: transform 0.2s ease, background-color 0.2s ease;
|
|
}
|
|
|
|
.footer-social a:hover {
|
|
background: #FFEA85;
|
|
color: #1F2541;
|
|
transform: translateY(-3px);
|
|
}
|
|
|
|
.user-dropdown-toggle {
|
|
cursor: pointer;
|
|
color: white;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 2px;
|
|
user-select: none;
|
|
text-decoration: none !important;
|
|
line-height: 1.1;
|
|
}
|
|
|
|
.user-dropdown-toggle:hover {
|
|
color: #FFEA85;
|
|
}
|
|
|
|
.user-profile-name {
|
|
font-weight: 500;
|
|
font-style: italic;
|
|
font-size: 11px;
|
|
max-width: 110px;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
text-align: center;
|
|
}
|
|
|
|
.dropdown-menu {
|
|
border: none;
|
|
border-radius: 12px;
|
|
padding: 8px;
|
|
margin-top: 12px !important;
|
|
}
|
|
|
|
.dropdown-item {
|
|
border-radius: 8px;
|
|
padding: 8px 12px;
|
|
font-weight: 500;
|
|
transition: background-color 0.15s ease;
|
|
}
|
|
|
|
.dropdown-item:hover {
|
|
background-color: #F4F5FA;
|
|
}
|
|
|
|
.footer-links li {
|
|
margin-bottom: 10px;
|
|
}
|
|
|
|
.footer-links a {
|
|
color: #f1f3f9;
|
|
text-decoration: none;
|
|
transition: .2s;
|
|
}
|
|
|
|
.footer-links a:hover {
|
|
color: #FFEA85;
|
|
padding-left: 4px;
|
|
}
|
|
|
|
.footer-contact li {
|
|
margin-bottom: 14px;
|
|
color: #f1f3f9;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
}
|
|
|
|
.footer-contact i {
|
|
color: #FFEA85;
|
|
background: rgba(255, 234, 133, 0.12);
|
|
width: 34px;
|
|
height: 34px;
|
|
border-radius: 50%;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.footer-contact a {
|
|
color: #f1f3f9;
|
|
text-decoration: none;
|
|
}
|
|
|
|
.footer-contact a:hover {
|
|
color: #FFEA85;
|
|
}
|
|
|
|
.site-footer hr {
|
|
border-color: rgba(255,255,255,.2);
|
|
margin: 40px 0 20px;
|
|
}
|
|
|
|
.footer-bottom {
|
|
color: #e2e5f3;
|
|
font-size: 14px;
|
|
}
|
|
|
|
/* Custom Theme Overrides for Buttons */
|
|
.btn-theme-register {
|
|
background-color: #F73F52;
|
|
color: white;
|
|
border: none;
|
|
transition: background-color 0.2s;
|
|
}
|
|
|
|
.btn-theme-register:hover {
|
|
background-color: #df2c3e;
|
|
color: white;
|
|
}
|
|
|
|
.animate {
|
|
animation-duration: 0.2s;
|
|
animation-fill-mode: both;
|
|
}
|
|
|
|
@keyframes slideIn {
|
|
0% {
|
|
transform: translateY(1rem);
|
|
opacity: 0;
|
|
}
|
|
100% {
|
|
transform: translateY(0rem);
|
|
opacity: 1;
|
|
}
|
|
}
|
|
|
|
.slideIn {
|
|
animation-name: slideIn;
|
|
}
|
|
|
|
@media (min-width: 1400px) {
|
|
.container, .container-lg, .container-md, .container-sm, .container-xl, .container-xxl {
|
|
max-width: 1435px;
|
|
}
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
|
|
<nav class="navbar navbar-expand-lg navbar-dark">
|
|
<div class="container">
|
|
<a class="navbar-brand" href="/">
|
|
<i class="fa-solid fa-car-side"></i> AutoEdu
|
|
</a>
|
|
|
|
<button class="navbar-toggler"
|
|
type="button"
|
|
data-bs-toggle="collapse"
|
|
data-bs-target="#menu"
|
|
aria-controls="menu"
|
|
aria-expanded="false"
|
|
aria-label="Toggle navigation">
|
|
<span class="navbar-toggler-icon"></span>
|
|
</button>
|
|
|
|
<div class="collapse navbar-collapse" id="menu">
|
|
<ul class="navbar-nav ms-auto mb-2 mb-lg-0 align-items-lg-center">
|
|
<li class="nav-item">
|
|
<a class="nav-link {{ request()->is('/') ? 'active-page' : '' }}" href="/">Home</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link {{ request()->is('courses*') ? 'active-page' : '' }}" href="/courses">Courses</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link {{ request()->is('students*') ? 'active-page' : '' }}" href="/students">Student</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link {{ request()->is('abouts*') ? 'active-page' : '' }}" href="/abouts">About Us</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link {{ request()->is('contact*') ? 'active-page' : '' }}" href="/contact">Contact</a>
|
|
</li>
|
|
|
|
<li class="nav-item ms-lg-3 mt-3 mt-lg-0">
|
|
@if(Auth::check())
|
|
@php
|
|
$displayName = Auth::user()->first_name . ' ' . Auth::user()->last_name;
|
|
@endphp
|
|
<div class="dropdown">
|
|
<a class="user-dropdown-toggle text-white"
|
|
href="#"
|
|
role="button"
|
|
id="userMenu"
|
|
data-bs-toggle="dropdown"
|
|
aria-expanded="false">
|
|
<i class="fa-solid fa-circle-user" style="font-size: 24px;"></i>
|
|
<span class="user-profile-name">{{ $displayName }}</span>
|
|
</a>
|
|
|
|
|
|
<ul class="dropdown-menu dropdown-menu-md-end shadow animate slideIn" aria-labelledby="userMenu">
|
|
<li>
|
|
<a class="dropdown-item" href="{{ route('profile.view') }}">
|
|
<i class="fa-solid fa-user"></i> Profile
|
|
</a>
|
|
</li>
|
|
<li><hr class="dropdown-divider"></li>
|
|
<li>
|
|
<button type="button" onclick="submitLogout()" class="dropdown-item text-danger w-100 text-start border-0 bg-transparent">
|
|
<i class="fa-solid fa-right-from-bracket me-2"></i> Logout
|
|
</button>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
@else
|
|
<div class="d-flex gap-2">
|
|
<a href="/signin" class="btn btn-outline-light btn-sm px-3">Sign In</a>
|
|
<!-- Swapped btn-warning for our new custom primary brand color button -->
|
|
<a href="/signup" class="btn btn-theme-register btn-sm px-3" style="background: #822424;border: 2px solid #FFF;">Register</a>
|
|
</div>
|
|
@endif
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
|
|
<main>
|
|
@yield('content')
|
|
</main>
|
|
|
|
<footer class="site-footer" role="contentinfo">
|
|
<div class="container">
|
|
<div class="row g-4">
|
|
<div class="col-md-4">
|
|
<h4>Automobile Academic</h4>
|
|
<p>Providing excellence in Automotive Engineering Education, Innovation and Research.</p>
|
|
<div class="footer-social">
|
|
<a href="#" aria-label="Facebook"><i class="fa-brands fa-facebook-f"></i></a>
|
|
<a href="#" aria-label="Instagram"><i class="fa-brands fa-instagram"></i></a>
|
|
<a href="#" aria-label="LinkedIn"><i class="fa-brands fa-linkedin-in"></i></a>
|
|
<a href="#" aria-label="YouTube"><i class="fa-brands fa-youtube"></i></a>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-md-4">
|
|
<h4>Quick Links</h4>
|
|
<nav aria-label="Footer quick links">
|
|
<ul class="list-unstyled footer-links">
|
|
<li><a href="/">Home</a></li>
|
|
<li><a href="/courses">Courses</a></li>
|
|
<li><a href="/students">Students</a></li>
|
|
<li><a href="/abouts">About Us</a></li>
|
|
<li><a href="/contact">Contact</a></li>
|
|
</ul>
|
|
</nav>
|
|
</div>
|
|
|
|
<div class="col-md-4">
|
|
<h4>Contact</h4>
|
|
<ul class="list-unstyled footer-contact">
|
|
<li>
|
|
<i class="fa-solid fa-location-dot" aria-hidden="true"></i>
|
|
<span>Automobile Engineering Campus</span>
|
|
</li>
|
|
<li>
|
|
<i class="fa-solid fa-envelope" aria-hidden="true"></i>
|
|
<a href="mailto:info@autoedu.edu">info@autoedu.edu</a>
|
|
</li>
|
|
<li>
|
|
<i class="fa-solid fa-phone" aria-hidden="true"></i>
|
|
<a href="tel:+94112345678">+94 11 2345678</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
<hr>
|
|
|
|
<div class="text-center footer-bottom">
|
|
© {{ now()->year }} Automobile Academic Website
|
|
</div>
|
|
</div>
|
|
</footer>
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
|
|
|
|
<script>
|
|
function submitLogout() {
|
|
const tokenEl = document.querySelector('meta[name="csrf-token"]');
|
|
|
|
fetch('/custom-logout', {
|
|
method: 'POST',
|
|
headers: {
|
|
'Content-Type': 'application/json',
|
|
'Accept': 'application/json',
|
|
'X-CSRF-TOKEN': tokenEl ? tokenEl.getAttribute('content') : ''
|
|
}
|
|
})
|
|
.then(res => {
|
|
if (!res.ok) {
|
|
return res.text().then(text => { throw new Error(text) });
|
|
}
|
|
return res.json();
|
|
})
|
|
.then(data => {
|
|
if (data.success) {
|
|
alert('Logged out successfully!');
|
|
window.location.href = '/';
|
|
} else {
|
|
alert('Logout failed. Please try again.');
|
|
}
|
|
})
|
|
.catch(err => {
|
|
console.error('Error:', err);
|
|
alert('Server side error occurred during logout.');
|
|
});
|
|
}
|
|
</script>
|
|
</body>
|
|
</html> |