{% extends "base.html" %}
{% load i18n static %}
{% block header %}
{% include 'frags/header.html' %}
{% endblock%}
{% block content %}
<!--debut bloc content-->
{% if basket_confirmed %}
<div id="myModal" class="modal">
<div class="modal-content" >
<span class="close">×</span>
<h3 class="title--modal">Comment se déroule une réservation ?</h3>
<div class="modal__inner">
<p>Un e-mail est envoyé au(x) Commerçant(s), celui-ci s’occupera de votre commande et prendra contact avec vous.
C’est aussi simple que ça, alors n’hésite pas... Commande !</p>
</div>
</div>
</div>
{% endif %}
<section class="wrapper wrapper--centered section section--home">
<div class="column column--centered column--centered-w">
<img class="logo--big" src="{% static 'img/communes_et_commerces-logo.svg' %}" alt="Logo Communes et commerces">
<div class="title__commune-commerce">
<h1 class="title__medium title__medium--no-margin">Communes-Commerces.be</h1>
<p>L’annuaire des Commerces de votre Commune</p>
</div>
</div>
<div class="research wrapper--centered">
<div class="research__field--full">
<span class="research__btn"></span>
<select id="select-mun" class="input--select2--d-placeholder" data-placeholder="Choisis ta Commune ..." onchange="if (this.selectedIndex) window.location.href = this.value;">
<option></option>
{% for municipality in municipalities %}
<option value="{% url 'municipality' municipality.name municipality.postal_code %}">{{municipality.postal_code}} - {{municipality.name}}</option>
{% endfor %}
</select>
</div>
</div>
<p class="p--center">Le Commerce de qualité est le Commerce de proximité !</p>
</section>
<section class="wrapper wrapper--centered">
<h2 class="title__medium title__medium--small-margin text--center">Trouver les Commerces de ma région</h2>
<a class="text--center text--color link" title="Accéder à la liste des commerces complètes" href="{% url 'province' %}">Consulter la liste complètes des Communes</a>
<div class="list-municipality">
<ul>
{% for m in municipalities_index %}
<li>
<a title="Accéder à la commune {{m.name}}" href="{% url 'municipality' m.name m.postal_code%}">{{m.name}}</a>
</li>
{% endfor %}
</ul>
</div>
</section>
<!--fin bloc content-->
<script>
const modal = document.getElementById('myModal');
modal.style.display = "block";
// Get the <span> element that closes the modal
var span = document.getElementsByClassName("close")[0];
if (span) {
// When the user clicks on <span> (x), close the modal
span.onclick = function () {
modal.style.display = "none";
}
// When the user clicks anywhere outside of the modal, close it
window.onclick = function (event) {
if (event.target == modal) {
modal.style.display = "none";
}
}
}
</script>
<style>
/* The Modal (background) */
.modal {
display: block;
/* Hidden by default */
position: fixed;
/* Stay in place */
z-index: 1;
/* Sit on top */
padding-top: 100px;
/* Location of the box */
left: 0;
top: 0;
width: 100%;
/* Full width */
height: 100%;
/* Full height */
overflow: auto;
/* Enable scroll if needed */
background-color: rgb(0, 0, 0);
/* Fallback color */
background-color: rgba(0, 0, 0, 0.4);
/* Black w/ opacity */
}
/* Modal Content */
.modal-content {
background-color: #fefefe;
margin: auto;
padding: 20px;
border: 1px solid #888;
width: 50%;
}
/* The Close Button */
.close {
color: #aaaaaa;
float: right;
font-size: 28px;
font-weight: bold;
}
.close:hover,
.close:focus {
color: #000;
text-decoration: none;
cursor: pointer;
}
</style>
{% endblock %}
{% block footer %}
{% include 'frags/footer.html' %}
{% endblock %}