<!DOCTYPE html>
{% set showHeaderBlock = 1 %}
<html>
<head>
<meta charset="UTF-8">
<title>{% block title %}Welcome!{% endblock %}</title>
<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>">
{# Run `composer require symfony/webpack-encore-bundle` to start using Symfony UX #}
{% block stylesheets %}
<link rel="stylesheet" href="/assets/bootstrap/bootstrap.min.css" />
<link rel="stylesheet" href="{{ asset('Css/custom.min.css') }}" />
<link rel="stylesheet" href="{{ asset('assets/LocationPicker/leaflet-locationpicker.css') }}" />
<link rel="stylesheet" href="{{ asset('assets/Leaflet/leaflet.css') }}" />
<link href="/assets/DataTable/datatables.min.css" rel="stylesheet" >
<style> .flash-notice { color: red } </style>
{% endblock %}
{% block javascripts %}
<script src="{{ asset('assets/bootstrap/bootstrap.bundle.min.js') }}"></script>
<script src="//unpkg.com/leaflet@1.1.0/dist/leaflet.js"></script>
<script src="{{ asset('assets/jquery.min.js') }}"></script>
<script src="{{ asset('assets/LocationPicker/leaflet-locationpicker.js') }}"></script>
<script src="{{ asset('assets/tinymce/js/tinymce/tinymce.min.js') }}"></script>
<script src="{{ asset('assets/custom.js') }}"></script>
{% endblock %}
</head>
<body>
<div class="offcanvas offcanvas-start" tabindex="-1" id="apinavi" aria-labelledby="offcanvasLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="offcanvasLabel">{{ get_env('APP_TITLE')}} Hauptnavigation</h5>
<button type="button" class="btn-close text-reset" data-bs-dismiss="offcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
{% if is_granted('ROLE_USER') %}
<a class="my-2 btn btn-outline-success form-control" href="/user">Benutzerverwaltung</a>
{% endif %}
{% if is_granted('ROLE_PLACES') %}
<a class="my-2 btn btn-outline-success form-control" href="/places">Lokationen</a>
{% endif %}
<a class="my-2 btn btn-outline-success form-control" href="/apps">Anwendungen</a>
</div>
</div>
{% if showHeaderBlock == 1 %}
<div class="container border border-1 border-dark top-nav d-flex flex-row px-0 my-3">
{% block topnav %}
{% endblock %}
{% if app.user %}
<div class="d-flex flex-grow-1 justify-content-end pe-2 text-dark text-sm" >
Login: {{ app.user.userIdentifier }}
</div>
{% endif %}
</div>
{% endif %}
<div class="container messages px-0">
{% for message in app.flashes('success') %}
<div class="alert alert-success" role="alert">
{{ message }}
</div>
{% endfor %}
{% for message in app.flashes('notice') %}
<div class="alert alert-danger" role="alert">
{{ message }}
</div>
{% endfor %}
{% for message in app.flashes('info') %}
<div class="alert alert-info" role="alert">
{{ message }}
</div>
{% endfor %}
</div>
<div class="container main-content px-0">
<main>
{% block body %}
{% endblock %}
</main>
</div>
</body>
</html>