{% load rvtrans %}
<!-- les cookies consentement -->
<script>

    function checkCookies() {
        $.ajax({
                type: "GET",
                url: "/checkCookies",
                success: function (data) {
                    // alert(data)
                    if (data != "true") {
                        $("#cookies").show();
                    }
                    
                }

            });
    }

    function acceptMyConsentCookies() {
        var url = window.location.href
        $.ajax({
                type: "GET",
                url: "/saveCookies",
                data: 'choix=true'  ,
                beforeSend: function () {
                    $("#btnacceptecookies").html("En cours")
                },
                success: function (data) {
                    // alert(data)
                    if (data == "reload") {
                        $("#btnacceptecookies").html("ok")
                        goTo(url)
                    }
                    
                }

            });
    }

    setTimeout(checkCookies, 20000);
</script>

<div id="cookies" style="display: none;">
  <div style="width: 100%;height: 100%; background-color: #16264db4;z-index: 999999;position: fixed;top: 0;" class="overlay cookies-bande">
  
  </div>
  <div style="background-color: #16264D;width: 100%;color: white;position: fixed;bottom: 0;z-index: 9999999;">
      <div style="margin-left: auto;margin-right: auto" class="container my-3 ">
        {% rvtrans "Pour vous offrir une meilleure expérience, nous utilisons les cookies. "  rvlang 0 True %}  &nbsp;&nbsp; 
          <span id="btnacceptecookies" onclick="acceptMyConsentCookies()" style="cursor:pointer" class="tag is-primary is-medium  myTag2 px-4"><b>{% rvtrans "J'accepte"  rvlang 0 True %}</b> </span>
      </div>
  </div>
</div>