templates/test/index.html.twig line 1

  1. {% extends 'base.html.twig' %}
  2. {% block meta %}
  3.     <meta name="description"
  4.           content="Calculez votre thème numérologie gratuit avec l'application Logia. Découvrez l'influence des nombres sur votre vie en quelques minutes.">
  5. {% endblock %}
  6. {% block title %}Calcul de mon thème numérologique · Logia{% endblock %}
  7. {% block body %}
  8.     <section id="hero-section"
  9.              class="bg-glow animated-glow py-5 position-relative d-flex justify-content-center align-items-center">
  10.         <div class="bg-particles">
  11.         </div>
  12.         <div class="container py-5">
  13.             <div class="row">
  14.                 <div class="col col-lg-8 m-auto">
  15.                     <form class="glow-violet form-horizontal p-4 p-md-5 pt-1 pt-md-2" action="{{ path('testResults') }}"
  16.                           method="post">
  17.                         <h1 class="medium-title text-center pt-4 pb-3">Calculer mon thème</h1>
  18.                         <p>
  19.                             Il vous suffit de rentrer vos <span class="fw-bold">noms</span> et <span class="fw-bold">prénoms</span>
  20.                             ainsi que votre
  21.                             <span class="fw-bold">date de naissance</span>.
  22.                             Les calculs sont réalisés à partir de ces données et permettent de dresser <span
  23.                                     class="fw-bold">votre thème numérologique</span>.
  24.                         </p>
  25.                         <div class="pt-3 mt-5 mb-5">
  26.                             <div class="form-group">
  27.                                 <div class="row">
  28.                                     <div class="col-md-6">
  29.                                         <label for="firstnames" class="pb-3">Prénom(s) :</label>
  30.                                         <input required class="form-control" type="text" id="firstnames"
  31.                                                name="firstnames">
  32.                                     </div>
  33.                                     <div class="col-md-6">
  34.                                         <label for="names" class="pb-3">Nom(s) :</label>
  35.                                         <input required class="form-control" type="text" id="names" name="names">
  36.                                     </div>
  37.                                 </div>
  38.                                 <div class="mt-3">
  39.                                     <small class="fst-italic">Écrivez tous vos noms et prénoms.</small>
  40.                                 </div>
  41.                             </div>
  42.                             <div class="form-group mt-4">
  43.                                 <label for="birthdate" class="pb-3">Date de naissance :</label>
  44.                                 <input required class="form-control" type="date" id="birthdate" name="birthdate"
  45.                                        value="{{ "-20year"|date('Y-m-d') }}"
  46.                                        min="1923-01-01" max="{{ "now"|date('Y-m-d') }}">
  47.                             </div>
  48.                         </div>
  49.                         <div class="pt-4 d-flex justify-content-center">
  50.                             <button type="submit"
  51.                                     class="py-3 px-5 btn btn-gold rounded-pill text-beige fw-bold btn-hover-effect">
  52.                                 Calculer <span class="d-none d-sm-inline">mon thème</span>
  53.                             </button>
  54.                         </div>
  55.                     </form>
  56.                 </div>
  57.             </div>
  58.         </div>
  59.     </section>
  60.     <div id="loadingModal" class="modal fade bg-glow animated-glow-softer" style="z-index: 100000000000">
  61.         <!-- Modal content -->
  62.         <div class="modal-content modal-transition m-0 m-auto border-0 w-100 h-100 rounded-0 bg-particles opacity-100">
  63.             <span class="close">&times;</span>
  64.             <div class="m-auto p-3 d-flex justify-content-center align-items-center flex-column">
  65.                 <h3 class="m-0 fst-italic text-white">Calcul en cours</h3>
  66.                 <dotlottie-player src="https://lottie.host/eefac7be-0d95-4a21-ad60-21bb234ac075/W9Zk10fSKb.lottie"
  67.                                   background="transparent" speed="1" style="width: 100%; max-height: 425px" loop
  68.                                   autoplay></dotlottie-player>
  69.                 <p class="jsResponseText fst-italic text-white">Merci de patienter pendant que nous préparons votre thème
  70.                     numérologique...</p>
  71.             </div>
  72.         </div>
  73.     </div>
  74. {% endblock %}
  75. {% block javascripts %}
  76.     {{ parent() }}
  77.     <script>
  78.         document.addEventListener('DOMContentLoaded', function () {
  79.             // Get the modal
  80.             let modal = document.getElementById("loadingModal");
  81. // Get the button that opens the modal
  82.             let form = document.querySelector("form");
  83. // Get the <span> element that closes the modal
  84.             let span = document.getElementsByClassName("close")[0];
  85. // When the user clicks on the button, open the modal
  86.             form.onsubmit = function (e) {
  87.                 e.preventDefault();
  88.                 modal.style.display = "block";
  89.                 setTimeout(() => {
  90.                     modal.style.opacity = "1";
  91.                 }, 200)
  92.                 setTimeout(() =>
  93.                 {
  94.                     form.submit();
  95.                 }, 3000)
  96.             }
  97. // When the user clicks on <span> (x), close the modal
  98.             span.onclick = function () {
  99.                 modal.style.display = "none";
  100.                 setTimeout(() => {
  101.                     modal.style.opacity = "0";
  102.                 }, 300)
  103.             }
  104. // When the user clicks anywhere outside of the modal, close it
  105.             window.onclick = function (event) {
  106.                 if (event.target == modal) {
  107.                     modal.style.display = "none";
  108.                     setTimeout(() => {
  109.                         modal.style.opacity = "0";
  110.                     }, 300)
  111.                 }
  112.             }
  113.         }, false);
  114.     </script>
  115. {% endblock %}