templates/Frontend/Layout.twig line 1

  1. {% import 'Frontend/Macros.twig' as macro %}
  2. <!doctype html>
  3. <html lang="en" class="h-100">
  4. <head>
  5.     <meta charset="utf-8">
  6.     <meta name="viewport" content="width=device-width, initial-scale=1">
  7.     <title>vimp</title>
  8.     {% block stylesheets %}
  9.         {{ encore_entry_link_tags('frontend') }}
  10.     {% endblock %}
  11.     {% block javascripts %}
  12.         {{ encore_entry_script_tags('frontend') }}
  13.     {% endblock %}
  14. </head>
  15. <body>
  16. <div class="container">
  17.     <nav class="navbar navbar-expand-lg bg-body-tertiary">
  18.         <div class="container-fluid">
  19.             <a class="navbar-brand" href="#">vimp</a>
  20.             <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
  21.                 <span class="navbar-toggler-icon"></span>
  22.             </button>
  23.             <div class="collapse navbar-collapse" id="navbarSupportedContent">
  24.                 <ul class="navbar-nav me-auto mb-2 mb-lg-0">
  25.                     <li class="nav-item">
  26.                         <a class="nav-link{% if app.current_route == 'video.index' %} active{% endif %}" aria-current="page" href="{{ path('video.index') }}">Videos</a>
  27.                     </li>
  28.                     <li class="nav-item">
  29.                         <a class="nav-link{% if app.current_route == 'actor.index' %} active{% endif %}" href="{{ path('actor.index') }}">Actors</a>
  30.                     </li>
  31.                     <li class="nav-item">
  32.                         <a class="nav-link{% if app.current_route == 'studio.index' %} active{% endif %}" href="{{ path('studio.index') }}">Studios</a>
  33.                     </li>
  34.                 </ul>
  35.                 {% if is_granted('ROLE_USER') %}
  36.                 <div class="dropdown">
  37.                     <a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
  38.                         <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-person-circle" viewBox="0 0 16 16">
  39.                             <path d="M11 6a3 3 0 1 1-6 0 3 3 0 0 1 6 0z"/>
  40.                             <path fill-rule="evenodd" d="M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8zm8-7a7 7 0 0 0-5.468 11.37C3.242 11.226 4.805 10 8 10s4.757 1.225 5.468 2.37A7 7 0 0 0 8 1z"/>
  41.                         </svg>
  42.                         {{ app.user.email }}
  43.                     </a>
  44.                     <ul class="dropdown-menu dropdown-menu-end">
  45.                         <li><a class="dropdown-item" href="{{ path('user.logout') }}">Logout</a></li>
  46.                     </ul>
  47.                 </div>
  48.                 {% else %}
  49.                 <ul class="navbar-nav ms-auto mb-2 mb-lg-0">
  50.                     <li class="nav-item">
  51.                         <a class="nav-link" aria-current="page" href="{{ path('user.login') }}">Login</a>
  52.                     </li>
  53.                     <li class="nav-item">
  54.                         <a class="nav-link" aria-current="page" href="{{ path('user.register') }}">Register</a>
  55.                     </li>
  56.                 </ul>
  57.                 {% endif %}
  58.             </div>
  59.         </div>
  60.     </nav>
  61.     {% for label, messages in app.flashes %}
  62.         {% for message in messages %}
  63.             <div class="alert alert-{{ label }}" role="alert">
  64.                 {{ message }}
  65.             </div>
  66.         {% endfor %}
  67.     {% endfor %}
  68.     {% block body %}
  69.     {% endblock %}
  70. </div>
  71. </body>
  72. </html>