351 lines
11 KiB
PHP
351 lines
11 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', 'Automobile Academic')</title>
|
|
|
|
<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">
|
|
|
|
<style>
|
|
body {
|
|
font-family: 'Segoe UI', sans-serif;
|
|
background: #F6F6F6;
|
|
padding-top: 56px;
|
|
}
|
|
|
|
.navbar {
|
|
background:#2D355B;
|
|
/* background: #3E51B8; */
|
|
z-index: 1000;
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
|
|
height: 83px;
|
|
}
|
|
|
|
.navbar-brand {
|
|
color: white;
|
|
font-weight: bold;
|
|
font-size: 24px;
|
|
}
|
|
|
|
.navbar-brand:hover {
|
|
color: #f4f4f8;
|
|
}
|
|
|
|
.nav-link {
|
|
color: rgba(255, 255, 255, 0.9) !important;
|
|
margin-left: 20px;
|
|
transition: 0.2s ease;
|
|
font-weight: bold;
|
|
font-size: 18px;
|
|
}
|
|
|
|
.nav-link:hover,
|
|
.nav-link.active-page {
|
|
color: #FFEA85 !important;
|
|
/* color: #FF4040FC !important; */
|
|
font-weight: bold;
|
|
}
|
|
|
|
.site-footer {
|
|
background:#1F2541;
|
|
/* background: #182EA4; */
|
|
color: #ffffff;
|
|
padding: 60px 0 30px;
|
|
}
|
|
|
|
.site-footer h4 {
|
|
color: #FFEA85;
|
|
font-weight: 700;
|
|
margin-bottom: 18px;
|
|
}
|
|
|
|
.site-footer p {
|
|
color: #f1f3f9;
|
|
line-height: 1.6;
|
|
}
|
|
|
|
.user-dropdown-toggle {
|
|
cursor: pointer;
|
|
color: white;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
user-select: none;
|
|
text-decoration: none !important;
|
|
}
|
|
|
|
.user-dropdown-toggle:hover {
|
|
color: #FFEA85;
|
|
}
|
|
|
|
.user-profile-name {
|
|
font-weight: 600;
|
|
font-size: 14px;
|
|
max-width: 120px;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.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: flex-start;
|
|
gap: 10px;
|
|
}
|
|
|
|
.footer-contact i {
|
|
color: #FFEA85;
|
|
margin-top: 3px;
|
|
}
|
|
|
|
.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" style="padding-left:214px;">
|
|
<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" style="padding-left:325px;">
|
|
<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" style="padding-left:214px;">
|
|
<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>
|
|
|
|
<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> |