templates/base.html.twig line 1

Open in your IDE?
  1. <!DOCTYPE html>
  2. {% set showHeaderBlock = 1 %}
  3. <html>
  4.     <head>
  5.         <meta charset="UTF-8">
  6.         <title>{% block title %}Welcome!{% endblock %}</title>
  7.         <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>">
  8.         {# Run `composer require symfony/webpack-encore-bundle` to start using Symfony UX #}
  9.         {% block stylesheets %}
  10.             <link rel="stylesheet" href="/assets/bootstrap/bootstrap.min.css" />
  11.             <link rel="stylesheet" href="{{ asset('Css/custom.min.css') }}" />
  12.             <link rel="stylesheet" href="{{ asset('assets/LocationPicker/leaflet-locationpicker.css') }}" />
  13.             <link rel="stylesheet" href="{{ asset('assets/Leaflet/leaflet.css') }}" />
  14.             <link href="/assets/DataTable/datatables.min.css" rel="stylesheet" >
  15.             <style> .flash-notice { color: red } </style>
  16.         {% endblock %}
  17.         {% block javascripts %}
  18.             <script src="{{ asset('assets/bootstrap/bootstrap.bundle.min.js') }}"></script>
  19.             <script src="//unpkg.com/leaflet@1.1.0/dist/leaflet.js"></script>
  20.             <script src="{{ asset('assets/jquery.min.js') }}"></script>
  21.             <script src="{{ asset('assets/LocationPicker/leaflet-locationpicker.js') }}"></script>
  22.             <script src="{{ asset('assets/tinymce/js/tinymce/tinymce.min.js') }}"></script>
  23.             <script src="{{ asset('assets/custom.js') }}"></script>
  24.         {% endblock %}
  25.     </head>
  26.     <body>
  27.     <div class="offcanvas offcanvas-start" tabindex="-1" id="apinavi" aria-labelledby="offcanvasLabel">
  28.         <div class="offcanvas-header">
  29.             <h5 class="offcanvas-title" id="offcanvasLabel">{{ get_env('APP_TITLE')}} Hauptnavigation</h5>
  30.             <button type="button" class="btn-close text-reset" data-bs-dismiss="offcanvas" aria-label="Close"></button>
  31.         </div>
  32.         <div class="offcanvas-body">
  33.             {% if is_granted('ROLE_USER') %}
  34.                 <a class="my-2 btn btn-outline-success form-control" href="/user">Benutzerverwaltung</a>
  35.             {% endif %}
  36.             {% if is_granted('ROLE_PLACES') %}
  37.                 <a class="my-2 btn btn-outline-success form-control" href="/places">Lokationen</a>
  38.             {% endif %}
  39.             <a class="my-2 btn btn-outline-success form-control" href="/apps">Anwendungen</a>
  40.         </div>
  41.     </div>
  42.     {% if showHeaderBlock == 1 %}
  43.     <div class="container border border-1 border-dark top-nav d-flex flex-row px-0 my-3">
  44.     {% block topnav %}
  45.     {% endblock %}
  46.         {% if app.user %}
  47.         <div class="d-flex flex-grow-1 justify-content-end pe-2 text-dark text-sm" >
  48.             Login: {{ app.user.userIdentifier }}
  49.         </div>
  50.         {% endif %}
  51.     </div>
  52.     {% endif %}
  53.     <div class="container messages px-0">
  54.      {% for message in app.flashes('success') %}
  55.              <div class="alert alert-success" role="alert">
  56.                  {{ message }}
  57.              </div>
  58.      {% endfor %}
  59.     {% for message in app.flashes('notice') %}
  60.         <div class="alert alert-danger" role="alert">
  61.             {{ message }}
  62.         </div>
  63.     {% endfor %}
  64.     {% for message in app.flashes('info') %}
  65.         <div class="alert alert-info" role="alert">
  66.             {{ message }}
  67.         </div>
  68.     {% endfor %}
  69.     </div>
  70.     <div class="container main-content px-0">
  71.         <main>
  72.     {% block body %}
  73.     {% endblock %}
  74.         </main>
  75.     </div>
  76.     </body>
  77. </html>