Files
hatame.andarza09/resources/views/layouts/header.blade.php
T

341 lines
4.9 KiB
PHP

<style>
.main-header {
background: #09203f;
box-shadow: 0 8px 30px rgba(0,0,0,.2);
padding: 15px 0;
}
.header-inner {
display:flex;
align-items:center;
justify-content:space-between;
}
.logo {
color:white;
font-size:28px;
font-weight:800;
text-decoration:none;
}
.menu {
display:flex;
gap:30px;
list-style:none;
margin:0;
padding:0;
}
.menu li a {
color:white;
text-decoration:none;
font-weight:600;
transition:.3s;
}
.menu li a:hover {
color:#ffc107;
}
.header-actions {
display:flex;
gap:10px;
}
.login-btn {
color:white;
border:1px solid white;
padding:10px 20px;
border-radius:30px;
text-decoration:none;
}
.register-btn {
background:#ffc107;
color:#09203f;
padding:10px 20px;
border-radius:30px;
text-decoration:none;
font-weight:700;
}
.user-btn {
color:white;
text-decoration:none;
}
.user-dropdown {
position: relative;
}
.user-btn {
background: transparent;
border: none;
color: white;
font-size: 15px;
cursor: pointer;
padding: 10px 15px;
}
.user-menu {
position: absolute;
top: 45px;
right: 0;
width: 200px;
background: white;
border-radius: 15px;
padding: 10px 0;
box-shadow: 0 15px 40px rgba(0,0,0,.15);
opacity: 0;
visibility: hidden;
transform: translateY(10px);
transition: .3s;
}
.user-dropdown:hover .user-menu {
opacity: 1;
visibility: visible;
transform: translateY(0);
}
.user-menu a,
.user-menu button {
display: flex;
align-items: center;
gap: 10px;
width: 100%;
padding: 12px 20px;
color: #263238;
background: none;
border: none;
text-decoration: none;
font-size: 14px;
cursor: pointer;
}
.user-menu a:hover,
.user-menu button:hover {
background: #f1f5f9;
color: #1976d2;
}
</style>
<nav class="main-header">
<div class="container header-inner">
<a href="/" class="logo">
✈️ Travelio
</a>
<ul class="menu">
<li>
<a href="/">
خانه
</a>
</li>
<li>
<a href="{{ route('flights') }}">
پروازها
</a>
</li>
<li>
<a href="{{ route('tours.index') }}">
تورها
</a>
</li>
<li>
<a href="#">
درباره ما
</a>
</li>
</ul>
<div class="header-actions">
@guest
<a href="{{route('auth.login.index')}}" class="login-btn">
ورود
</a>
<a href="{{route('auth.register.index')}}" class="register-btn">
ثبت نام
</a>
@endguest
@auth
<div class="user-dropdown">
<button class="user-btn">
<i class="fa fa-user"></i>
{{ Auth::user()->first_name }}
<span>⌄</span>
</button>
<div class="user-menu">
<a href="{{ route('users.profile.edit') }}">
<i class="fa fa-user"></i>
پروفایل
</a>
<a href="{{ route('users.favorite.index') }}">
<i class="fa fa-heart"></i>
علاقه‌مندی‌ها
</a>
<a href="{{ route('users.comments.index') }}">
<i class="fa fa-comments"></i>
نظرات قبلی
</a>
<a href="{{route('users.reservations.index')}}">
رزرو من
</a>
<form action="{{ route('auth.logout.index') }}" method="POST">
@csrf
<button type="submit">
<i class="fa fa-sign-out"></i>
خروج
</button>
</form>
</div>
</div>
@endauth
</div>
</div>
</nav>