A11y:
- Skip-to-content link lands first in the body and jumps to #main
past the header + sidebar for keyboard users.
- aria-label on the icon buttons that previously carried only an
icon: hamburger menu (+ aria-controls="sidebar"), mobile search
toggle, account menu (also drops the duplicate alt on the avatar
since the button name already speaks the user's name).
Admin:
- Dashboard stat card renamed "Live Videos" → "Ready" (matches the
DB status column; nothing on this card is actually live).
Settings:
- Duplicate "Prefer not to say" option on the Gender select — the
empty placeholder shared the same label as the real option.
Placeholder is now "Select…"; the real "Prefer not to say" option
stays unchanged.
- Birthday picker caps the Year dropdown at (this year − 13) and
the server-side register validation requires the same, so a
client bypass can't let a <13 user through.
Titles:
- Admin layout uses "{Page} | TAKEONE" to match the frontend format
(was "{Page} — TAKEONE"). User pages that said "| TAKEONE" literal
now interpolate config('app.name'). Shorts and Welcome moved from
" - " to " | " separator.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
109 lines
5.6 KiB
PHP
109 lines
5.6 KiB
PHP
<!-- Header -->
|
|
<header class="yt-header">
|
|
<div class="yt-header-left">
|
|
<button class="yt-menu-btn" onclick="toggleSidebar()" aria-label="Toggle sidebar menu" aria-controls="sidebar">
|
|
<i class="bi bi-list fs-5" aria-hidden="true"></i>
|
|
</button>
|
|
<a href="{{ route('home') }}" class="yt-logo">
|
|
{{-- Two responsive logos. The visible one at a given viewport
|
|
carries the app name; its sibling is display:none and gets
|
|
alt="" so a screen reader doesn't announce "Play Play". --}}
|
|
<img src="{{ asset('storage/images/logo.png') }}" alt="{{ config('app.name') }}" class="d-md-none" style="height:30px;">
|
|
<img src="{{ asset('storage/images/fullLogo.png') }}" alt="" class="d-none d-md-block" style="height:30px;">
|
|
</a>
|
|
</div>
|
|
|
|
<div class="yt-header-center d-none d-md-flex">
|
|
<div class="yt-search">
|
|
<form action="{{ route('search') }}" method="GET" class="yt-search-form" role="search">
|
|
<label for="header-search-input" class="visually-hidden">Search</label>
|
|
<input type="search" id="header-search-input" name="q" class="yt-search-input" placeholder="Search" value="{{ request('q') }}" aria-label="Search videos, channels and playlists">
|
|
<button type="submit" class="yt-search-btn" aria-label="Submit search"><i class="bi bi-search" aria-hidden="true"></i></button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="yt-header-right">
|
|
<!-- Mobile search -->
|
|
<button type="button" class="yt-icon-btn d-md-none" onclick="toggleMobileSearch()" aria-label="Open search">
|
|
<i class="bi bi-search" aria-hidden="true"></i>
|
|
</button>
|
|
|
|
@auth
|
|
<!-- Create / Upload -->
|
|
<button type="button" class="yt-upload-btn d-none d-md-flex"
|
|
onclick="openUploadChooser()">
|
|
<i class="bi bi-camera-video-fill"></i>
|
|
<span>Create</span>
|
|
</button>
|
|
|
|
<!-- Notifications -->
|
|
<div class="yt-notif-wrap" id="notifWrap">
|
|
<button type="button" class="yt-icon-btn" id="notifBtn"
|
|
onclick="toggleNotifPanel()" title="Notifications" aria-expanded="false">
|
|
<i class="bi bi-bell-fill"></i>
|
|
<span class="yt-notif-badge" id="notifBadge" style="display:none;"></span>
|
|
</button>
|
|
|
|
<div class="yt-notif-panel" id="notifPanel" style="display:none;" role="menu">
|
|
<div class="yt-notif-header">
|
|
<span class="yt-notif-title">Notifications</span>
|
|
<button type="button" class="yt-notif-mark-all" id="notifMarkAll"
|
|
onclick="markAllRead()" style="display:none;">Mark all read</button>
|
|
</div>
|
|
<div class="yt-notif-list" id="notifList">
|
|
<div class="yt-notif-empty" id="notifInitialState">No notifications</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- User dropdown -->
|
|
<div class="yt-user-dropdown" id="headerUserDropdown">
|
|
<button class="yt-icon-btn" id="headerUserBtn"
|
|
onclick="toggleHeaderDropdown()" aria-expanded="false" aria-haspopup="true"
|
|
aria-label="Account menu for {{ Auth::user()->name }}">
|
|
<img src="{{ Auth::user()->avatar_url }}"
|
|
class="yt-user-avatar" alt="">
|
|
</button>
|
|
|
|
<div class="yt-user-panel" id="headerUserPanel" role="menu">
|
|
<div class="yt-panel-info">
|
|
<img src="{{ Auth::user()->avatar_url }}" alt="{{ Auth::user()->name }}">
|
|
<div style="min-width:0;">
|
|
<div class="yt-panel-name">{{ Auth::user()->name }}</div>
|
|
<div class="yt-panel-email">{{ Auth::user()->email }}</div>
|
|
</div>
|
|
</div>
|
|
<div class="yt-panel-links">
|
|
@if(Auth::user()->isSuperAdmin())
|
|
<a href="{{ route('admin.dashboard') }}" class="yt-drop-item">
|
|
<i class="bi bi-speedometer2"></i> Admin Dashboard
|
|
</a>
|
|
<div class="yt-panel-divider"></div>
|
|
@endif
|
|
<a href="{{ route('channel', Auth::user()->channel) }}" class="yt-drop-item">
|
|
<i class="bi bi-person-video3"></i> My Channel
|
|
</a>
|
|
<a href="{{ route('channel', Auth::user()->channel) }}#settings" class="yt-drop-item">
|
|
<i class="bi bi-gear"></i> Settings
|
|
</a>
|
|
<div class="yt-panel-divider"></div>
|
|
<form method="POST" action="{{ route('logout') }}" style="margin:0;">
|
|
@csrf
|
|
<button type="submit" class="yt-drop-item danger">
|
|
<i class="bi bi-box-arrow-right"></i> Sign Out
|
|
</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
@else
|
|
<a href="{{ route('login') }}" class="yt-upload-btn">
|
|
<i class="bi bi-box-arrow-in-right"></i>
|
|
<span>Sign In</span>
|
|
</a>
|
|
@endauth
|
|
</div>
|
|
</header>
|