layout.html.twig 3.25 KB
Newer Older
Julien Jorry committed
1
{% trans_default_domain 'messages' %}
2
<!DOCTYPE html>
Julien Jorry committed
3
<!--[if IE 8]>    <html class="no-js lt-ie9" lang="fr-FR"> <![endif]-->
4
<!--[if gt IE 8]><!-->
Julien Jorry committed
5
<html class="no-js" lang="fr-FR">
6 7
<!--<![endif]-->
<head>
Julien Jorry committed
8
	<meta charset="utf-8">
9 10
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
11 12 13
	<title>{{title|default('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') }}" />
14 15
    <meta name="mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-capable" content="yes">
16

17
    {# FAVICON #}
Julien Jorry committed
18 19 20 21 22 23
    {% block favicon %}
        <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">
    {% endblock favicon %}
24

25
	{# POUR AJOUTER DES META ( like og: ) #}
Julien Jorry committed
26
	{% block meta %} {% endblock meta %}
27 28 29 30 31

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

32
    <link rel="stylesheet" href="/leaflet/leaflet.css">
33 34 35 36 37
	{# POUR AJOUTER DES CSS #}
 	{% block css %} {% endblock css %}
</head>

<body>
38 39 40
    <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 43 44 45 46 47 48 49

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

    <!-- CONTAINER -->
    <div class="container">
50
        {% include 'common/flash-messages.html.twig' %}
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
        {% 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 %}

68
    {# AFFICHAGE DE LA MODALE DE CHOIX DU RÔLE (groupe associé aux rôles) #}
69
    {% if showModalGroupChoice() %}
70 71 72 73 74 75 76 77 78 79 80
        <script type="text/javascript">
            $(document).ready(function() {
                $('#roleGroupeModal').modal('show');
            });
        </script>
    {% endif %}
    <script type="text/javascript">
        $('.viewChoiceGroup').on('click', function () {
            $('#roleGroupeModal').modal('show');
        });
    </script>
81 82 83
    {# 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) {
84 85 86 87 88 89
        if ('serviceWorker' in navigator) {
            navigator.serviceWorker.register('/js/service-worker.js')
              .then(function(reg){
             }).catch(function(err) {
            });
        }
90 91
     }
    </script>
92

93 94 95
</body>

</html>