layout.html.twig 3.27 KB
Newer Older
Damien Moulard committed
1 2 3 4 5 6 7
{% trans_default_domain 'messages' %}
<!DOCTYPE html>
<!--[if IE 8]>    <html class="no-js lt-ie9" lang="fr-FR"> <![endif]-->
<!--[if gt IE 8]><!-->
<html class="no-js" lang="fr-FR">
<!--<![endif]-->
<head>
8 9
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
Damien Moulard committed
10
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
11 12 13
    <title>{{ title ?? KOH_APP_TITLE ?? 'Kohinos' }}</title>
    <meta name="description" content="{{ description|default('Kohinos : Outil de gestion de monnaie locale complémentaire') }}" />
    <meta name="keywords" content="{{ keywords|default('Kohinos, mlc, mlcc, monnaie locale, monnaies locales') }}" />
Damien Moulard committed
14 15 16 17 18
    <meta name="mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-capable" content="yes">

    {# FAVICON #}
    {% block favicon %}
19 20 21 22
        <link rel="apple-touch-icon" sizes="180x180" href="/images/favicon/apple-touch-icon.png">
        <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon/favicon-32x32.png">
        <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon/favicon-16x16.png">
        <link rel="manifest" href="/images/favicon/site.webmanifest">
Damien Moulard committed
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
    {% endblock favicon %}

	{# POUR AJOUTER DES META ( like og: ) #}
	{% block meta %} {% endblock meta %}

 	{% block stylesheets %}
        {{ encore_entry_link_tags('app') }}
    {% endblock stylesheets %}

    <link rel="stylesheet" href="/leaflet/leaflet.css">
	{# POUR AJOUTER DES CSS #}
 	{% block css %} {% endblock css %}
</head>

<body>
    <input type="hidden" name="koh_map_center" id="koh_map_center" value='{{KOH_MAP_CENTER|default('')}}' />
    <input type="hidden" name="koh_map_zoom" id="koh_map_zoom" value='{{KOH_MAP_ZOOM|default('')}}' />

41
		{% include 'common/modale_choix_groupe.html.twig' %}
42
    
Damien Moulard committed
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96

    <!-- HEADER -->
    {% block header %}
      {% include 'common/header.html.twig' %}
    {% endblock header %}

    <!-- CONTAINER -->
    <div class="container">
        {% include 'common/flash-messages.html.twig' %}
        {% block content %}
        <!-- CONTENT -->
        {% endblock content %}
    </div>

    <!-- FOOTER -->
    {% block footer %}
      {% include 'common/footer.html.twig' %}
    {% endblock footer %}

	{% block javascripts %}
        {{ encore_entry_script_tags('app') }}
    {% endblock javascripts %}

    {# POUR AJOUTER DES JS #}
    {% block js %} {% endblock js %}

    {# AFFICHAGE DE LA MODALE DE CHOIX DU RÔLE (groupe associé aux rôles) #}
    {% if showModalGroupChoice() %}
        <script type="text/javascript">
            $(document).ready(function() {
                $('#roleGroupeModal').modal('show');
            });
        </script>
    {% endif %}
    <script type="text/javascript">
        $('.viewChoiceGroup').on('click', function () {
            $('#roleGroupeModal').modal('show');
        });
    </script>
    {# https://stackoverflow.com/questions/34369951/how-to-get-add-to-home-screen-pop-up-on-site-open-in-mobile-browser #}
    <script>
     if ('serviceWorker' in navigator) {
        if ('serviceWorker' in navigator) {
            navigator.serviceWorker.register('/js/service-worker.js')
              .then(function(reg){
             }).catch(function(err) {
            });
        }
     }
    </script>

</body>

</html>