pixelfed/resources/views/layouts/partial/nav.blade.php

157 lines
6.8 KiB
PHP
Raw Normal View History

2020-01-29 06:55:57 +00:00
<nav class="navbar navbar-expand navbar-light navbar-laravel shadow-none border-bottom sticky-top py-1">
2021-07-21 03:52:49 +00:00
<div class="container">
<a class="navbar-brand d-flex align-items-center" href="{{ route('timeline.personal') }}" title="Logo">
<img src="/img/pixelfed-icon-color.svg" height="30px" class="px-2" loading="eager" alt="Pixelfed logo">
<span class="font-weight-bold mb-0 d-none d-sm-block" style="font-size:20px;">{{ config_cache('app.name') }}</span>
</a>
2018-05-30 02:42:40 +00:00
2021-07-21 03:52:49 +00:00
<div class="collapse navbar-collapse">
@auth
<div class="navbar-nav d-none d-md-block mx-auto">
<form class="form-inline search-bar" method="get" action="/i/results">
2021-08-31 07:09:09 +00:00
<input class="form-control form-control-sm rounded-pill bg-light" name="q" placeholder="{{__('navmenu.search')}}" aria-label="search" autocomplete="off" required style="line-height: 0.6;width:200px" role="search">
2021-07-21 03:52:49 +00:00
</form>
</div>
@endauth
2018-05-30 02:42:40 +00:00
2021-07-21 03:52:49 +00:00
@guest
2021-04-07 03:17:42 +00:00
2021-07-21 03:52:49 +00:00
<ul class="navbar-nav ml-auto">
<li>
<a class="nav-link font-weight-bold text-dark" href="{{ route('login') }}" title="Login">
{{ __('Login') }}
</a>
</li>
@if(config_cache('pixelfed.open_registration') && in_array(config_cache('system.user_mode'), ['default', 'admin']))
<li>
<a class="ml-3 nav-link font-weight-bold text-dark" href="{{ route('register') }}" title="Register">
{{ __('Register') }}
</a>
</li>
@endif
@else
<div class="ml-auto">
<ul class="navbar-nav align-items-center">
<li class="nav-item px-md-2 d-none d-md-block">
<a class="nav-link font-weight-bold text-dark" href="/" title="Home" data-toggle="tooltip" data-placement="bottom">
2021-08-31 07:09:09 +00:00
<i class="fal fa-home fa-lg" style="font-size: 22px;"></i>
2021-07-21 03:52:49 +00:00
<span class="sr-only">Home</span>
</a>
</li>
<li class="nav-item px-md-2">
<a class="nav-link font-weight-bold text-dark" href="/account/direct" title="Direct" data-toggle="tooltip" data-placement="bottom">
2021-08-31 07:09:09 +00:00
<i class="fal fa-location-circle fa-lg" style="font-size: 22px;"></i>
2021-07-21 03:52:49 +00:00
<span class="sr-only">Direct</span>
</a>
</li>
<li class="nav-item px-md-2 d-none d-md-block">
<a class="nav-link font-weight-bold text-dark" href="/account/activity" title="Notifications" data-toggle="tooltip" data-placement="bottom">
2021-08-31 07:09:09 +00:00
<i class="fal fa-bell fa-lg" style="font-size: 22px;"></i>
2021-07-21 03:52:49 +00:00
<span class="sr-only">Notifications</span>
</a>
</li>
<li class="nav-item px-md-2 d-none d-md-block">
2021-08-31 07:09:09 +00:00
<div class="nav-link btn btn-primary lead btn-sm px-3 py-1 text-white shadow rounded-pill d-flex align-items-center" title="Compose" data-toggle="tooltip" data-placement="bottom" onclick="App.util.compose.post()">
<i class="fal fa-plus-circle" style="font-size:14px;margin-right:6px;"></i>
New
2021-07-21 03:52:49 +00:00
</div>
</li>
<li class="nav-item dropdown ml-2">
<a id="navbarDropdown" class="nav-link dropdown-toggle" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" title="User Menu" data-toggle="tooltip" data-placement="bottom">
<i class="far fa-user fa-lg text-dark"></i>
<span class="sr-only">User Menu</span>
2021-08-31 07:09:09 +00:00
<img class="d-none" src="/storage/avatars/default.png?v=0" class="rounded-circle border shadow" width="38" height="38" onerror="this.onerror=null;this.src='/storage/avatars/default.png?v=0';">
2021-07-21 03:52:49 +00:00
</a>
2018-05-30 02:42:40 +00:00
2021-09-04 04:20:55 +00:00
<div class="dropdown-menu dropdown-menu-right px-0 shadow" aria-labelledby="navbarDropdown" style="min-width: 220px;">
2021-07-21 03:52:49 +00:00
@if(config('federation.network_timeline'))
2021-10-22 01:04:46 +00:00
<a class="dropdown-item lead" href="/">
2021-08-31 07:09:09 +00:00
<span style="width: 50px;margin-right:14px;">
<span class="fal fa-home text-lighter fa-lg"></span>
</span>
My Feed
2021-07-21 03:52:49 +00:00
</a>
2021-08-31 07:09:09 +00:00
<a class="dropdown-item lead" href="{{route('timeline.public')}}">
<span style="width: 50px;margin-right:14px;">
<span class="fal fa-stream text-lighter fa-lg"></span>
</span>
Public Feed
</a>
<a class="dropdown-item lead" href="{{route('timeline.network')}}">
<span style="width: 50px;margin-right:14px;">
<span class="fal fa-globe text-lighter fa-lg"></span>
</span>
Network Feed
2021-07-21 03:52:49 +00:00
</a>
@else
2021-08-31 07:09:09 +00:00
<a class="dropdown-item lead" href="/">
<span style="width: 50px;margin-right:14px;">
<span class="fal fa-home text-lighter fa-lg"></span>
</span>
2021-07-21 03:52:49 +00:00
Home
</a>
2021-08-31 07:09:09 +00:00
<a class="dropdown-item lead" href="{{route('timeline.public')}}">
<span style="width: 50px;margin-right:14px;">
<span class="fas fa-stream text-lighter fa-lg"></span>
</span>
2021-07-21 03:52:49 +00:00
Public
</a>
@endif
<div class="dropdown-divider"></div>
2021-09-04 04:20:55 +00:00
<a class="dropdown-item lead" href="{{route('discover')}}">
<span style="width: 50px;margin-right:14px;">
<span class="fal fa-compass text-lighter fa-lg"></span>
</span>
{{__('navmenu.discover')}}
</a>
@if(config_cache('instance.stories.enabled'))
<a class="dropdown-item lead" href="/i/stories/new">
<span style="width: 50px;margin-right:14px;">
<span class="fal fa-history text-lighter fa-lg"></span>
</span>
Stories
</a>
@endif
<div class="dropdown-divider"></div>
2021-08-31 07:09:09 +00:00
<a class="dropdown-item lead" href="/i/me">
<span style="width: 50px;margin-right:14px;">
<span class="fal fa-user text-lighter fa-lg"></span>
</span>
2021-07-21 03:52:49 +00:00
{{__('navmenu.myProfile')}}
</a>
2021-08-31 07:09:09 +00:00
<a class="dropdown-item lead" href="{{route('settings')}}">
<span style="width: 50px;margin-right:14px;">
<span class="fal fa-cog text-lighter fa-lg"></span>
</span>
2021-07-21 03:52:49 +00:00
{{__('navmenu.settings')}}
</a>
@if(Auth::user()->is_admin == true)
2021-08-31 07:09:09 +00:00
<a class="dropdown-item lead" href="{{ route('admin.home') }}">
<span style="width: 50px;margin-right:14px;">
<span class="fal fa-shield-alt text-lighter fa-lg"></span>
</span>
2021-07-21 03:52:49 +00:00
{{__('navmenu.admin')}}
</a>
@endif
<div class="dropdown-divider"></div>
2021-08-31 07:09:09 +00:00
<a class="dropdown-item lead" href="{{ route('logout') }}"
2021-07-21 03:52:49 +00:00
onclick="event.preventDefault();
document.getElementById('logout-form').submit();">
2021-09-04 04:20:55 +00:00
<span style="width: 50px;margin-right:14px;" class="text-lighter">
2021-08-31 07:09:09 +00:00
<span class="fal fa-sign-out-alt fa-lg"></span>
</span>
2021-09-04 04:20:55 +00:00
<span class="text-lighter">{{ __('navmenu.logout') }}</span>
2021-07-21 03:52:49 +00:00
</a>
2018-05-30 02:42:40 +00:00
2021-07-21 03:52:49 +00:00
<form id="logout-form" action="{{ route('logout') }}" method="POST" style="display: none;">
@csrf
</form>
</div>
</li>
</div>
@endguest
</ul>
</div>
</div>
2020-01-29 06:55:57 +00:00
</nav>