Self-hosted PHP photo gallery - your photos, your website, your property! Built on Laravel and Bootstrap 4, Blue Twilight is a private alternative to Flickr and Instagram. https://showmy.photos
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

95 lines
5.4 KiB

  1. <nav class="navbar navbar-expand-lg navbar-dark">
  2. <a class="navbar-brand" href="{{ route('home') }}"><i class="fa fa-fw fa-photo"></i> {{ UserConfig::get('app_name') }}</a>
  3. <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbar-content" aria-controls="navbar-content" aria-expanded="false" aria-label="Toggle navigation">
  4. <i class="fa fa-fw fa-bars"></i>
  5. </button>
  6. <div class="collapse navbar-collapse" id="navbar-content">
  7. <ul class="navbar-nav mr-auto">
  8. @can('photo.quick_upload')
  9. <li class="nav-item">
  10. <a class="nav-link" href="#" data-toggle="modal" data-target="#quick-upload-modal">
  11. <i class="fa fa-plus"></i> @lang('navigation.navbar.quick_post')
  12. </a>
  13. </li>
  14. @endcan
  15. @if (count($g_albums) > 0)
  16. <li class="nav-item dropdown ml-2">
  17. <a class="nav-link dropdown-toggle" href="{{ url('/') }}" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  18. <i class="fa fa-book"></i> @lang('navigation.navbar.albums')
  19. </a>
  20. <div class="dropdown-menu">
  21. @foreach ($g_albums_menu as $album)
  22. <a class="dropdown-item" href="{{ $album->url() }}">{{ $album->name }}</a>
  23. @endforeach
  24. @if ($g_more_albums > 0)
  25. <a class="dropdown-item" href="{{ route('home') }}">{{ trans_choice('gallery.show_more_albums', $g_more_albums) }}</a>
  26. @endif
  27. </div>
  28. </li>
  29. @endif
  30. @if (count($g_labels) > 0)
  31. <li class="nav-item dropdown ml-2">
  32. <a class="nav-link dropdown-toggle" href="{{ url('/') }}" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  33. <i class="fa fa-tags"></i> @lang('navigation.navbar.labels')
  34. </a>
  35. <div class="dropdown-menu">
  36. @foreach ($g_labels as $label)
  37. <a class="dropdown-item" href="{{ $label->url() }}">{{ $label->name }} ({{ number_format($label->photos_count, 0) }})</a>
  38. @endforeach
  39. @if ($g_more_labels > 0)
  40. <a class="dropdown-item" href="{{ route('labels') }}">{{ trans_choice('gallery.show_more_labels', $g_more_labels) }}</a>
  41. @endif
  42. </div>
  43. </li>
  44. @endif
  45. @if (count($g_albums) > 0 && \App\User::currentOrAnonymous()->can('statistics.public-access'))
  46. <li class="nav-item ml-2">
  47. <a class="nav-link" href="{{ route('statistics.index') }}"><i class="fa fa-bar-chart"></i> @lang('navigation.navbar.statistics')</a>
  48. </li>
  49. @endif
  50. @if (!Auth::guest() && (Auth::user()->can('admin:access')))
  51. <li class="nav-item ml-2">
  52. <a class="nav-link" href="{{ route('admin') }}"><i class="fa fa-fw fa-cog"></i> @lang('navigation.navbar.admin')</a>
  53. </li>
  54. @endif
  55. </ul>
  56. @if (Auth::guest())
  57. <form class="form-inline my-2 my-lg-0">
  58. @if (UserConfig::get('allow_self_registration') == 1)
  59. <a class="btn btn-info" href="{{ url('/register') }}" style="margin-right: 10px;">@lang('navigation.navbar.register')</a>
  60. @endif
  61. <a class="btn {{ UserConfig::get('allow_self_registration') == 1 ? 'btn-outline-info' : 'btn-info' }}" href="{{ url('/login') }}">@lang('navigation.navbar.login')</a>
  62. </form>
  63. @else
  64. <ul class="navbar-nav right">
  65. <li class="nav-item dropdown">
  66. <a class="nav-link dropdown-toggle" href="{{ url('/') }}" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  67. {{ Auth::user()->name }}
  68. {{--<img class="avatar" src="{{ Theme::gravatarUrl(Auth::user()->email, 42) }}" alt="{{ Auth::user()->name }}" title="{{ Auth::user()->name }}" />--}}
  69. </a>
  70. <div class="dropdown-menu dropdown-menu-right">
  71. @if (UserConfig::get('social_user_profiles') && Auth::user()->enable_profile_page)
  72. <a class="dropdown-item" href="{{ Auth::user()->profileUrl() }}">@lang('navigation.navbar.public_profile_page')</a>
  73. @endif
  74. <a class="dropdown-item" href="{{ route('userSettings') }}">@lang('navigation.navbar.user_settings')</a>
  75. <div class="dropdown-divider"></div>
  76. <a class="dropdown-item" href="{{ route('auth.changePassword') }}">@lang('navigation.navbar.change_password')</a>
  77. <a class="dropdown-item" href="{{ url('/logout') }}" onclick="event.preventDefault(); document.getElementById('logout-form').submit();">@lang('navigation.navbar.logout')</a>
  78. <form id="logout-form" action="{{ url('/logout') }}" method="POST" style="display: none;">
  79. {{ csrf_field() }}
  80. </form>
  81. </div>
  82. </li>
  83. </ul>
  84. @endif
  85. </div>
  86. </nav>