258 lines
8.1 KiB
PHP
258 lines
8.1 KiB
PHP
<!-- Header -->
|
|
<header class="yt-header">
|
|
<style>
|
|
.yt-header {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
height: 56px;
|
|
background: #0f0f0f;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 0 16px;
|
|
z-index: 1000;
|
|
border-bottom: 1px solid #303030;
|
|
}
|
|
|
|
.yt-header-left {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 16px;
|
|
}
|
|
|
|
.yt-menu-btn {
|
|
width: 40px;
|
|
height: 40px;
|
|
border-radius: 50%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
cursor: pointer;
|
|
transition: background 0.2s;
|
|
background: transparent;
|
|
border: none;
|
|
color: #f1f1f1;
|
|
}
|
|
|
|
.yt-menu-btn:hover { background: #303030; }
|
|
|
|
.yt-logo {
|
|
display: flex;
|
|
align-items: center;
|
|
text-decoration: none;
|
|
gap: 4px;
|
|
}
|
|
|
|
.yt-logo-text {
|
|
font-size: 1.4rem;
|
|
font-weight: 700;
|
|
color: #f1f1f1;
|
|
letter-spacing: -1px;
|
|
}
|
|
|
|
.yt-header-center {
|
|
flex: 1;
|
|
max-width: 640px;
|
|
margin: 0 40px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.yt-search {
|
|
flex: 1;
|
|
display: flex;
|
|
height: 40px;
|
|
}
|
|
|
|
.yt-search-input {
|
|
flex: 1;
|
|
background: #121212;
|
|
border: 1px solid #303030;
|
|
border-right: none;
|
|
border-radius: 20px 0 0 20px;
|
|
padding: 0 16px;
|
|
color: #f1f1f1;
|
|
font-size: 16px;
|
|
}
|
|
|
|
.yt-search-input:focus {
|
|
outline: none;
|
|
border-color: #1c62b9;
|
|
}
|
|
|
|
.yt-search-btn {
|
|
width: 64px;
|
|
background: #222;
|
|
border: 1px solid #303030;
|
|
border-radius: 0 20px 20px 0;
|
|
color: #f1f1f1;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.yt-search-btn:hover { background: #303030; }
|
|
|
|
.yt-header-right {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
}
|
|
|
|
.yt-mobile-search-toggle {
|
|
width: 40px;
|
|
height: 40px;
|
|
border-radius: 50%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
cursor: pointer;
|
|
background: transparent;
|
|
border: none;
|
|
color: #f1f1f1;
|
|
font-size: 1.2rem;
|
|
}
|
|
|
|
.yt-mobile-search-toggle:hover {
|
|
background: #303030;
|
|
}
|
|
|
|
.yt-upload-btn {
|
|
background: #e61e1e;
|
|
color: white;
|
|
border: none;
|
|
padding: 8px 16px;
|
|
border-radius: 20px;
|
|
font-weight: 500;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
cursor: pointer;
|
|
text-decoration: none;
|
|
}
|
|
|
|
.yt-upload-btn:hover { background: #cc1a1a; }
|
|
|
|
.yt-icon-btn {
|
|
width: 40px;
|
|
height: 40px;
|
|
border-radius: 50%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
cursor: pointer;
|
|
background: transparent;
|
|
border: none;
|
|
color: #f1f1f1;
|
|
font-size: 1.2rem;
|
|
}
|
|
|
|
.yt-icon-btn:hover { background: #303030; }
|
|
|
|
.yt-user-avatar {
|
|
width: 32px;
|
|
height: 32px;
|
|
border-radius: 50%;
|
|
background: #555;
|
|
cursor: pointer;
|
|
}
|
|
|
|
@media (max-width: 576px) {
|
|
.yt-upload-btn {
|
|
width: 40px;
|
|
height: 40px;
|
|
padding: 0;
|
|
border-radius: 50%;
|
|
justify-content: center;
|
|
}
|
|
.yt-upload-btn span {
|
|
display: none;
|
|
}
|
|
@media (min-width: 400px) {
|
|
.yt-upload-btn {
|
|
width: auto;
|
|
border-radius: 20px;
|
|
padding: 8px 16px;
|
|
}
|
|
.yt-upload-btn span {
|
|
display: inline;
|
|
}
|
|
}
|
|
}
|
|
|
|
@media (max-width: 768px) {
|
|
.yt-header-center { display: none; }
|
|
}
|
|
</style>
|
|
|
|
<div class="yt-header-left">
|
|
<button class="yt-menu-btn" onclick="toggleSidebar()">
|
|
<i class="bi bi-list fs-5"></i>
|
|
</button>
|
|
<a href="{{ route('home') }}" class="yt-logo">
|
|
<!-- Mobile logo (visible only on mobile) -->
|
|
<img src="{{ asset('storage/images/logo.png') }}" alt="{{ config('app.name') }}" class="d-md-none" style="height: 30px;">
|
|
<!-- Desktop logo (visible only on desktop) -->
|
|
<img src="{{ asset('storage/images/fullLogo.png') }}" alt="{{ config('app.name') }}" class="d-none d-md-block" style="height: 30px;">
|
|
</a>
|
|
</div>
|
|
|
|
<div class="yt-header-center d-none d-md-flex">
|
|
<form action="{{ route('videos.search') }}" method="GET" class="yt-search">
|
|
<input type="text" name="q" class="yt-search-input" placeholder="Search" value="{{ request('q') }}">
|
|
<button type="submit" class="yt-search-btn">
|
|
<i class="bi bi-search"></i>
|
|
</button>
|
|
</form>
|
|
</div>
|
|
|
|
<div class="yt-header-right">
|
|
<!-- Mobile Search Toggle Button -->
|
|
<button type="button" class="yt-mobile-search-toggle d-md-none" onclick="toggleMobileSearch()">
|
|
<i class="bi bi-search"></i>
|
|
</button>
|
|
|
|
@auth
|
|
<!-- Upload Button - Opens Modal -->
|
|
<button type="button" class="yt-upload-btn d-none d-md-flex" data-bs-toggle="modal" data-bs-target="#uploadModal">
|
|
<i class="bi bi-plus-lg"></i>
|
|
<span>Upload</span>
|
|
</button>
|
|
|
|
<!-- User Dropdown -->
|
|
<div class="dropdown">
|
|
<button class="yt-icon-btn" data-bs-toggle="dropdown" aria-expanded="false">
|
|
@if(Auth::user()->avatar)
|
|
<img src="{{ asset('storage/avatars/' . Auth::user()->avatar) }}" class="yt-user-avatar" alt="User">
|
|
@else
|
|
<img src="https://i.pravatar.cc/150?u={{ Auth::user()->id }}" class="yt-user-avatar" alt="User">
|
|
@endif
|
|
</button>
|
|
<ul class="dropdown-menu dropdown-menu-end dropdown-menu-dark">
|
|
@if(Auth::user()->isSuperAdmin())
|
|
<li><a class="dropdown-item" href="{{ route('admin.dashboard') }}"><i class="bi bi-speedometer2"></i> Admin Dashboard</a></li>
|
|
<li><hr class="dropdown-divider"></li>
|
|
@endif
|
|
<li><a class="dropdown-item" href="{{ route('profile') }}"><i class="bi bi-person"></i> Profile</a></li>
|
|
<li><a class="dropdown-item" href="{{ route('channel', Auth::user()->id) }}"><i class="bi bi-play-btn"></i> My Channel</a></li>
|
|
<li><a class="dropdown-item" href="{{ route('settings') }}"><i class="bi bi-gear"></i> Settings</a></li>
|
|
<li><hr class="dropdown-divider"></li>
|
|
<li>
|
|
<form method="POST" action="{{ route('logout') }}" class="m-0">
|
|
@csrf
|
|
<button type="submit" class="dropdown-item text-danger"><i class="bi bi-box-arrow-right"></i> Logout</button>
|
|
</form>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
@else
|
|
<!-- Login/Register for visitors -->
|
|
<a href="{{ route('login') }}" class="yt-upload-btn">
|
|
<i class="bi bi-box-arrow-in-right"></i>
|
|
<span>Login</span>
|
|
</a>
|
|
@endauth
|
|
</div>
|
|
</header>
|