Просмотр файла public/themes/default/views/navbar.blade.php

Размер файла: 4.07Kb
  1. <!-- Navbar-->
  2. <header class="app-header">
  3. <a class="app-header__logo" href="/">{{ setting('title') }}</a>
  4.  
  5. <!-- Sidebar toggle button-->
  6. <a class="app-icon icon-toggle" href="#" data-bs-toggle="sidebar" aria-label="Show Sidebar"></a>
  7. @if (! getUser())
  8. <a class="app-icon icon-login" href="/login" aria-label="{{ __('index.login') }}"></a>
  9. @endif
  10.  
  11. <!-- Navbar Right Menu-->
  12. <ul class="app-nav">
  13. <li class="app-search search-navbar">
  14. <form action="/search" method="get">
  15. <input name="q" class="app-search__input" type="search" placeholder="{{ __('main.search') }}" required>
  16. <button class="app-search__button"><i class="fa fa-search"></i></button>
  17. </form>
  18. </li>
  19.  
  20. <!--Notification Menu-->
  21. @if ($user = getUser())
  22. @if (isAdmin())
  23. @if (statsSpam())
  24. <li>
  25. <a class="app-nav__item" href="/admin/spam" aria-label="{{ __('index.complains') }}">
  26. <i class="far fa-bell fa-lg"></i>
  27. <span class="badge bg-notify">{{ statsSpam() }}</span>
  28. </a>
  29. </li>
  30. @endif
  31.  
  32. @if ($user->newchat < statsNewChat())
  33. <li>
  34. <a class="app-nav__item" href="/admin/chats" aria-label="{{ __('index.chat') }}">
  35. <i class="far fa-bell fa-lg"></i>
  36. <span class="badge bg-notify">!</span>
  37. </a>
  38. </li>
  39. @endif
  40. @endif
  41.  
  42. @if ($user->newwall && $user->isActive())
  43. <li>
  44. <a class="app-nav__item" href="/walls/{{ $user->login }}" aria-label="{{ __('index.wall_post') }}">
  45. <i class="far fa-comments fa-lg"></i>
  46. <span class="badge bg-notify">{{ $user->newwall }}</span>
  47. </a>
  48. </li>
  49. @endif
  50.  
  51. @if ($user->isActive())
  52. <li class="dropdown js-messages-block">
  53. <a class="app-nav__item" href="#" data-bs-toggle="dropdown" aria-label="Show notifications">
  54. <i class="far fa-envelope fa-lg"></i>
  55. @if ($user->newprivat)
  56. <span class="badge bg-notify">{{ $user->newprivat }}</span>
  57. @endif
  58. </a>
  59. <ul class="app-notification dropdown-menu dropdown-menu-end">
  60. <li class="app-notification__title">{{ __('messages.new_messages') }}: <span>{{ $user->newprivat }}</span></li>
  61. <div class="app-notification__content js-messages"></div>
  62. <li class="app-notification__footer"><a href="/messages">{{ __('messages.all_messages') }}</a></li>
  63. </ul>
  64. </li>
  65. @endif
  66.  
  67. <!-- User Menu-->
  68. <li class="dropdown">
  69. <a class="app-nav__item" href="#" data-bs-toggle="dropdown" aria-label="Open Profile Menu">
  70. <i class="far fa-user fa-lg"></i>
  71. </a>
  72. <ul class="app-notification dropdown-menu dropdown-menu-end">
  73. <li><a class="dropdown-item" href="/users/{{ getUser('login') }}"><i class="fas fa-user fa-lg"></i> {{ __('index.my_account') }}</a></li>
  74. <li><a class="dropdown-item" href="/profile"><i class="fas fa-user-edit fa-lg"></i> {{ __('index.my_profile') }}</a></li>
  75. <li><a class="dropdown-item" href="/accounts"><i class="fas fa-user-cog fa-lg"></i> {{ __('index.my_details') }}</a></li>
  76. <li><a class="dropdown-item" href="/settings"><i class="fas fa-cog fa-lg"></i> {{ __('index.my_settings') }}</a></li>
  77. <li><a class="dropdown-item" href="/logout?_token={{ csrf_token() }}"><i class="fas fa-sign-out-alt fa-lg"></i> {{ __('index.logout') }}</a></li>
  78. </ul>
  79. </li>
  80. @endif
  81. </ul>
  82. </header>