<!DOCTYPE html>
<html lang="fr">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <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>">
        
        <link rel="icon" type="image/png" href="{{ asset('logo-osm.png') }}">
        {# Run `composer require symfony/webpack-encore-bundle` to start using Symfony UX #}
         {% block stylesheets %}
            {{ encore_entry_link_tags('app') }}
            <link href='{{ asset('js/mapbox/mapbox-gl.css') }}' rel='stylesheet' />
            <!-- CSS Bootstrap -->
        <link rel="stylesheet" href="{{ asset('css/bootstrap-icons.css') }}">
        <link rel="stylesheet" href="{{ asset('js/bootstrap/bootstrap-icons.min.css') }}">
        <link href="{{ asset('js/bootstrap/bootstrap.min.css') }}" rel="stylesheet">
        <!-- CSS personnalisé -->
        <link rel="stylesheet" href="{{ asset('css/main.css') }}">
        
        {% endblock %}
    </head>
    <body>
        <header class="main-header">
            <div class="container">
                <div class="row align-items-center">
                    <div class="col-12">
                        <a href="{{ path('app_public_index') }}" class="d-flex align-items-center">
                            <h1 class="mb-0 mt-2">
                            <img src="{{ asset('logo-osm.png') }}" alt="Logo OSM" class="me-2" style="width: 30px; height: 30px;">
                            
                            Mon Commerce OpenStreetMap</h1>
                        </a>
                    </div>
                </div>
                {% for label, messages in app.flashes %}
                    {% for message in messages %}
                        <div class="alert alert-{{ label }} is-{{ label }} alert-dismissible fade show mt-3" role="alert">
                            {{ message }}
                            <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
                        </div>
                    {% endfor %}
                {% endfor %}
                <div class="row mt-3">
                    <div class="col-12">
                        {% include 'public/nav.html.twig' %}
                    </div>
                </div>
            </div>
        </header>

        

        <main class="body-landing">
            {% block body %}{% endblock %}
        </main>

        <footer class="main-footer">
            <div class="container">
                <div class="row mb-4">
                    <div class="col-12">
                        {% include 'public/nav.html.twig' %}
                    </div>
                </div>
                <div class="row">
                    <div class="col-12">
                        <p class="mb-2">OpenStreetMap Mon Commerce</p>
                    </div>
                    
                     <div class="col-md-4 col-12">
<p class="mb-2">
                            Licence AGPLv3+, fait par 
                            <a href="https://mastodon.cipherbliss.com/@tykayn">Tykayn</a> de 
                            <a href="https://www.cipherbliss.com">CipherBliss EI</a>, 
                            membre de la fédération des professionels d'OpenStreetMap
                        </p>
                        <p class="mb-2">
                            <a href="https://www.openstreetmap.org/copyright">OpenStreetMap France</a>
                        </p>
                    </div>

                    <div class="col-md-4 col-12">

                        <div id="userChangesHistory"></div>
                    </div>
<div class="col-md-4 col-12">
<div id="qr-share" class="mb-12">
                        partagez cette page :
                        <br>
                        <div id="qrcode"></div>
</div>
                    <div class="col-md-4 col-12">

                        <p class="mb-0">
                            <a href="https://www.openstreetmap.org/copyright">Sources du logiciel</a>
                        </p>
                        <p class="mb-2">
                            Sources des données : <a href="https://www.openstreetmap.org/">OpenStreetMap</a>
                        </p>
                    </div>
                </div>
                </div>
                <div class="row">
                    <div class="col-12">
                        <p class="mb-2">
                            <a href="https://osm-commerces.cipherbliss.com/api/v1/stats_geojson" target="_blank">Documentation de l'API (GeoJSON)</a>
                        </p>
                    </div>
                </div>
            </div>
        </footer>

        {% block javascripts %}
            {{ encore_entry_script_tags('app') }}  
        <script src="{{ asset('js/bootstrap/bootstrap.bundle.min.js') }}"></script>
        <script src='{{ asset('js/maplibre/maplibre-gl.js') }}'></script>

        <!-- Script pour le tri automatique des tableaux -->
        {# <script src="{{ asset('js/bootstrap/Sortable.min.js') }}"></script> #}
           <script src="{{ asset('js/qrcode/qrcode.min.js') }}"></script>
            <script>
                new QRCode(document.getElementById('qrcode'), {
                    text: window.location.href,
                    width: 100,
                    height: 100,
                    colorDark : '#000000',
                    colorLight : '#ffffff',
                    correctLevel : QRCode.CorrectLevel.H
                });
            </script>
        {% endblock %}

        {% block completion_progress %}
        {% endblock %}
    </body>
</html>
