templates/components/navigation/navigation.html.twig line 1

Open in your IDE?
  1. {% import "components/macros.html.twig" as macros %}
  2. <nav class="navbar navbar-expand-sm navbar-light bg-custom border-bottom gap-2">
  3.     <a class="navbar-brand font-weight-bold" href="{{ path('homePage') }}"><img src="{{ asset('build/images/RappBattleLogoAlpha.png') }}" alt="Logo"/></a>
  4.     <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarColor" aria-controls="navbarColor" aria-expanded="false" aria-label="Toggle navigation">
  5.         <span class="navbar-toggler-icon"></span>
  6.     </button>
  7.     <div class="collapse navbar-collapse" id="navbarColor">
  8.         <ul class="navbar-nav">
  9.             <li class="nav-item"><a class="nav-link" href="{{ path('battles') }}">Battles</a> </li>
  10.             <li class="nav-item"><a class="nav-link" href="{{ path('beats') }}">Beats</a> </li>
  11.             <li class="nav-item"><a class="nav-link" href="{{ path('rappers') }}">Rappers</a> </li>
  12.             <li class="nav-item"><a class="nav-link" href="{{ path('crews') }}">Crews</a> </li>
  13.             <li class="nav-item"><a class="nav-link" href="{{ path('leaderboard') }}">Leaderboard</a> </li>
  14.             <li class="nav-item"><a class="nav-link" href="{{ path('downloads') }}">Downloads</a> </li>
  15.             <li class="nav-item "><a class="nav-link" href="{{ path('about') }}">About</a> </li>
  16.             <li class="nav-item "><a class="nav-link" href="{{ path('faq') }}">FAQ</a> </li>
  17.         </ul>
  18.     </div>
  19.     {% if app.user %}
  20.         <div class="dropdown">
  21.             <a class="btn btn-primary dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
  22.                 <i class="bi bi-bell"></i>
  23.             </a>
  24.             <div class="dropdown-menu dropdown-menu-end notifications-nav">
  25.                 <div class="row">
  26.                     <div class="notifications-list--small">
  27.                         {% if userData.userNotificationsHomepage|length > 0 %}
  28.                             <div class="messages-list">
  29.                                 {% for notification in userData.userNotificationsHomepage %}
  30.                                     {{ macros.renderNotificationListItemSmall(notification,true) }}
  31.                                 {% endfor %}
  32.                             </div>
  33.                         {% else %}
  34.                             <p class="text-center">No notifications</p>
  35.                         {% endif %}
  36.                     </div>
  37.                 </div>
  38.                 <div class="row dropdown-footer">
  39.                     <a href="{{ path('notifications') }}" class="text-center"><i class="bi bi-bell-fill"></i> See all notifications</a>
  40.                 </div>
  41.             </div>
  42.         </div>
  43.         <div class="dropdown">
  44.             <a class="btn btn-primary dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
  45.                 <i class="bi bi-envelope"></i>
  46.             </a>
  47.             <div class="dropdown-menu dropdown-menu-end messages-nav">
  48.                 <div class="row">
  49.                     <div class="messages-list--small">
  50.                         {% if userData.userMessagesHomepage|length > 0 %}
  51.                             <div class="messages-list">
  52.                                 {% for message in userData.userMessagesHomepage %}
  53.                                     {{ macros.renderMessageListItemSmall(message,true) }}
  54.                                 {% endfor %}
  55.                             </div>
  56.                         {% else %}
  57.                             <p class="text-center">No messages</p>
  58.                         {% endif %}
  59.                     </div>
  60.                 </div>
  61.                 <div class="row dropdown-footer">
  62.                     <a href="{{ path('messages') }}" class="text-center"><i class="bi bi-envelope-fill"></i> See all messages</a>
  63.                 </div>
  64.             </div>
  65.         </div>
  66.     {% endif %}
  67.     <div class="dropdown pr-50">
  68.         <a class="btn btn-primary dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
  69.             <i class="bi bi-person"></i>
  70.         </a>
  71.         <ul class="dropdown-menu dropdown-menu-end">
  72.             {% if app.user %}
  73.                 <li><a href="{{ path('profile') }}" class="dropdown-item" type="button">Profile</a></li>
  74.                 <li><a href="{{ path('messages') }}" class="dropdown-item" type="button">Messages ({{ userData.userNewMessages|length }})</a></li>
  75.                 <li><a href="{{ path('notifications') }}" class="dropdown-item" type="button">Notifications ({{ userData.userNewNotifications|length }})</a></li>
  76.                 <li><a href="{{ path('settings') }}" class="dropdown-item" type="button">Settings</a></li>
  77.                 <li><a href="{{ path('app_logout') }}" class="dropdown-item" type="button">Logout</a></li>
  78.             {% else %}
  79.                 <li><a href="{{ path('login') }}" class="dropdown-item" type="button">Login</a></li>
  80.                 <li><a href="{{ path('register') }}" class="dropdown-item" type="button">Register</a></li>
  81.             {% endif %}
  82.         </ul>
  83.     </div>
  84. </nav>