templates/services/index.html.twig line 1

  1. {% extends 'base_footer.html.twig' %}
  2. {% block title %}{{ 'services.title'|trans }}{% endblock %}
  3. {% block body %}
  4.     <!-- En-tête -->
  5.     <div class="bg-gray-200 py-16 mb-8 text-center w-full">
  6.         <div class="container mx-auto px-4">
  7.             <h1 class="text-3xl font-bold">{{ 'services.header'|trans }}</h1>
  8.         </div>
  9.     </div>
  10.     <!-- Section Simplifiez la recherche de logement -->
  11.     <div class="py-16 mb-8 text-center">
  12.         <div class="container mx-auto px-4">
  13.             <h2 class="text-3xl font-bold mb-6 max-w-4xl mx-auto">{{ 'services.simplified_solution'|trans }}</h2>
  14.             <div class="max-w-3xl mx-auto space-y-4">
  15.                 <p>{{ 'services.simplified_solution_text_1'|trans|raw }}</p>
  16.                 <p>{{ 'services.simplified_solution_text_2'|trans|raw }}</p>
  17.             </div>
  18.         </div>
  19.     </div>
  20.     <div class="flex justify-center">
  21.     <hr class="my-6 border-gray-300 w-1/2">
  22. </div>
  23.     <!-- Section Locataires : Trouver un logement depuis l'étranger -->
  24.     <div class="py-16 mb-8 bg-white w-full">
  25.         <div class="container mx-auto px-4">
  26.             <div class="flex flex-col md:flex-row gap-12">
  27.                 <div class="md:w-1/2 flex items-center">
  28.                     <h2 class="text-3xl font-bold">{{ 'services.tenants_section_title'|trans }}</h2>
  29.                 </div>
  30.                 <div class="md:w-1/2">
  31.                     <p class="mb-6">{{ 'services.tenants_section_text'|trans }}</p>
  32.                     <ul class="list-disc pl-6 space-y-3">
  33.                         <li><strong>{{ 'services.simplified_search'|trans }}</strong> : {{ 'services.simplified_search_description'|trans }}</li>
  34.                         <li><strong>{{ 'services.accommodation_prereservation'|trans }}</strong> : {{ 'services.accommodation_prereservation_description'|trans }}</li>
  35.                         <li><strong>{{ 'services.final_booking'|trans }}</strong> : {{ 'services.final_booking_description'|trans }}</li>
  36.                         <li><strong>{{ 'services.dedicated_support'|trans }}</strong> : {{ 'services.dedicated_support_description'|trans }}</li>
  37.                     </ul>
  38.                     <br/>
  39.                     <h3 class="font-semibold mb-3">{{ 'services.useful_services'|trans }}</h3>
  40.                     <ul class="list-disc pl-6 space-y-3">
  41.                         <li><strong>{{ 'services.irrevocable_transfer_certificate'|trans }}</strong> : {{ 'services.irrevocable_transfer_certificate_description'|trans }}</li>
  42.                         <li><strong>{{ 'services.home_insurance'|trans }}</strong> : {{ 'services.home_insurance_description'|trans }}</li>
  43.                     </ul> <br>
  44.                     <div class="flex justify-center"> <br>
  45.                         {% if app.user %}
  46.                             {% if app.user.asRole('ROLE_TENANT') %}
  47.                                 <a href="{{ path('tenant_home') }}" class="inline-block bg-yellow-400 text-black font-semibold px-8 py-4 rounded-lg hover:bg-yellow-500 transition-colors">
  48.                                     {{ 'services.start_search'|trans }}
  49.                                 </a>
  50.                             {% elseif app.user.asRole('ROLE_LESSOR') or app.user.asRole('ROLE_LESSOR_RESIDENT') %}
  51.                                 <a href="{{ path('lessor-home') }}" class="inline-block bg-yellow-400 text-black font-semibold px-8 py-4 rounded-lg hover:bg-yellow-500 transition-colors">
  52.                                     {{ 'services.start_search'|trans }}
  53.                                 </a>
  54.                             {% endif %}
  55.                         {% else %}
  56.                             <button id="openModalLink1" class="inline-block bg-yellow-400 text-black font-semibold px-8 py-4 rounded-lg hover:bg-yellow-500 transition-colors">
  57.                                 {{ 'services.start_search'|trans }}
  58.                             </button>
  59.                         {% endif %}
  60.                     </div>
  61.                 </div>
  62.             </div>
  63.         </div>
  64.     </div>
  65.     <div class="flex justify-center">
  66.     <hr class="my-6 border-gray-300 w-1/2">
  67. </div>
  68.     <!-- Section Bailleurs : Gestion simplifiée -->
  69.     <div class="py-16 mb-8 bg-white w-full">
  70.         <div class="container mx-auto px-4">
  71.             <div class="flex flex-col md:flex-row gap-12">
  72.                 <div class="md:w-1/2 flex items-center">
  73.                     <h2 class="text-3xl font-bold">{{ 'services.landlords_section_title'|trans }}</h2>
  74.                 </div>
  75.                 <div class="md:w-1/2">
  76.                     <p class="mb-6">{{ 'services.landlords_section_text'|trans|raw }}</p>
  77.                     <ul class="list-disc pl-6 space-y-3">
  78.                         <li><strong>{{ 'services.detailed_listings'|trans }}</strong> : {{ 'services.detailed_listings_description'|trans }}</li>
  79.                         <li><strong>{{ 'services.complete_applications'|trans }}</strong> : {{ 'services.complete_applications_description'|trans }}</li>
  80.                         <li><strong>{{ 'services.simplified_selection'|trans }}</strong> : {{ 'services.simplified_selection_description'|trans }}</li>
  81.                         <li><strong>{{ 'services.dedicated_support'|trans }}</strong> : {{ 'services.dedicated_support_description'|trans }}</li>
  82.                     </ul>
  83.                     <br/>
  84.                     <div class="flex justify-center">
  85.                         {% if app.user %}
  86.                             {% if app.user.asRole('ROLE_LESSOR') or app.user.asRole('ROLE_LESSOR_RESIDENT') %}
  87.                                 <a href="{{ path('building_temp_step1', {'newBuilding': true}) }}" class="inline-block bg-yellow-400 text-black font-semibold px-8 py-4 rounded-lg hover:bg-yellow-500 transition-colors">
  88.                                     {{ 'services.create_listing'|trans }}
  89.                                 </a>
  90.                             {% elseif app.user.asRole('ROLE_TENANT') %}
  91.                                 <button id="openPopLink1" class="inline-block bg-yellow-400 text-black font-semibold px-8 py-4 rounded-lg hover:bg-yellow-500 transition-colors">
  92.                                     {{ 'services.create_listing'|trans }}
  93.                                 </button>
  94.                             {% else %}
  95.                                 <button id="openModalLink2" class="inline-block bg-yellow-400 text-black font-semibold px-8 py-4 rounded-lg hover:bg-yellow-500 transition-colors">
  96.                                     {{ 'services.create_listing'|trans }}
  97.                                 </button>
  98.                             {% endif %}
  99.                         {% else %}
  100.                             <button id="openModalLink2" class="inline-block bg-yellow-400 text-black font-semibold px-8 py-4 rounded-lg hover:bg-yellow-500 transition-colors">
  101.                                 {{ 'services.create_listing'|trans }}
  102.                             </button>
  103.                         {% endif %}
  104.                     </div>
  105.                 </div>
  106.             </div>
  107.         </div>
  108.     </div>
  109.     <!-- Modal de connexion/inscription -->
  110.     <div id="connectModal" class="fixed inset-0 bg-gray-500 bg-opacity-50 flex justify-center items-center hidden z-50">
  111.         <div class="bg-white p-6 rounded-lg shadow-lg max-w-sm w-full text-center">
  112.             <p class="text-lg font-semibold mb-4">{{ 'services.choose_option'|trans }}</p>
  113.             <button onclick="window.location.href='{{ path('app_login_site') }}'" class="bg-yellow-400 text-black px-4 py-2 rounded-lg font-semibold hover:bg-yellow-500 transition mb-2 w-full">
  114.                 {{ 'services.login'|trans }}
  115.             </button>
  116.             <button onclick="window.location.href='{{ path('app_register') }}'" class="bg-yellow-400 text-black px-4 py-2 rounded-lg font-semibold hover:bg-yellow-500 transition w-full">
  117.                 {{ 'services.register'|trans }}
  118.             </button>
  119.         </div>
  120.     </div>
  121.     <!-- Modal2 -->
  122.     <div id="connectPop" class="fixed inset-0 bg-gray-500 bg-opacity-50 flex justify-center items-center hidden z-50">
  123.         <div class="bg-white p-6 rounded-lg shadow-lg max-w-sm w-full text-center">
  124.             <p class="text-lg font-semibold mb-4">{{ 'services.please_login_as_landlord'|trans }}</p>
  125.             <button onclick="window.location.href='{{ path('app_login_site') }}'" class="bg-yellow-400 text-black px-4 py-2 rounded-lg font-semibold hover:bg-yellow-500 transition mb-2 w-full">
  126.                 {{ 'services.login'|trans }}
  127.             </button>
  128.         </div>
  129.     </div>
  130. {% endblock %}
  131. {% block javascripts %}
  132. <script>
  133. function toggleFaq(button) {
  134.     const content = button.nextElementSibling;
  135.     content.classList.toggle('hidden');
  136. }
  137. document.addEventListener('DOMContentLoaded', function () {
  138.     console.log('DOM fully loaded and parsed');
  139.     // Gestion du modal de connexion/inscription
  140.     const openModalElements = document.querySelectorAll('#openModalLink1, #openModalLink2');
  141.     const connectModal = document.getElementById('connectModal');
  142.     if (openModalElements.length > 0 && connectModal) {
  143.         openModalElements.forEach(element => {
  144.             element.addEventListener('click', function (event) {
  145.                 event.preventDefault();
  146.                 connectModal.classList.remove('hidden');
  147.             });
  148.         });
  149.         connectModal.addEventListener('click', function (event) {
  150.             if (event.target === connectModal) {
  151.                 connectModal.classList.add('hidden');
  152.             }
  153.         });
  154.         connectModal.querySelector('.bg-white').addEventListener('click', function (event) {
  155.             event.stopPropagation();
  156.         });
  157.     } else {
  158.         console.log('openModalElements or connectModal not found');
  159.     }
  160.     const openPopElements = document.querySelectorAll('#openPopLink1, #openPopLink2');
  161.     const connectPop = document.getElementById('connectPop');
  162.     if (openPopElements.length > 0 && connectPop) {
  163.         openPopElements.forEach(element => {
  164.             element.addEventListener('click', function (event) {
  165.                 event.preventDefault();
  166.                 connectPop.classList.remove('hidden');
  167.             });
  168.         });
  169.         connectPop.addEventListener('click', function (event) {
  170.             if (event.target === connectPop) {
  171.                 connectPop.classList.add('hidden');
  172.             }
  173.         });
  174.         connectPop.querySelector('.bg-white').addEventListener('click', function (event) {
  175.             event.stopPropagation();
  176.         });
  177.     } else {
  178.         console.log('openPopElements or connectPop not found');
  179.     }
  180. });
  181. </script>
  182. {% endblock %}