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

113 lines
7 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">
2018-05-30 02:42:40 +00:00
<div class="container">
2020-01-29 06:55:57 +00:00
<a class="navbar-brand d-flex align-items-center" href="{{ route('timeline.personal') }}" title="Logo">
2020-07-21 15:34:55 +00:00
<img src="/img/pixelfed-icon-color.svg" height="30px" class="px-2" loading="eager" alt="Pixelfed logo">
2020-01-29 06:55:57 +00:00
<span class="font-weight-bold mb-0 d-none d-sm-block" style="font-size:20px;">{{ config('app.name', 'pixelfed') }}</span>
</a>
2018-05-30 02:42:40 +00:00
2020-01-29 06:55:57 +00:00
<div class="collapse navbar-collapse">
@auth
2020-07-22 01:19:27 +00:00
<div class="navbar-nav d-none d-md-block mx-auto">
2020-01-29 06:55:57 +00:00
<form class="form-inline search-bar" method="get" action="/i/results">
2020-07-22 01:19:27 +00:00
<input class="form-control form-control-sm" name="q" placeholder="{{__('navmenu.search')}}" aria-label="search" autocomplete="off" required style="line-height: 0.6;width:200px" role="search">
2020-01-29 06:55:57 +00:00
</form>
2020-07-22 01:19:27 +00:00
</div>
2020-01-29 06:55:57 +00:00
@endauth
2018-05-30 02:42:40 +00:00
2020-01-29 06:55:57 +00:00
@guest
<ul class="navbar-nav ml-auto">
2019-08-30 01:15:58 +00:00
<li>
2021-01-31 05:15:54 +00:00
<a class="nav-link font-weight-bold text-dark" href="{{ route('login') }}" title="Login">
2020-01-29 06:55:57 +00:00
{{ __('Login') }}
2019-08-30 01:15:58 +00:00
</a>
</li>
2020-01-29 06:55:57 +00:00
@if(config('pixelfed.open_registration') && config('instance.restricted.enabled') == false)
2021-01-31 05:15:54 +00:00
<li>
<a class="ml-3 nav-link font-weight-bold text-dark" href="{{ route('register') }}" title="Register">
{{ __('Register') }}
</a>
</li>
2020-01-29 06:55:57 +00:00
@endif
@else
<div class="ml-auto">
2020-12-03 04:45:50 +00:00
<ul class="navbar-nav align-items-center">
2020-07-22 01:19:27 +00:00
<li class="nav-item px-md-2 d-none d-md-block">
2020-12-14 10:03:26 +00:00
<a class="nav-link font-weight-bold text-dark" href="/" title="Home" data-toggle="tooltip" data-placement="bottom">
<i class="fas fa-home fa-lg"></i>
<span class="sr-only">Home</span>
</a>
</li>
<li class="nav-item px-md-2 d-none d-md-block">
2021-01-24 21:03:55 +00:00
<div class="nav-link font-weight-bold text-dark cursor-pointer" title="Compose" data-toggle="tooltip" data-placement="bottom" onclick="App.util.compose.post()">
2020-12-14 10:03:26 +00:00
<i class="far fa-plus-square fa-lg"></i>
<span class="sr-only">Compose</span>
2021-01-24 21:03:55 +00:00
</div>
2020-07-22 01:19:27 +00:00
</li>
2020-11-18 21:19:02 +00:00
<li class="nav-item px-md-2">
2020-12-14 10:03:26 +00:00
<a class="nav-link font-weight-bold text-dark" href="/account/direct" title="Direct" data-toggle="tooltip" data-placement="bottom">
2020-11-18 21:19:02 +00:00
<i class="far fa-comment-dots fa-lg"></i>
<span class="sr-only">Direct</span>
</a>
</li>
2020-07-22 01:19:27 +00:00
<li class="nav-item px-md-2 d-none d-md-block">
2020-12-14 10:03:26 +00:00
<a class="nav-link font-weight-bold text-dark" href="/account/activity" title="Notifications" data-toggle="tooltip" data-placement="bottom">
2021-01-31 02:45:02 +00:00
<i class="far fa-bell fa-lg"></i>
2020-07-22 01:19:27 +00:00
<span class="sr-only">Notifications</span>
</a>
</li>
2020-01-29 06:55:57 +00:00
<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">
2020-12-14 10:03:26 +00:00
<i class="far fa-user fa-lg text-dark"></i>
2020-07-22 01:19:27 +00:00
<span class="sr-only">User Menu</span>
2020-12-03 04:45:50 +00:00
<img class="d-none" src="/storage/avatars/default.png?v=0" class="rounded-circle border shadow" width="34" height="34" onerror="this.onerror=null;this.src='/storage/avatars/default.png?v=0';">
</a>
2018-05-30 02:42:40 +00:00
2020-01-29 06:55:57 +00:00
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdown">
2020-12-14 10:03:26 +00:00
<a class="dropdown-item font-weight-bold" href="{{route('discover')}}">
<span class="far fa-compass pr-2 text-lighter"></span>
{{__('navmenu.discover')}}
</a>
2020-01-29 06:55:57 +00:00
<a class="dropdown-item font-weight-bold" href="{{route('timeline.public')}}">
<span class="fas fa-stream pr-2 text-lighter"></span>
Public
2020-01-29 06:55:57 +00:00
</a>
2020-07-21 15:34:55 +00:00
<a class="dropdown-item font-weight-bold" href="/i/stories/new">
<span class="fas fa-history text-lighter pr-2"></span>
Stories
</a>
2020-01-29 06:55:57 +00:00
<div class="dropdown-divider"></div>
<a class="dropdown-item font-weight-bold" href="/i/me">
<span class="far fa-user pr-2 text-lighter"></span>
{{__('navmenu.myProfile')}}
</a>
<a class="dropdown-item font-weight-bold" href="{{route('settings')}}">
<span class="fas fa-cog pr-2 text-lighter"></span>
{{__('navmenu.settings')}}
</a>
@if(Auth::user()->is_admin == true)
<a class="dropdown-item font-weight-bold" href="{{ route('admin.home') }}">
<span class="fas fa-shield-alt fa-sm pr-2 text-lighter"></span>
{{__('navmenu.admin')}}
</a>
@endif
<div class="dropdown-divider"></div>
<a class="dropdown-item font-weight-bold" href="{{ route('logout') }}"
onclick="event.preventDefault();
document.getElementById('logout-form').submit();">
<span class="fas fa-sign-out-alt pr-2"></span>
{{ __('navmenu.logout') }}
</a>
2018-05-30 02:42:40 +00:00
2020-01-29 06:55:57 +00:00
<form id="logout-form" action="{{ route('logout') }}" method="POST" style="display: none;">
@csrf
</form>
</div>
</li>
</div>
@endguest
</ul>
</div>
2018-05-30 02:42:40 +00:00
</div>
2020-01-29 06:55:57 +00:00
</nav>