templates/base.html.twig line 1

Open in your IDE?
  1. <!DOCTYPE html>
  2. <html lang="en">
  3.     <head>
  4.         <meta charset="UTF-8">
  5.         <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6.         <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  7.         <title>{% block title %}Welcome!{% endblock %}</title>
  8.         <link href="{{ asset('css/fontawesome.all.min.css') }}" rel="stylesheet">
  9.         <link href="{{ asset('css/bootstrap.min.css') }}" rel="stylesheet">
  10.         <link href="{{ asset('css/styles.css') }}" rel="stylesheet">
  11.         {% block stylesheets %}{% endblock %}
  12.     </head>
  13.     <body>
  14.     {# Set this in the base twig template because we're going to use this all the time! #}
  15.     {% set CURRENT_URL = path(app.request.attributes.get('_route'), app.request.attributes.get('_route_params')) %}
  16.         <nav class="navbar navbar-expand-lg sticky-top navbar-light bg-light border-bottom">
  17.                     <a href="#" class="navbar-brand">
  18.                         <img src="{{ asset('img/AA_logo_340x20.png') }}" alt="">
  19.                     </a>
  20.                     <button class="navbar-toggler" type="button" data-toggle="collapse" data-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 ml-auto mt-2 mt-lg-0">
  25.                             <li class="nav-item active">
  26.                                 <a class="nav-link" href="{{ path('home') }}">Home
  27.                                     <span class="sr-only">(current)</span>
  28.                                 </a>
  29.                             </li>
  30.                             {% if is_granted('IS_AUTHENTICATED_REMEMBERED') %}
  31.                             <li class="nav-item dropdown">
  32.                                 <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  33.                                     {{ app.user.firstName }}
  34.                                 </a>
  35.                                 <div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdown">
  36.                                     <a class="dropdown-item" href="{{ path('app_forgot_password_request') }}">Reset Password</a>
  37.                                     <div class="dropdown-divider"></div>
  38.                                     <a class="dropdown-item" href="{{ path('app_logout') }}">Logout</a>
  39.                                 </div>
  40.                             </li>
  41.                             {% else %}
  42.                             <li class="nav-item">
  43.                                 <a class="nav-link" href="{{ path('app_login') }}">Login</a>
  44.                             </li>
  45.                                 <li class="nav-item">
  46.                                 <a class="nav-link" href="{{ path('app_register') }}">Register</a>
  47.                             </li>
  48.                             {% endif %}
  49.                         </ul>
  50.                     </div>
  51.                 </nav>
  52.         <div class="d-flex" id="wrapper">
  53.             {% include "partials/sidebar.html.twig" %}
  54.             <div id="page-content-wrapper">
  55.                 {% set __alerts = {
  56.                     'success': {'class': 'success', 'icon':'wb-check', 'text':'Successes'},
  57.                     'info':    {'class': 'info',    'icon':'wb-info',  'text':'Information'},
  58.                     'warning': {'class': 'warning', 'icon':'wb-alert', 'text':'Warnings'},
  59.                     'error':   {'class': 'danger',  'icon':'wb-alert', 'text':'Errors'}
  60.                 } %}
  61.                 {% if app.session.flashBag.peekAll() | length %}
  62.                     {% for type, message_array in app.session.flashBag.all() | sort %}
  63.                         {% if attribute(__alerts, type) %}
  64.                             <div class="alert dark alert-icon alert-{{ attribute(__alerts, type)['class'] }}" role="alert">
  65.                                 <h4>{{ attribute(__alerts, type)['text'] }}</h4>
  66.                                 <i class="icon {{ attribute(__alerts, type)['icon'] }}" aria-hidden="true"></i>
  67.                                 <ul>
  68.                                     {% for message in message_array %}
  69.                                         <li>{{ message }}</li>
  70.                                     {% endfor %}
  71.                                 </ul>
  72.                             </div>
  73.                         {% endif %}
  74.                     {% endfor %}
  75.                 {% endif %}
  76.                 {% block links %}
  77.                 {% endblock %}
  78.                 {% block body %}{% endblock %}
  79.             </div>
  80.         </div>
  81.         <!-- Bootstrap core JavaScript -->
  82.         <script src="{{ asset('js/jquery.min.js') }}"></script>
  83.         <script src="{{ asset('js/jquery-ui.min.js') }}"></script>
  84.         <script src="{{ asset('js/bootstrap.bundle.min.js') }}"></script>
  85.         <script src="{{ asset('js/fontawesome.min.js') }}"></script>
  86.         {% block javascripts %}{% endblock %}
  87.     </body>
  88. </html>