templates/base.html.twig line 1

Open in your IDE?
  1. <!DOCTYPE html>
  2. <html>
  3.     <head>
  4.         <meta charset="UTF-8">
  5.         <title>{% block title %}Welcome!{% endblock %}</title>
  6.         <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/css/bootstrap.min.css">
  7.         <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.0/css/all.min.css">
  8.         <link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 128 128%22><text y=%221.2em%22 font-size=%2296%22>⚫️</text></svg>">
  9.         {# Run `composer require symfony/webpack-encore-bundle` to start using Symfony UX #}
  10.         {% block stylesheets %}
  11.             {{ encore_entry_link_tags('app') }}
  12.         {% endblock %}
  13.         {% block javascripts %}
  14.             {{ encore_entry_script_tags('app') }}
  15.         {% endblock %}
  16.     </head>
  17.     <body>
  18.     <header>
  19.     {% if is_granted('ROLE_ADMIN') %}
  20.     <div class="p-3 text-bg-dark">
  21.         <div class="container">
  22.         <div class="d-flex flex-wrap align-items-center justify-content-center justify-content-lg-start">
  23.             <ul class="nav col-12 col-lg-auto me-lg-auto mb-2 justify-content-center mb-md-0">
  24.             <li><a href="{{ path('admin')}}" class="nav-link px-2 "><i class="fa-solid fa-user"></i> Admin</a></li>
  25.             </ul>
  26.         </div>
  27.         </div>
  28.     </div>
  29.     {% endif %}
  30.     <div class="container d-flex flex-wrap align-items-center justify-content-center justify-content-md-between py-3 mb-4 border-bottom">
  31.       <ul class="nav col-12 col-md-auto mb-2 justify-content-center mb-md-0">
  32.         <li><a href="{{ path('app_home')}}" class="nav-link px-2 link-secondary"><i class="text-center fa-sharp fa-solid fa-house"></i> Home</a></li>
  33.         <!-- <li><a href="#" class="nav-link px-2 link-dark">Features</a></li> -->
  34.       </ul>
  35.       <div class="col-md-3 text-end">
  36.         {% if is_granted('ROLE_USER') %}
  37.             <a href="{{ path('app_logout')}}"><button type="button" class="btn btn-danger">Logout</button></a>
  38.         {% else %}
  39.             <a href="{{ path('app_login')}}"><button type="button" class="btn btn-outline-primary me-2">Login</button></a>
  40.             <a href="#"><button type="button" class="btn btn-primary">Sign-up</button></a>
  41.         {% endif %}
  42.       </div>
  43.     </div>
  44.     </header>
  45.     <main class="container">
  46.         {% block body %}{% endblock %}
  47.     </main>
  48.     <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/js/bootstrap.min.js"></script>
  49.     <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/js/bootstrap.bundle.min.js"></script>
  50.     </body>
  51. </html>