templates/home/home.html.twig line 1

Open in your IDE?
  1. {# <!DOCTYPE html>
  2. <html lang="en"> #}
  3. {% extends 'base.html.twig' %}
  4. {% block title %}Meilleur Agence de voyages en Tunisie - Rustica Voyages{% endblock %}
  5. {% block stylesheets %}
  6. <head>
  7.     <meta charset="UTF-8">
  8.     <title>Hotel List</title>
  9.     <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
  10.     <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.css" />
  11.     <link href="{{ asset('front/plugins/font-awesome-4.7.0/css/font-awesome.min.css') }}" rel="stylesheet" type="text/css">
  12.     <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/noUiSlider/14.6.4/nouislider.min.css" />
  13.     <link href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.13/css/select2.min.css" rel="stylesheet" />
  14.     <link rel="stylesheet" type="text/css" href="{{ asset('front/style/single_listing_style.css') }}">
  15.     <link rel="stylesheet" type="text/css" href="{{ asset('front/style/single_listing_responsive.css') }}">
  16.     <link rel="stylesheet" type="text/css" href="{{ asset('front/style/blog_style.css') }}">
  17.     <link rel="stylesheet" type="text/css" href="{{ asset('front/style/blog_responsive.css') }}">
  18.     <link href="{{ asset('front/searchbar/vendor/mdi-font/css/material-design-iconic-font.min.css') }}" rel="stylesheet" media="all">
  19.     <link href="{{ asset('front/searchbar/vendor/font-awesome-4.7/css/font-awesome.min.css') }}" rel="stylesheet" media="all">
  20.     <!-- Font special for pages-->
  21.     <link href="https://fonts.googleapis.com/css?family=Roboto:100,100i,300,300i,400,400i,500,500i,700,700i,900,900i" rel="stylesheet">
  22.     <!-- Vendor CSS-->
  23.     <link href="{{ asset('front/searchbar/vendor/select2/select2.min.css') }}" rel="stylesheet" media="all">
  24.     <link href="{{ asset('front/searchbar/vendor/datepicker/daterangepicker.css') }}" rel="stylesheet" media="all">
  25.     <!-- Main CSS-->
  26.     <link href="{{ asset('front/searchbar/css/main.css') }}" rel="stylesheet" media="all">
  27.     <!-- Modal Css -->
  28.     <link rel="stylesheet" href="{{ asset('front/modals/fonts/icomoon/stylecommons.css') }}">
  29.     <!-- Bootstrap CSS -->
  30.     <link rel="stylesheet" href="{{ asset('front/modals/css/bootstrapcss.min.css') }}">
  31.     <link rel="stylesheet" type="text/css" href="{{ asset('front/plugins/OwlCarousel2-2.2.1/owl.carousel.css') }}">
  32.     <link rel="stylesheet" type="text/css" href="{{ asset('front/plugins/OwlCarousel2-2.2.1/owl.theme.default.css') }}">
  33.     <link rel="stylesheet" type="text/css" href="{{ asset('front/plugins/OwlCarousel2-2.2.1/animate.css') }}">
  34.         <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/assets/owl.carousel.min.css">
  35.     <!-- Icons font CSS-->
  36.     <link href="{{ asset('searchbar/vendor/mdi-font/css/material-design-iconic-font.min.css') }}" rel="stylesheet" media="all">
  37.     <!-- Font special for pages-->
  38.     <link href="https://fonts.googleapis.com/css?family=Roboto:100,100i,300,300i,400,400i,500,500i,700,700i,900,900i" rel="stylesheet">
  39.     <!-- Vendor CSS-->
  40.     <link href="{{ asset('searchbar/vendor/select2/select2.min.css') }}" rel="stylesheet" media="all">
  41.     <!-- Main CSS-->
  42.     <link href="{{ asset('searchbar/css/main.css') }}" rel="stylesheet" media="all">
  43.     <style>
  44.         .hotel-container {
  45.             display: flex;
  46.             gap: 20px; /* Espacement entre les hôtels */
  47.             flex-wrap: wrap; /* Permet de revenir à la ligne si l'espace est insuffisant */
  48.         }
  49.         .modal .modal-content {
  50.             background-color: white;
  51.             border: none;
  52.             border-radius: 7px;
  53.         }
  54.         .modal .modal-content .modal-body {
  55.             background: #FFFFFF;
  56.             border: none;
  57.             border-radius: 7px;
  58.             overflow: hidden;
  59.             color: #fff;
  60.             padding-left: 35px;
  61.             padding-right: 16px;
  62.             -webkit-box-shadow: 0 10px 50px -10px rgba(0, 0, 0, 0.9);
  63.             box-shadow: none;
  64.         }
  65.         .hotel {
  66.             flex: 1;
  67.             min-width: 200px; /* Largeur minimale pour chaque hôtel */
  68.             max-width: 300px; /* Largeur maximale pour chaque hôtel */
  69.         }
  70.         .facilities {
  71.             margin-left: 20px;
  72.             list-style-type: none;
  73.             padding: 0;
  74.         }
  75.         .facilities li {
  76.             margin-bottom: 5px;
  77.         }
  78.         .room {
  79.             margin-bottom: 15px;
  80.             border: 1px solid #ddd;
  81.             padding: 10px;
  82.         }
  83.         .remove-room {
  84.             color: red;
  85.             cursor: pointer;
  86.             background-color: #FFFFFF;
  87.             border-color: #FFFFFF;
  88.             font-size: 18px;
  89.         }
  90.         .facility {
  91.             display: contents;
  92.             align-items: center;
  93.         }
  94.         .facility img {
  95.             margin-right: 10px;
  96.             width: 20px;
  97.             height: 20px;
  98.             filter: invert(54%) sepia(74%) saturate(1363%) hue-rotate(199deg) brightness(108%) contrast(107%)
  99.         }
  100.         .hotel1
  101.         {
  102.             width: auto;
  103.             margin-left: auto;
  104.             box-shadow: none;
  105.             border: 1px solid #cccccc;
  106.             border-radius: 25px;
  107.             height: 368px;
  108.             background-color: #0A6CA9;
  109.             color: #FFFFFF;
  110.         }
  111.         .hotel2
  112.         {
  113.             width: 22%;
  114.             margin-top: 453px;
  115.             margin-left: 15px;
  116.             box-shadow: none;
  117.             border-radius: 25px;
  118.             height: 368px;
  119.         }
  120.         .badge{
  121.             font-size: 80%;
  122.             font-weight: 600;
  123.             background-color: #b29b63;
  124.         }
  125.         .container{
  126.             max-width: 1440px;
  127.         }
  128.         .offers_item1{
  129.             position: relative;
  130.             width: 110%;
  131.             overflow: hidden;
  132.             box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
  133.             transition: all 300ms;
  134.             margin-bottom: 30px;
  135.             margin-left: -15px;
  136.             color: rgba(0, 0, 0, 0.87);
  137.             background: #fff;
  138.         }
  139.         .offers_item2{
  140.             position: relative;
  141.             width: 110%;
  142.             overflow: hidden;
  143.             box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
  144.             transition: all 300ms;
  145.             margin-bottom: 100px;
  146.             margin-left: -15px;
  147.             color: rgba(0, 0, 0, 0.87);
  148.             background: #fff;
  149.             border-radius: 20px;
  150.         }
  151.         h4 {
  152.             position: relative;
  153.             padding: 0;
  154.             margin: 0;
  155.             font-family: "Raleway", sans-serif;
  156.             font-weight: 600;
  157.             font-size: 24px;
  158.             color: #080808;
  159.             -webkit-transition: all 0.4s ease 0s;
  160.             -o-transition: all 0.4s ease 0s;
  161.             transition: all 0.4s ease 0s;
  162.         }
  163.         h4 span {
  164.             display: block;
  165.             font-size: 0.5em;
  166.             line-height: 1.3;
  167.         }
  168.         h4 em {
  169.             font-style: normal;
  170.             font-weight: 600;
  171.         }
  172.         .two h4 {
  173.             text-transform: capitalize;
  174.             margin: 15px;
  175.             color: #FFFFFF;
  176.         }
  177.         .two h4:before {
  178.             position: absolute;
  179.             left: 0;
  180.             bottom: 0;
  181.             width: 60px;
  182.             height: 2px;
  183.             content: "";
  184.             background-color: white;
  185.         }
  186.         .two h4 span {
  187.             font-size: 13px;
  188.             font-weight: 500;
  189.             text-transform: uppercase;
  190.             letter-spacing: 4px;
  191.             line-height: 3em;
  192.             padding-left: 0.25em;
  193.             color: rgba(0, 0, 0, 0.4);
  194.             padding-bottom: 10px;
  195.         }
  196.         .alt-two h4 {
  197.             text-align:center;
  198.         }
  199.         .alt-two h4:before {
  200.             left:50%; margin-left:-30px;
  201.         }
  202.         .mt-4, .my-4 {
  203.             margin-top: -5.5rem !important;
  204.         }
  205.         /* Style personnalisé pour noUiSlider */
  206.         .noUi-target {
  207.             background: #f0f0f0;
  208.             border: 1px solid #ccc;
  209.             border-radius: 5px;
  210.         }
  211.         .noUi-horizontal {
  212.             height: 10px;
  213.         }
  214.         .noUi-handle {
  215.             width: 20px;
  216.             height: 20px;
  217.             background: #0A6CA9;
  218.             border: 2px solid #fff;
  219.             border-radius: 50%;
  220.             box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  221.         }
  222.         .noUi-connect {
  223.             background: #0A6CA9;
  224.             height: 10px;
  225.         }
  226.         .noUi-tooltip {
  227.             background: #0A6CA9;
  228.             color: #fff;
  229.             border-radius: 3px;
  230.             padding: 5px;
  231.             font-size: 12px;
  232.             box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  233.         }
  234.         @media (min-width: 576px) {
  235.             .modal-dialog {
  236.                 max-width: 800px;
  237.                 margin: 1.75rem auto;
  238.             }
  239.         }
  240.         .card-7 {
  241.             background: transparent;
  242.             position: relative;
  243.             border: none;
  244.             margin-top: 25px;
  245.         }
  246.         .input--large {
  247.             width: 300px;
  248.             height: 80px;
  249.         }
  250.         .input--medium {
  251.             width: 280px;
  252.             height: 80px;
  253.         }
  254.         .form-group1 {
  255.             margin-top: -10px;
  256.         }
  257.         .bg-color-1 {
  258.             background: transparent;
  259.         }
  260.         .p-t-395 {
  261.             padding-top: 95px;
  262.         }
  263.         .page-wrapper {
  264.             min-height: 0vh;
  265.         }
  266.         .box-area{
  267.             display: inline-flex;
  268.             flex-wrap: wrap;
  269.             justify-content: left;
  270.             align-items: left;
  271.             margin-top: 70px;
  272.             margin-left: 25px;
  273.         }
  274.         .single-box{
  275.             position: relative;
  276.             display: flex;
  277.             flex-direction: column;
  278.             align-items: left;
  279.             justify-content: left;
  280.             width: 320px;
  281.             height: 360px;
  282.             border-radius: 4px;
  283.             background-color: #fff;
  284.             text-align: left;
  285.             margin: 6px;
  286.             padding: 20px;
  287.             transition: .3s;
  288.             box-shadow: 1px 0 5px 0 rgba(0,0,0,0.6) ;
  289.         }
  290.         .img-area{
  291.             display: flex;
  292.             justify-content: center;
  293.             align-items: center;
  294.             width: 80px;
  295.             height:80px;
  296.             border: 6px solid #ddd;
  297.             border-radius: 50%;
  298.             margin-bottom: 10px;
  299.             padding: 20px;
  300.             background-size: cover;
  301.             background-position: center center;
  302.         }
  303.         .single-box:nth-child(1) .img-area{
  304.             background-image: url(https://images.pexels.com/photos/1222271/pexels-photo-1222271.jpeg?auto=compress&cs=tinysrgb&w=600);
  305.         }
  306.         .single-box:nth-child(2) .img-area{
  307.             background-image: url(https://images.pexels.com/photos/1239291/pexels-photo-1239291.jpeg?auto=compress&cs=tinysrgb&w=600);
  308.         }
  309.         .single-box:nth-child(3) .img-area{
  310.             background-image: url(https://images.pexels.com/photos/35537/child-children-girl-happy.jpg?auto=compress&cs=tinysrgb&w=600);
  311.         }
  312.         .header-text{
  313.             font-size: 24px;
  314.             font-weight: 500px;
  315.             line-height: 48px;
  316.         }
  317.         .img-text h3{
  318.             margin: 10px 0;
  319.         }
  320.         .img-text p{
  321.             font-size: 15px;
  322.             font-weight: 400px;
  323.             line-height: 30px;
  324.         }
  325.         
  326.         .single-box:hover .line{
  327.             background-color: #fff;
  328.         }
  329.         .childrenAgesContainer{
  330.             display: flex;
  331.             margin-left: 18px;
  332.         }
  333.         .btn-primary {
  334.             color: #fff;
  335.             background-color: #17a2b8;
  336.             border-color: #17a2b8;
  337.             width: 60%;
  338.             margin-top: 10px;
  339.         }
  340.         .owl-theme .owl-dots {
  341.             text-align: center;
  342.             -webkit-tap-highlight-color: transparent;
  343.             display: none;
  344.         }
  345.         .owl-theme .owl-nav {
  346.             margin-top: 10px;
  347.             text-align: center;
  348.             -webkit-tap-highlight-color: transparent;
  349.             z-index: 10000;
  350.             background: red;
  351.             display: none;
  352.         }
  353.         .cta {
  354.             padding-top: 190px;
  355.             padding-bottom: 183px;
  356.             background: linear-gradient(to right, #b29b63, #0093a9);
  357.         }
  358.         .search_tab.active {
  359.             background: linear-gradient(to right, #b29b63, #0093a9);
  360.             color: #FFFFFF;
  361.         }
  362.         .search_tab:hover {
  363.             background: linear-gradient(to right, #0093a9, #b29b63);
  364.             color: #FFFFFF;
  365.         }
  366.         .content {
  367.             max-height: 3em; /* Limite initiale de hauteur en fonction du nombre de lignes */
  368.             overflow: hidden;
  369.         }
  370.         .expanded {
  371.             max-height: none; /* Agrandir la hauteur lorsque le paragraphe est étendu */
  372.         }
  373.         .read-more {
  374.             cursor: pointer;
  375.             color: blue;
  376.         }
  377.         .home_slider_background {
  378.             height: 80;
  379.             width: 100%;
  380.             background-size: cover;
  381.             background-position: center center;
  382.             background-repeat: no-repeat;
  383.             margin-top:40px;
  384.         }
  385.         .offers_price {
  386.             display: inline-block;
  387.             font-size: 29px;
  388.             font-weight: 700;
  389.             color: #ff9100;
  390.             line-height: 25px;
  391.         }
  392.         .offers_price a{
  393.             display: inline-block;
  394.             font-size: 22px;
  395.             font-weight: 700;
  396.             color: #0093a9;
  397.             line-height: 25px;
  398.         }
  399.         .offer_name{
  400.             display: block;
  401.             font-size: 22px;
  402.             font-weight: 700;
  403.             background: #0093a9;
  404.             color: #FFFFFF;
  405.             width: 310px;
  406.             line-height: 35px;
  407.             padding-left: 12px;
  408.         }
  409.         .offers_item {
  410.             border-radius: 12px;
  411.             overflow: hidden;
  412.             position: relative;
  413.             box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
  414.             transition: all 300ms;
  415.         }
  416.         .offers_item:hover {
  417.             transform: translateY(-2px);
  418.             box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
  419.         }
  420.         .offers_image_background {
  421.             position: relative;
  422.             margin: auto;
  423.             overflow: hidden;
  424.         }
  425.         .offers_image_background img {
  426.             max-width: 100%;
  427.             transition: all 0.3s;
  428.             display: block;
  429.             transform: scale(1);
  430.         }
  431.         .offers_image_background:hover img {
  432.             transform: scale(1.1);
  433.         }
  434.         .offers_content {
  435.             margin-top: 22px;
  436.             margin-left: 17px;
  437.             margin-bottom: 22px;
  438.             margin-right: 17px;
  439.         }
  440.         .offers_link {
  441.             margin-top: 24px;
  442.         }
  443.          .intro_price {
  444.              font-size: 20px;
  445.              font-weight: 600;
  446.              color: #FFFFFF;
  447.              margin-top: -4px;
  448.          }
  449.          
  450.          .intro{
  451.             padding-bottom: 50px;
  452.          }
  453.         .button a:hover {
  454.             background-color: #ff9100;
  455.             color: white;
  456.         }
  457.         .btn-primary :hover {
  458.             color: #fff;
  459.             background-color: #ff9100;
  460.             border-color: #ff9100;
  461.         }
  462.         .ctaBackground {
  463.             position: absolute;
  464.             top: 0;
  465.             left: 0;
  466.             width: 100%;
  467.             height: 210%;
  468.             background-repeat: no-repeat;
  469.             background-size: cover;
  470.             background-position: center center;
  471.             opacity: 0.27;
  472.         }
  473.         img {
  474.             max-width: 100%;
  475.             height: 100%;
  476.         }
  477.         .container {
  478.             max-width: 1440px!important;
  479.         }
  480.         .main_nav_item a {
  481.             font-family: 'Open Sans', sans-serif;
  482.             font-size: 15px;
  483.             font-weight: 700;
  484.             color: #0093a9!important;
  485.             text-transform: uppercase;
  486.             padding-bottom: 10px;
  487.             padding-top: 10px;
  488.         }
  489.         .main_nav_item::after {
  490.             display: block;
  491.             position: absolute;
  492.             left: -1px;
  493.             bottom: -11px;
  494.             width: calc(100% + 2px);
  495.             height: 2px;
  496.             background: linear-gradient(to right, #b29b63, #0093a9)!important;
  497.             content: '';
  498.             opacity: 0;
  499.             -webkit-transition: all 200ms ease;
  500.             -moz-transition: all 200ms ease;
  501.             -ms-transition: all 200ms ease;
  502.             -o-transition: all 200ms ease;
  503.             transition: all 200ms ease;
  504.         }
  505.         .section-title h2 {
  506.             text-align: center;
  507.             font-size: 18px;
  508.             font-weight: 600;
  509.             text-transform: uppercase;
  510.             padding-bottom: 6px;
  511.             color: #000;
  512.             letter-spacing: 0.3px;
  513.             padding: 0;
  514.         }
  515.         .section-title::after {
  516.             content: "";
  517.             height: 3px;
  518.             background: #fbb900;
  519.             width: 80px;
  520.             position: absolute;
  521.             left: 0;
  522.             right: 0;
  523.             margin: auto;
  524.         }
  525.         /****************/
  526.         /*     BX-SLIDER     */
  527.         /****************/
  528.        /* section.client {
  529.             padding:4em 0em;
  530.         }*/
  531.         section.client .section-title {
  532.             margin-bottom: 6em;
  533.         }
  534.         .bx-controls {
  535.             position: relative;
  536.         }
  537.         .bx-wrapper{
  538.             margin: auto;
  539.             margin-top: 70px;
  540.         }
  541.         .bx-wrapper .bx-pager {
  542.             text-align: center;
  543.             padding-top: 30px;
  544.             display: none;
  545.         }
  546.         .bx-wrapper .bx-pager .bx-pager-item, .bx-wrapper .bx-controls-auto .bx-controls-auto-item {
  547.             display: inline-block;
  548.             *zoom: 1;
  549.             *display: inline;
  550.         }
  551.         .bx-wrapper .bx-pager.bx-default-pager a {
  552.             background: #666;
  553.             text-indent: -9999px;
  554.             display: block;
  555.             width: 10px;
  556.             height: 10px;
  557.             margin: 0 5px;
  558.             outline: 0;
  559.             -moz-border-radius: 5px;
  560.             -webkit-border-radius: 5px;
  561.             border-radius: 5px;
  562.         }
  563.         
  564.         /**/
  565.         
  566.                /* Default styles */
  567.         .filter {
  568.             background: #f3f6f9;
  569.             margin-top: -24px;
  570.         }
  571.         .container {
  572.             padding: 0 15px;
  573.             margin: 0 auto;
  574.         }
  575.         .card {
  576.             border: none;
  577.             background: transparent;
  578.             width: 100%;
  579.            /* max-width: 1070px;*/
  580.             margin: 0 auto;
  581.         }
  582.         .card-body {
  583.             margin-top: 25px;
  584.         }
  585.         .input-group {
  586.             width: calc(25% - 20px);
  587.             max-width: 300%;
  588.             margin-bottom: 10px;
  589.         }
  590.         .input-group1 {
  591.             width: calc(25% - 20px);
  592.             max-width: 300%;
  593.             margin-bottom: 10px;
  594.         }
  595.         .input-group2 {
  596.             width: calc(25% - 20px);
  597.             max-width: 300%;
  598.             margin-bottom: 10px;
  599.         }
  600.         .label {
  601.             color: black;
  602.             font-weight: 500;
  603.             display: block;
  604.         }
  605.         .btn-submit {
  606.             font-size: 16px;
  607.             font-weight: 500;
  608.             border: 1px solid black;
  609.             background: #FFFFFF;
  610.             color: black;
  611.             margin-bottom: 10px;
  612.             max-width:335px;
  613.         }
  614.         /* Media Queries */
  615.         @media screen and (max-width: 768px) {
  616.             .input-group {
  617.                 width: 97%!important;
  618.                 max-width: none;
  619.             }
  620.             .btn-submit {
  621.                 width: 97%!important;
  622.             }
  623.             .nuite{
  624.                 width: 23%!important;
  625.                 max-width: none;
  626.             }
  627.             .arr{
  628.                 width: 70%!important;
  629.                 max-width: none;
  630.             }
  631.             .form{
  632.                 margin-left: 11px!important;
  633.             }
  634.                 .home_slider_container{
  635.                 display:none;
  636.             }
  637.             .form-group1 {
  638.                 margin-top: -11px!important;
  639.                 margin-left: -15px!important;
  640.             }
  641.             .lnuite{
  642.                 margin-left: -14px!important;
  643.             }
  644.             .inuite{
  645.                 margin-left: 20px!important;
  646.             }
  647.             .iarr{
  648.                 margin-left: 7px!important;
  649.             }
  650.             .larr{
  651.                 margin-left: -8px!important;
  652.             }
  653.             #addRoomButton{
  654.                 font-size: 14px!important;
  655.             }
  656.             .daterangepicker {
  657.                 width: 290px!important;
  658.                 left:60px!important;
  659.                 top:280px!important;
  660.             }
  661.             .cta{
  662.             display:none;
  663.             }
  664.             .filter{margin-top:-140px;}
  665.             .offers{padding-top:55px;}
  666.             .intro{padding-top:55px;}
  667.             .section_title{font-size:20px !important;}
  668.             .offers_items {
  669.                 margin-top: 30px;
  670.             }
  671.             .intro_col
  672.             {
  673.                 min-width: 395px;
  674.                 margin-left: -45px;
  675.             }
  676.             .banniere
  677.             {
  678.                 width:100%;
  679.                 height:50%!important;
  680.             }
  681.         }
  682.         .home_slider_container {
  683.     position: absolute;
  684.     top: 0;
  685.     left: 0;
  686.     width: 100%;
  687.     height: 100%;
  688.     z-index: 10;
  689.     background: #ffffff;
  690. }
  691. .home_slider_background{
  692.     opacity: unset
  693. }
  694. .input--style-1 {
  695.     font-size: 16px;
  696.     padding: 9px 0;
  697.     color: #666;
  698.     font-family: "Roboto", "Arial", "Helvetica Neue", sans-serif;
  699. }
  700. .daterangepicker {
  701.     width: 490px;
  702. }
  703. .card1 {
  704.             position: relative;
  705.             display: inline-block;
  706.             width: 330px;
  707.             margin-left: 30px;
  708.             background: #FFF;
  709.             box-shadow: 0px 15px 30px 0px rgba(25, 27, 42, 0.05);
  710.         }
  711.         .card1__love-btn {
  712.             position: absolute;
  713.             top: 22px;
  714.             right: 22px;
  715.             display: grid;
  716.             place-items: center;
  717.             width: 44px;
  718.             height: 44px;
  719.             border-radius: 50%;
  720.             background: #fff;
  721.             border: none;
  722.             cursor: pointer;
  723.         }
  724.         .card1__love-btn svg {
  725.             width: 20px;
  726.             fill: #FF6A8E;
  727.         }
  728.         .card1__img {
  729.             width: 100%;
  730.             height: 245px;
  731.             object-fit: cover;
  732.         }
  733.         .card1__body {
  734.             padding: 1px 10px 5px 15px;
  735.         }
  736.         .card1__title {
  737.             font-size: 18px;
  738.             font-weight: 600;
  739.         }
  740.         .card1__text {
  741.             padding-top: 8px;
  742.             padding-bottom: 24px;
  743.             color: #5A5A5A;
  744.             font-size: 14px;
  745.             font-weight: 400;
  746.             line-height: 170%;
  747.         }
  748.         .card1__footer {
  749.             display: flex;
  750.             align-items: center;
  751.             justify-content: space-between;
  752.             margin-top:-20px;
  753.         }
  754.         .card1__footer .price {
  755.             display: contents;
  756.             font-size: 20px;
  757.             font-weight: 600;
  758.             color: black;
  759.         }
  760.         .test {
  761.             display: flex;
  762.             gap: 7px;
  763.             align-items: center;
  764.             padding: 7px 24px;
  765.             color: #000;
  766.             font-size: 15px;
  767.             font-weight: 500;
  768.             line-height: 170%;
  769.             border: none;
  770.             outline: none;
  771.             border-radius: 5px;
  772.             background: transparent;
  773.             margin-left:-25px;
  774.             cursor: pointer;
  775.         }
  776.     </style>
  777. </head>
  778. {% endblock %}
  779. {% block body %}
  780.     <div class="home" style="height: 100px;">
  781.     </div>
  782.     <!-- Blog -->
  783.     <div class="cta">
  784.         <div class="home_slider_container" style="height: 132%">
  785.             {# <div class="owl-carousel owl-theme home_slider">
  786.                 {% for b in banniere%}
  787.                 <div class="owl-item home_slider_item">
  788.                     <div class="home_slider_background">
  789.                         {% for img in b.imagesbannieres %}
  790.                                 <img class="banniere" src="{{ asset('./rusticav/public/uploads/bannieres/'~img.name) }}" alt="" width="100%" height="74%" />
  791.                         {% endfor %}
  792.                     </div>
  793.                 </div>
  794.                 {% endfor %}
  795.             </div> #}
  796.             <div class="owl-carousel owl-theme home_slider">
  797.             {% for b in banniere%}
  798.             <div class="owl-carousel owl-theme home_slider">
  799.                 <div class="home_slider_background">
  800.                     {% for img in b.imagesbannieres %}
  801.                     <img class="banniere" src="{{ asset('./rusticav/public/uploads/bannieres/'~img.name) }}" alt="" width="100%" height="74%" />
  802.                     {% endfor %}
  803.                 </div>
  804.             </div>
  805.             {% endfor %}
  806.         </div>
  807.             <!-- Home Slider Nav - Prev -->
  808.             <div class="home_slider_nav home_slider_prev">
  809.                 <svg version="1.1" id="Layer_2" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
  810.                      width="28px" height="33px" viewBox="0 0 28 33" enable-background="new 0 0 28 33" xml:space="preserve">
  811.                     <defs>
  812.                         <linearGradient id='home_grad_prev'>
  813.                             <stop offset='0%' stop-color='#fa9e1b'/>
  814.                             <stop offset='100%' stop-color='#8d4fff'/>
  815.                         </linearGradient>
  816.                     </defs>
  817.                     <path class="nav_path" fill="#F3F6F9" d="M19,0H9C4.029,0,0,4.029,0,9v15c0,4.971,4.029,9,9,9h10c4.97,0,9-4.029,9-9V9C28,4.029,23.97,0,19,0z
  818.                     M26,23.091C26,27.459,22.545,31,18.285,31H9.714C5.454,31,2,27.459,2,23.091V9.909C2,5.541,5.454,2,9.714,2h8.571
  819.                     C22.545,2,26,5.541,26,9.909V23.091z"/>
  820.                     <polygon class="nav_arrow" fill="#F3F6F9" points="15.044,22.222 16.377,20.888 12.374,16.885 16.377,12.882 15.044,11.55 9.708,16.885 11.04,18.219
  821.                     11.042,18.219 "/>
  822.                 </svg>
  823.             </div>
  824.             <!-- Home Slider Nav - Next -->
  825.             <div class="home_slider_nav home_slider_next">
  826.                 <svg version="1.1" id="Layer_3" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
  827.                      width="28px" height="33px" viewBox="0 0 28 33" enable-background="new 0 0 28 33" xml:space="preserve">
  828.                     <defs>
  829.                         <linearGradient id='home_grad_next'>
  830.                             <stop offset='0%' stop-color='#fa9e1b'/>
  831.                             <stop offset='100%' stop-color='#8d4fff'/>
  832.                         </linearGradient>
  833.                     </defs>
  834.                     <path class="nav_path" fill="#F3F6F9" d="M19,0H9C4.029,0,0,4.029,0,9v15c0,4.971,4.029,9,9,9h10c4.97,0,9-4.029,9-9V9C28,4.029,23.97,0,19,0z
  835.                 M26,23.091C26,27.459,22.545,31,18.285,31H9.714C5.454,31,2,27.459,2,23.091V9.909C2,5.541,5.454,2,9.714,2h8.571
  836.                 C22.545,2,26,5.541,26,9.909V23.091z"/>
  837.                     <polygon class="nav_arrow" fill="#F3F6F9" points="13.044,11.551 11.71,12.885 15.714,16.888 11.71,20.891 13.044,22.224 18.379,16.888 17.048,15.554
  838.                 17.046,15.554 "/>
  839.                 </svg>
  840.             </div>
  841.         </div>
  842.     </div>
  843.     <!-- Inclure jQuery (nécessaire pour Owl Carousel) -->
  844. <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
  845. <!-- Inclure le fichier JavaScript de Owl Carousel -->
  846. <script src="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/owl.carousel.min.js"></script>
  847. <script>
  848.     $(document).ready(function(){
  849.         // Initialisez le carrousel avec Owl Carousel
  850.         $('.home_slider').owlCarousel({
  851.             loop: true,
  852.             items: 1,
  853.             autoplay: true,
  854.             autoplayTimeout: 5000, // Durée entre chaque diapositive en millisecondes (5 secondes)
  855.             autoplayHoverPause: true, // Mettre en pause le carrousel lorsque survolé
  856.             nav: true, // Activer les flèches de navigation
  857.             dots: true // Activer les points de navigation
  858.         });
  859.         // Écoutez l'événement 'changed.owl.carousel' pour détecter le changement de diapositive
  860.         $('.home_slider').on('changed.owl.carousel', function(event) {
  861.             var currentSlide = event.item.index;
  862.             var slideCount = event.item.count;
  863.             if (currentSlide === slideCount - 1) {
  864.                 // Si c'est la dernière diapositive, retournez à la première diapositive
  865.                 $('.home_slider').trigger('to.owl.carousel', [0, 500]);
  866.             }
  867.         });
  868.     });
  869. </script>
  870. </div>
  871. <br><br><br><br><br><br><br><br>
  872.     <div class="filter">
  873.         <div class="container">
  874.             
  875.                     <div class="card card-7">
  876.                         <div class="card-body">
  877.                             <form class="form" id="searchForm" style="margin-left:60px;margin-top:-15px">
  878.                                 <div class="input-group input--medium">
  879.                                     <label  class="label" for="city">Destination</label>
  880.                                     <select id="city" name="city" class="input--style-1" style="margin-top: -6px;border: none;width: 80%"  required>
  881.                                         <option value="">Choisir une ville</option>
  882.                                         {% for cityId, cityName in cities %}
  883.                                             <option value="{{ cityId }}" {% if city == cityId %}selected{% endif %}>{{ cityName }}</option>
  884.                                         {% endfor %}
  885.                                     </select>
  886.                                 </div>
  887.                                 <div class="input-group input--medium arr">
  888.                                     <label class="larr">Arrivée - Départ</label>
  889.                                     <div class="form-group1">
  890.                                         <input type="text" class="input--style-1 iarr" name="daterange" id="daterange" required/>
  891.                                     </div>
  892.                                 </div>
  893.                                 <div class="input-group input--medium nuite" style="width:90px">
  894.                                     <label class="lnuite">Nuitée</label>
  895.                                     <div class="form-group1">
  896.                                         <input type="text" class="input--style-1 inuite" id="nightsCount" readonly/>
  897.                                     </div>
  898.                                 </div>
  899.                                 <button class="btn-submit" type="button" id="addRoomButton" data-toggle="modal" data-target="#roomModal" style="background: #FFFFFF"><i class="fa fa-bed"></i> une chambre: 2 adultes</button>
  900.                                 <button class="btn-submit" type="submit" style="background: #17a2b8;color: #FFFFFF">Rechercher</button>
  901.                             </form>
  902.                         </div>
  903.                     </div>
  904.                 
  905.         </div>
  906.     </div>
  907. <!-- The Modal -->
  908. <div class="modal fade" id="roomModal" tabindex="-1" role="dialog" aria-labelledby="roomModalLabel" aria-hidden="true">
  909.     <div class="modal-dialog" role="document">
  910.         <div class="modal-content">
  911.             <div class="modal-header">
  912.                 <h5 class="modal-title" id="roomModalLabel">Chambre & Occupation</h5>
  913.                 <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  914.                     <span aria-hidden="true">&times;</span>
  915.                 </button>
  916.             </div>
  917.             <div class="modal-body">
  918.                 <div id="roomsContainer">
  919.                     {% for room in rooms %}
  920.                         <div class="room mb-3">
  921.                             <div class="form-row align-items-center">
  922.                                 <div class="col-md-3">
  923.                                     <label for="adultCount"style="color: black">Adulte(s):</label>
  924.                                     <input type="number" class="form-control adultCount" name="adultCount[]" min="1" required value="{{ room.Adult }}">
  925.                                 </div>
  926.                                 <div class="col-md-3">
  927.                                     <label for="childCount"style="color: black">Enfant(s):</label>
  928.                                     <input type="number" class="form-control childCount" name="childCount[]" min="0" value="{{ room.Child is defined ? room.Child|length : 0 }}">
  929.                                 </div>
  930.                                 <div class="col-md-5">
  931.                                         <div class="childrenAgesContainer">
  932.                                             {% if room.Child is defined %}
  933.                                                 {% for age in room.Child %}
  934.                                                     <div class="col-md-3">
  935.                                                         <label for="childAge{{ loop.index }}" style="color: black;width: 104%">Âge {{ loop.index }}</label>
  936.                                                         <select id="childAge{{ loop.index }}" style="width: 60px" class="form-control childrenAges" name="childrenAges[]">
  937.                                                             <option value="" disabled>Sélectionner l'âge</option>
  938.                                                             {% for i in 1..17 %}
  939.                                                                 <option value="{{ i }}" {% if age == i %}selected{% endif %}>{{ i }}</option>
  940.                                                             {% endfor %}
  941.                                                         </select>
  942.                                                     </div>
  943.                                                 {% endfor %}
  944.                                             {% endif %}
  945.                                         </div>
  946.                                     </div>
  947.                                 <div class="col-md-1 text-right">
  948.                                     <button type="button" class="btn btn-danger btn-sm remove-room" data-room-id="{{ loop.index }}">
  949.                                         <i class="fa fa-trash"></i>
  950.                                     </button>
  951.                                 </div>
  952.                             </div>
  953.                         </div>
  954.                     {% else %}
  955.                         <div class="room mb-3">
  956.                             <div class="form-row align-items-center">
  957.                                 <div class="col-md-3">
  958.                                     <label for="adultCount" style="color: black">Adulte(s):</label>
  959.                                     <input type="number" class="form-control adultCount" name="adultCount[]" min="1" required value="2">
  960.                                 </div>
  961.                                 <div class="col-md-3">
  962.                                     <label for="childCount" style="color: black">Enfant(s):</label>
  963.                                     <input type="number" class="form-control childCount" name="childCount[]" min="0" value="0">
  964.                                 </div>
  965.                                 <div class="row">
  966.                                     <div class="col-md-5">
  967.                                         <div class="childrenAgesContainer">
  968.                                             <!-- This container will be populated dynamically -->
  969.                                         </div>
  970.                                     </div>
  971.                                     <div class="col-md-1 text-right">
  972.                                         <button type="button" class="btn btn-danger btn-sm remove-room" data-room-id="{{ loop.index }}">
  973.                                             <i class="fa fa-trash"></i>
  974.                                         </button>
  975.                                     </div>
  976.                                 </div>
  977.                             </div>
  978.                         </div>
  979.                     {% endfor %}
  980.                 </div>
  981.                 <button type="button" class="btn btn-secondary" id="addMoreRoomButton">Add More Room</button>
  982.             </div>
  983.             <div class="modal-footer">
  984.                 <button type="button" class="btn btn-primary" id="saveRoomButton" data-dismiss="modal">Save</button>
  985.             </div>
  986.         </div>
  987.     </div>
  988. </div>
  989. <div id="content">
  990.     <div style="display: none">
  991.         {{ content|raw }}
  992.     </div>
  993. </div>
  994. <br><br><br><br>
  995.     <div class="offers">
  996.         <div class="container">
  997.             <div class="row">
  998.                 <div class="col text-center">
  999.                     <h2 class="section_title">Nos Meilleurs Hôtels en Tunisie</h2>
  1000.                 </div>
  1001.             </div>
  1002.             <div class="row offers_items">
  1003.                 <div id="test">
  1004.                     <div style="display: none">
  1005.                         {{ test|raw }}
  1006.                     </div>
  1007.                 </div>
  1008.             </div>
  1009.         </div>
  1010.     </div>
  1011.     <div class="cta">
  1012.         <div class="cta_background" style="background-image:url(./front/images/Slider_3.png);opacity: unset ; background-size: cover;background-position: center;width: 100%;"></div>
  1013.         <div class="container">
  1014.             <div class="row">
  1015.                 <div class="col">
  1016.                 </div>
  1017.             </div>
  1018.         </div>
  1019.     </div>
  1020.     <!-- Intro -->
  1021.     
  1022.     <div class="intro">
  1023.         <div class="container">
  1024.             <div class="row">
  1025.                 <div class="col text-center">
  1026.                     <h2 class="section_title" style="font-size: 33px;color: #0093a9">Croisière</h2>
  1027.                 </div>
  1028.             </div>
  1029.             <div class="intro">
  1030.                 <div class="container mt-4">
  1031.                     <div class="row intro_items" style="margin-top: -100px; margin-left:20px;">
  1032.                         {% for c in croisiere|slice(0, 3) %}
  1033.                             <div class="col-lg-4 intro_col">
  1034.                                 <div class="intro_item" style="width: 90%;height: 400px;box-shadow: 0 16px 38px -12px rgba(0, 0, 0, 0.56), 0 4px 25px 0px rgba(0, 0, 0, 0.12), 0 8px 10px -5px rgba(0, 0, 0, 0.2);">
  1035.                                     <div class="intro_item_overlay" style="background: #301c405c"></div>
  1036.                                     <div class="intro_item_background">
  1037.                                         {% for img in c.imagescroisieres %}
  1038.                                             {% if loop.first %}
  1039.                                                 <img src="{{ asset('./rusticav/public/uploads/croisieres/'~img.name) }}" alt="" width="100%" height="100%" />
  1040.                                             {% endif %}
  1041.                                         {% endfor %}
  1042.                                     </div>
  1043.                                     <div class="intro_item_content d-flex flex-column align-items-center justify-content-center" style="margin-top: 60px;">
  1044.                                         <div class="button intro_button" style="margin-bottom: -5px;">
  1045.                                             <div class="button_bcg" style="background: #0093a9;"></div>
  1046.                                             <a href="{{ path('details', {'croisiereId': c.id}) }}" style="font-size: 14px">
  1047.                                                 Voir plus<span></span><span></span><span></span>
  1048.                                             </a>
  1049.                                         </div>
  1050.                                         <div class="intro_center text-center">
  1051.                                             <a href="{{ path('details', {'croisiereId': c.id}) }}" style="color:#000;font-size: 23px"><h1 style="font-size: 34px;text-transform: uppercase">{{c.name}}</h1></a>
  1052.                                         </div>
  1053.                                     </div>
  1054.                                 </div>
  1055.                             </div>
  1056.                         {% endfor %}
  1057.                     </div>
  1058.                 </div>
  1059.                 <div class="text-right mt-4" style="margin-right: 79px; margin-bottom:-53px">
  1060.                     <a href="{{path('app_croisiere')}}" style="color: #0093a9;margin-top: 128px;">
  1061.                         Découvrir Nos Croisières <i class="fa fa-angle-double-right"></i>
  1062.                     </a>
  1063.                 </div>
  1064.             </div>
  1065.         </div>
  1066.     </div>
  1067.         <!-- CTA -->
  1068.         <div class="cta">
  1069.             <!-- Image by https://unsplash.com/@thanni -->
  1070.             <div class="cta_background" style="background-image:url(./front/images/Slider_1.png);opacity: unset; background-size: cover;background-position: center;width: 100%;"></div>
  1071.             <div class="container">
  1072.                 <div class="row">
  1073.                     <div class="col">
  1074.                     </div>
  1075.                 </div>
  1076.             </div>
  1077.         </div>
  1078.         <!-- Intro -->
  1079.         <div class="intro">
  1080.             <div class="container">
  1081.                 <div class="row">
  1082.                     <div class="col text-center">
  1083.                         <h2 class="section_title" style="font-size: 33px;color: #0093a9">Voyages Organisés</h2>
  1084.                     </div>
  1085.                 </div>
  1086.                 <div class="intro">
  1087.                     <div class="container mt-4">
  1088.                         <div class="row intro_items" style="margin-top: -62px; margin-left:20px;">
  1089.                             {% for s in sejour|slice(0, 3) %}
  1090.                                 <div class="col-lg-4 intro_col">
  1091.                                     <div class="intro_item" style="width: 90%;height: 400px;box-shadow: 0 16px 38px -12px rgba(0, 0, 0, 0.56), 0 4px 25px 0px rgba(0, 0, 0, 0.12), 0 8px 10px -5px rgba(0, 0, 0, 0.2);">
  1092.                                         <div class="intro_item_overlay" style="background: #301c405c"></div>
  1093.                                         <div class="intro_item_background">
  1094.                                             {% for img in s.imageSejours %}
  1095.                                                 {% if loop.first %}
  1096.                                                     <img src="{{ asset('./rusticav/public/uploads/sejours/'~img.name) }}" alt="" width="100%" height="100%" />
  1097.                                                 {% endif %}
  1098.                                             {% endfor %}
  1099.                                         </div>
  1100.                                         <div class="intro_item_content d-flex flex-column align-items-center justify-content-center" style="margin-top: 60px;">
  1101.                                             <div class="intro_date" style="background-color:#ff9100; top: 74px;font-size: 12px;font-weight: 700"> {{s.dated|date("d-m-Y")}} Au {{s.datef|date("d-m-Y")}}</div>
  1102.                                             <div class="button intro_button" style="margin-bottom: -5px;">
  1103.                                                 <div class="button_bcg" style="background: #0093a9;"></div>
  1104.                                                 <a href="{{ path('detailsejour', {'id': s.id}) }}" style="font-size: 14px">
  1105.                                                     Voir plus<span></span><span></span><span></span>
  1106.                                                 </a>
  1107.                                             </div>
  1108.                                             <div class="intro_center text-center">
  1109.                                                 <a href="{{ path('detailsejour', {'id': s.id}) }}" style="color:#000;font-size: 23px"><h1 style="font-size: 34px;text-transform: uppercase">{{s.titre}}</h1></a>
  1110.                                                 <div class="intro_price" style="font-weight: 600;font-size: 20px">À partir de <strong>{{s.prix + s.marge}} TND</strong> </div>
  1111.                                             </div>
  1112.                                         </div>
  1113.                                     </div>
  1114.                                 </div>
  1115.                             {% endfor %}
  1116.                         </div>
  1117.                     </div>
  1118.                     <div class="text-right mt-4" style="margin-right: 79px; margin-bottom:-53px">
  1119.                         <a href="{{path('app_sejour')}}" style="color: #0093a9;margin-top: 128px;">
  1120.                             Découvrir Nos Voyages Organisés <i class="fa fa-angle-double-right"></i>
  1121.                         </a>
  1122.                     </div>
  1123.                 </div>
  1124.             </div>
  1125.         </div>
  1126.             
  1127. </div>
  1128. <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
  1129. <script src="https://cdn.jsdelivr.net/momentjs/latest/moment.min.js"></script>
  1130. <script src="https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.min.js"></script>
  1131. <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
  1132. <script src="https://cdnjs.cloudflare.com/ajax/libs/noUiSlider/14.6.4/nouislider.min.js"></script>
  1133. <script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.13/js/select2.min.js"></script>
  1134. <!-- Jquery JS-->
  1135. <!-- Vendor JS-->
  1136. <script src="{{ asset('searchbar/vendor/bootstrap-wizard/bootstrap.min.js') }}"></script>
  1137. <script src="{{ asset('searchbar/vendor/bootstrap-wizard/jquery.bootstrap.wizard.min.js') }}"></script>
  1138. <!-- Main JS-->
  1139. <script src="{{ asset('searchbar/js/global.js') }}"></script>
  1140. <script>
  1141.     $(document).ready(function() {
  1142.         // Initialize date range picker
  1143.         const checkIn = "{{ checkIn|default('') }}";
  1144.         const checkOut = "{{ checkOut|default('') }}";
  1145.         $('#daterange').daterangepicker({
  1146.             startDate: checkIn,
  1147.             endDate: checkOut,
  1148.             opens: 'right',
  1149.             locale: {
  1150.                 format: 'YYYY-MM-DD',
  1151.                 applyLabel: 'Valider',
  1152.                 cancelLabel: 'Annuler',
  1153.                 customRangeLabel: 'Custom',
  1154.                 daysOfWeek: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
  1155.                 monthNames: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
  1156.                 firstDay: 1
  1157.             }
  1158.         }, function(start, end) {
  1159.             // Callback pour le calcul des nuitées
  1160.             const nights = end.diff(start, 'days');
  1161.             document.getElementById('nightsCount').value = nights + ' ' + (nights > 1 ? 's' : '');
  1162.         });
  1163.         // Calcul initial des nuitées si checkIn et checkOut sont déjà définis
  1164.         if (checkIn && checkOut) {
  1165.             const startDate = moment(checkIn);
  1166.             const endDate = moment(checkOut);
  1167.             const nights = endDate.diff(startDate, 'days');
  1168.             document.getElementById('nightsCount').value = nights + ' ' + (nights > 1 ? 's' : '');
  1169.         }
  1170.         // Update text of the Add Room button
  1171.         function updateRoomButtonText() {
  1172.             const totalRooms = $('.room').length;
  1173.             const totalAdults = $('.adultCount').toArray().reduce((sum, input) => sum + parseInt($(input).val(), 10), 0);
  1174.             const totalChildren = $('.childrenAges').toArray().length;
  1175.             $('#addRoomButton').text(`${totalRooms} chambres, ${totalAdults} adultes, ${totalChildren} enfants`);
  1176.         }
  1177.         // Add more rooms
  1178.         $('#addMoreRoomButton').on('click', function() {
  1179.             const roomHtml = `
  1180.             <div class="room mb-3">
  1181.                 <div class="form-row align-items-center">
  1182.                     <div class="col-md-3">
  1183.                         <label style="color: black">Adulte(s):</label>
  1184.                         <input type="number" class="form-control adultCount" name="adultCount[]" min="1" required value="2">
  1185.                     </div>
  1186.                     <div class="col-md-3">
  1187.                         <label style="color: black">Enfant(s):</label>
  1188.                         <input type="number" class="form-control childCount" name="childCount[]" min="0" value="0">
  1189.                     </div>
  1190.                     <div class="col-md-5">
  1191.                         <div class="childrenAgesContainer"></div>
  1192.                     </div>
  1193.                     <div class="col-md-1 text-right">
  1194.                         <button type="button" class="btn btn-danger btn-sm remove-room">
  1195.                             <i class="fa fa-trash"></i>
  1196.                         </button>
  1197.                     </div>
  1198.                 </div>
  1199.             </div>
  1200.         `;
  1201.             $('#roomsContainer').append(roomHtml);
  1202.             updateRoomButtonText(); // Update the button text after adding a room
  1203.         });
  1204.         // Handle change in number of children
  1205.         $('#roomsContainer').on('change', '.childCount', function() {
  1206.             const parentRoom = $(this).closest('.room');
  1207.             const childrenCount = parseInt($(this).val(), 10);
  1208.             const childrenAgesContainer = parentRoom.find('.childrenAgesContainer');
  1209.             childrenAgesContainer.empty();
  1210.             for (let i = 0; i < childrenCount; i++) {
  1211.                     childrenAgesContainer.append(`
  1212.                         <div class="col-md-3">
  1213.                             <label for="childAge${i}" style="color: black;width: 104%">Âge ${i + 1}</label>
  1214.                             <select id="childAge${i}" class="form-control childrenAges" name="childrenAges[]" style="width: 60px;">
  1215.                                 <option value="" disabled selected>Sélectionner l'âge</option>
  1216.                                 ${Array.from({ length: 18 }, (_, age) => `<option value="${age}">${age}</option>`).join('')}
  1217.                             </select>
  1218.                         </div>
  1219.                     `);
  1220.                 }
  1221.         });
  1222.         // Save rooms and update button text
  1223.         $('#saveRoomButton').on('click', function() {
  1224.             const rooms = [];
  1225.             $('.room').each(function() {
  1226.                 const adultCount = $(this).find('.adultCount').val();
  1227.                 const childrenCounts = $(this).find('.childCount').val();
  1228.                 const childrenAges = $(this).find('.childrenAgesContainer .childrenAges').map(function() {
  1229.                     return $(this).val();
  1230.                 }).get();
  1231.                 rooms.push({
  1232.                     Adult: adultCount,
  1233.                     Child: childrenAges
  1234.                 });
  1235.             });
  1236.             updateRoomButtonText(); // Update the button text when saving rooms
  1237.         });
  1238.         // Remove a room
  1239.         $('#roomsContainer').on('click', '.remove-room', function() {
  1240.             $(this).closest('.room').remove();
  1241.             updateRoomButtonText(); // Update the button text after removing a room
  1242.         });
  1243.         // Initialize the button text
  1244.         updateRoomButtonText(); // Ensure button text is correct on initial load
  1245.         // Handle form submission
  1246.         $('#searchForm').on('submit', function(event) {
  1247.             event.preventDefault();
  1248.             const checkIn = $('#daterange').data('daterangepicker').startDate.format('YYYY-MM-DD');
  1249.             const checkOut = $('#daterange').data('daterangepicker').endDate.format('YYYY-MM-DD');
  1250.             const city = $('#city').val();
  1251.             const rooms = [];
  1252.             $('.room').each(function() {
  1253.                 const childrenAges = $(this).find('.childrenAges').map(function() {
  1254.                     return $(this).val();
  1255.                 }).get();
  1256.                 rooms.push({
  1257.                     Adult: $(this).find('.adultCount').val(),
  1258.                     Child: childrenAges
  1259.                 });
  1260.             });
  1261.             if (checkIn && checkOut && rooms.length > 0) {
  1262.                 // Supposons que l'URL actuelle soit de la forme '/detail-search/{id}'
  1263.                 const citySelect = document.getElementById('city');
  1264.                 const city = citySelect.value;
  1265.                 const url = new URL('{{ path('hotel_results', {'city': 'CITY_ID'}) }}'.replace('CITY_ID', city), window.location.origin);
  1266.                 url.searchParams.append('checkIn', checkIn);
  1267.                 url.searchParams.append('checkOut', checkOut);
  1268.                 rooms.forEach((room, index) => {
  1269.                     url.searchParams.append(`rooms[${index}][Adult]`, room.Adult);
  1270.                     room.Child.forEach((child, childIndex) => {
  1271.                         url.searchParams.append(`rooms[${index}][Child][${childIndex}]`, child);
  1272.                     });
  1273.                 });
  1274.                 window.location.href = url.toString();
  1275.             }
  1276.         });
  1277.     });
  1278.     // Function to generate star rating HTML
  1279.     function generateStarRating(stars) {
  1280.         let starRating = '';
  1281.         for (let i = 0; i < stars; i++) {
  1282.             starRating += '★';
  1283.         }
  1284.         return starRating;
  1285.     }
  1286.     const test = $('#test').text();
  1287.     // Fonction pour afficher les données de tous les hôtels
  1288.     function displayAllHotels(test) {
  1289.         const hotelList = $('#test');
  1290.         let hotelData = [];
  1291.         try {
  1292.             const data = JSON.parse(test);
  1293.             hotelData = data.HotelSearch;
  1294.         } catch (e) {
  1295.             console.error('Error parsing JSON:', e);
  1296.             return;
  1297.         }
  1298.         // Effacer le contenu précédent
  1299.         hotelList.empty();
  1300.         // Afficher le formulaire de recherche
  1301.         hotelList.append(``);
  1302.         hotelData.forEach(hotel => {
  1303.             const hotelDiv = $('<div class="card1"><div class="hotel">');
  1304.             hotelDiv.data('hotel-id', hotel.Id); // Stocke l'ID de l'hôtel
  1305.             const prices = hotel.Price.Boarding;
  1306.             hotelDiv.html(`
  1307.                     <a href="/detail-search/${hotel.Hotel.City.Id}/${hotel.Hotel.Id}">
  1308.                         ${hotel.Hotel.Image ? `<img class="card1__img" src="${hotel.Hotel.Image}" alt="Image of ${hotel.Hotel.Name}" ` : ''}
  1309.                     </a>
  1310.                     <div class="card1__body">
  1311.                         <a href="/detail-search/${hotel.Hotel.City.Id}/${hotel.Hotel.Id}">
  1312.                             <h2 class="card1__title">
  1313.                                 ${hotel.Hotel.Name}<span style="color: gold">       ${generateStarRating(hotel.Hotel.Category.Star)}</span
  1314.                             </h2>
  1315.                         </a>
  1316.                         <p class="card1__text">
  1317.                             <i class="fa fa-map-marker"></i> ${hotel.Hotel.City.Name}
  1318.                         </p>
  1319.                         <div class="card1__footer">
  1320.                         ${prices.length > 0 ? `
  1321.                             <h5 class="test" style="font-weight: 500">en ${prices[0].Code}</h5>
  1322.                             ${prices[0].Pax.map(pax => `
  1323.                                     ${pax.Rooms.length > 0 ? `
  1324.                                         <p class="price">${(((pax.Rooms[0].Price * 1.1) * 1.1) * 0.5).toFixed(3)} TND</p>
  1325.                                     ` : ''}
  1326.                                 `).join('')}
  1327.                         ` : ''}
  1328.                         </div>
  1329.             `);
  1330.             // Ajouter le div de l'hôtel à la liste des hôtels
  1331.             hotelList.append(hotelDiv);
  1332.             // Ajouter un gestionnaire d'événements pour les boutons de réservation
  1333.         });
  1334.     }
  1335.     // Appeler la fonction pour afficher les données des hôtels
  1336.     displayAllHotels(test);
  1337. </script>
  1338. {% endblock %}
  1339. {# </body>
  1340. </html> #}
  1341. {# templates/hotel/index.html.twig #}
  1342. {#<!DOCTYPE html>#}
  1343. {#<html lang="en">#}
  1344. {#<head>#}
  1345. {#    <meta charset="UTF-8">#}
  1346. {#    <title>Hotel List</title>#}
  1347. {#    <style>#}
  1348. {#        .hotel {#}
  1349. {#            border: 1px solid #ddd;#}
  1350. {#            padding: 15px;#}
  1351. {#            margin: 15px 0;#}
  1352. {#        }#}
  1353. {#        .facilities {#}
  1354. {#            margin-left: 20px;#}
  1355. {#        }#}
  1356. {#    </style>#}
  1357. {#</head>#}
  1358. {#<body>#}
  1359. {#<h1>Hotel List</h1>#}
  1360. {#<div id="content">#}
  1361. {#    <div style="display: none">#}
  1362. {#        {{ content|raw }}#}
  1363. {#    </div>#}
  1364. {#</div>#}
  1365. {#<script>#}
  1366. {#    // Récupère le contenu brut passé par le contrôleur#}
  1367. {#    const content = document.getElementById('content').textContent;#}
  1368. {#    // Fonction pour afficher les données de tous les hôtels#}
  1369. {#    function displayAllHotels(content) {#}
  1370. {#        const hotelList = document.getElementById('content');#}
  1371. {#        try {#}
  1372. {#            const data = JSON.parse(content);#}
  1373. {#            const hotelData = data.ListHotel;#}
  1374. {#            hotelData.forEach(hotel => {#}
  1375. {#                const hotelDiv = document.createElement('div');#}
  1376. {#                hotelDiv.classList.add('hotel');#}
  1377. {#                hotelDiv.innerHTML = `#}
  1378. {#                        <h2>${hotel.Name}</h2>#}
  1379. {#                        <p>Category: ${hotel.Category.Title}</p>#}
  1380. {#                        <p>City: ${hotel.City.Name}, ${hotel.City.Country.Name}</p>#}
  1381. {#                        ${hotel.Image ? `<img src="${hotel.Image}" alt="Image of ${hotel.Name}" style="width:200px;">` : ''}#}
  1382. {#                        <a href="/detail-search/${hotel.Id}">Voir les détails</a>#}
  1383. {#                    `;#}
  1384. {#                hotelList.appendChild(hotelDiv);#}
  1385. {#            });#}
  1386. {#        } catch (e) {#}
  1387. {#            console.error('Error displaying hotels:', e);#}
  1388. {#            // Si le contenu ne peut pas être analysé comme JSON, affiche-le tel quel#}
  1389. {#            hotelList.innerHTML = content;#}
  1390. {#        }#}
  1391. {#    }#}
  1392. {#    // Fonction pour afficher les facilités#}
  1393. {#    function displayFacilities(facilities) {#}
  1394. {#        if (!facilities) return '';#}
  1395. {#        // Regrouper les facilités par catégorie#}
  1396. {#        const categories = {};#}
  1397. {#        facilities.forEach(facility => {#}
  1398. {#            const category = facility.Category;#}
  1399. {#            if (!categories[category]) {#}
  1400. {#                categories[category] = [];#}
  1401. {#            }#}
  1402. {#            categories[category].push(facility.Title);#}
  1403. {#        });#}
  1404. {#        // Construire le HTML pour les facilités par catégorie#}
  1405. {#        let html = '<h3>Facilities</h3>';#}
  1406. {#        html += '<ul class="facilities">';#}
  1407. {#        Object.keys(categories).forEach(category => {#}
  1408. {#            html += `<li><strong>${category}</strong>: ${categories[category].join(', ')}</li>`;#}
  1409. {#        });#}
  1410. {#        html += '</ul>';#}
  1411. {#        return html;#}
  1412. {#    }#}
  1413. {#    // Affiche les données de tous les hôtels si le contenu est en JSON#}
  1414. {#    try {#}
  1415. {#        displayAllHotels(content);#}
  1416. {#    } catch (e) {#}
  1417. {#        console.error('Error displaying hotels:', e);#}
  1418. {#    }#}
  1419. {#</script>#}
  1420. {#</body>#}
  1421. {#</html>#}
  1422. {#<!DOCTYPE html>#}
  1423. {#<html lang="en">#}
  1424. {#<head>#}
  1425. {#    <meta charset="UTF-8">#}
  1426. {#    <title>Hotel List</title>#}
  1427. {#    <style>#}
  1428. {#        .hotel {#}
  1429. {#            border: 1px solid #ddd;#}
  1430. {#            padding: 15px;#}
  1431. {#            margin: 15px 0;#}
  1432. {#            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);#}
  1433. {#        }#}
  1434. {#        .facilities {#}
  1435. {#            margin-left: 20px;#}
  1436. {#            list-style-type: none;#}
  1437. {#            padding: 0;#}
  1438. {#        }#}
  1439. {#        .facilities li {#}
  1440. {#            margin-bottom: 5px;#}
  1441. {#        }#}
  1442. {#    </style>#}
  1443. {#</head>#}
  1444. {#<body>#}
  1445. {#<h1>Hotel List</h1>#}
  1446. {#<div id="content">#}
  1447. {#    <div style="display: none">#}
  1448. {#        {{ content|raw }}#}
  1449. {#    </div>#}
  1450. {#</div>#}
  1451. {#<script>#}
  1452. {#    document.addEventListener("DOMContentLoaded", () => {#}
  1453. {#        const content = document.getElementById('content').textContent;#}
  1454. {#        // Afficher le contenu brut pour le débogage#}
  1455. {#        console.log("Contenu reçu:", content);#}
  1456. {#        try {#}
  1457. {#            const data = JSON.parse(content);#}
  1458. {#            if (data && data.ListHotel) {#}
  1459. {#                displayAllHotels(data.ListHotel);#}
  1460. {#            } else {#}
  1461. {#                document.getElementById('content').innerHTML = 'Aucun hôtel trouvé pour l\'ID de ville spécifié.';#}
  1462. {#            }#}
  1463. {#        } catch (e) {#}
  1464. {#            console.error('Error parsing JSON:', e);#}
  1465. {#            document.getElementById('content').innerHTML = 'Erreur de chargement des données des hôtels.';#}
  1466. {#        }#}
  1467. {#    });#}
  1468. {#    function displayAllHotels(hotelData) {#}
  1469. {#        const hotelList = document.getElementById('content');#}
  1470. {#        // Grouper les hôtels par ville#}
  1471. {#        const hotelsByCity = hotelData.reduce((acc, hotel) => {#}
  1472. {#            const cityName = hotel.City.Name;#}
  1473. {#            if (!acc[cityName]) {#}
  1474. {#                acc[cityName] = [];#}
  1475. {#            }#}
  1476. {#            if (hotel.Image) { // Inclure uniquement les hôtels avec une image#}
  1477. {#                acc[cityName].push(hotel);#}
  1478. {#            }#}
  1479. {#            return acc;#}
  1480. {#        }, {});#}
  1481. {#        // Parcourir les groupes d'hôtels par ville#}
  1482. {#        Object.entries(hotelsByCity).forEach(([cityName, hotels]) => {#}
  1483. {#            if (hotels.length === 0) return; // Si aucun hôtel pour la ville, passer à la ville suivante#}
  1484. {#            // Ajouter un titre de ville#}
  1485. {#            const cityHeader = document.createElement('h3');#}
  1486. {#            cityHeader.textContent = cityName;#}
  1487. {#            hotelList.appendChild(cityHeader);#}
  1488. {#            // Limiter à 2 hôtels pour chaque ville#}
  1489. {#            const limitedHotels = hotels.slice(0, 2);#}
  1490. {#            // Ajouter les hôtels pour cette ville#}
  1491. {#            limitedHotels.forEach(hotel => {#}
  1492. {#                const hotelDiv = document.createElement('div');#}
  1493. {#                // Fonction pour générer les étoiles en fonction du nombre d'étoiles#}
  1494. {#                function generateStarRating(starCount) {#}
  1495. {#                    let starsHtml = '';#}
  1496. {#                    for (let i = 0; i < starCount; i++) {#}
  1497. {#                        starsHtml += '<img src="{{ asset('front/images/etoil.png') }}" alt="Star">';#}
  1498. {#                    }#}
  1499. {#                    return starsHtml;#}
  1500. {#                }#}
  1501. {#                hotelDiv.classList.add('hotel');#}
  1502. {#                hotelDiv.innerHTML = `#}
  1503. {#                <img src="${hotel.Image}" alt="Image of ${hotel.Name}" style="width:200px;">#}
  1504. {#                <h2>${hotel.Name} ${generateStarRating(hotel.Category.Star)}</h2>#}
  1505. {#                <p>City: ${hotel.City.Name}, ${hotel.City.Country.Name}</p>#}
  1506. {#                <a href="/detail-search/${hotel.Id}">Voir les détails</a>#}
  1507. {#            `;#}
  1508. {#                hotelList.appendChild(hotelDiv);#}
  1509. {#            });#}
  1510. {#        });#}
  1511. {#    }#}
  1512. {#</script>#}
  1513. {#</body>#}
  1514. {#</html>#}
  1515. {#<!DOCTYPE html>#}
  1516. {#<html lang="en">#}
  1517. {#<head>#}
  1518. {#    <meta charset="UTF-8">#}
  1519. {#    <title>Hotel List</title>#}
  1520. {#    <style>#}
  1521. {#        .hotel {#}
  1522. {#            border: 1px solid #ddd;#}
  1523. {#            padding: 15px;#}
  1524. {#            margin: 15px 0;#}
  1525. {#        }#}
  1526. {#        .album img {#}
  1527. {#            width: 200px;#}
  1528. {#            margin: 5px;#}
  1529. {#        }#}
  1530. {#    </style>#}
  1531. {#</head>#}
  1532. {#<body>#}
  1533. {#<h1>Hotel List</h1>#}
  1534. {#<div id="content">#}
  1535. {#    <div style="display: none">#}
  1536. {#        {{ content|raw }}#}
  1537. {#    </div>#}
  1538. {#</div>#}
  1539. {#<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>#}
  1540. {#<script src="https://cdn.jsdelivr.net/momentjs/latest/moment.min.js"></script>#}
  1541. {#<script src="https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.min.js"></script>#}
  1542. {#<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>#}
  1543. {#<script src="https://cdnjs.cloudflare.com/ajax/libs/noUiSlider/14.6.4/nouislider.min.js"></script>#}
  1544. {#<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.13/js/select2.min.js"></script>#}
  1545. {#<script>#}
  1546. {#    // Récupère le contenu brut passé par le contrôleur#}
  1547. {#    const content = document.getElementById('content').textContent;#}
  1548. {#    // Définir des prix manuellement pour chaque hôtel#}
  1549. {#    const hotelPrices = {#}
  1550. {#        '6': '100',  // Prix pour l'hôtel avec l'ID 1#}
  1551. {#        '7': '150',  // Prix pour l'hôtel avec l'ID 2#}
  1552. {#        // Ajoutez des prix pour tous les hôtels nécessaires#}
  1553. {#    };#}
  1554. {#    // Fonction pour afficher les données de tous les hôtels#}
  1555. {#    function displayAllHotels(content) {#}
  1556. {#        const hotelList = document.getElementById('content');#}
  1557. {#        try {#}
  1558. {#            const data = JSON.parse(content);#}
  1559. {#            const hotelData = data.ListHotel;#}
  1560. {#            hotelData.forEach(hotel => {#}
  1561. {#                const hotelDiv = document.createElement('div');#}
  1562. {#                hotelDiv.classList.add('hotel');#}
  1563. {#                // Obtenez le prix correspondant à cet hôtel#}
  1564. {#                const price = hotelPrices[hotel.Id] || 'N/A'; // 'N/A' si le prix n'est pas défini#}
  1565. {#                hotelDiv.innerHTML = `#}
  1566. {#                    <h2>${hotel.Name}</h2>#}
  1567. {#                    <p>Category: ${hotel.Category.Title}</p>#}
  1568. {#                    <p>City: ${hotel.City.Name}, ${hotel.City.Country.Name}</p>#}
  1569. {#                    ${hotel.Adress ? `<p>Address: ${hotel.Adress}</p>` : ''}#}
  1570. {#                    ${hotel.Localization ? `<p>Location: Latitude ${hotel.Localization.Latitude}, Longitude ${hotel.Localization.Longitude}</p>` : ''}#}
  1571. {#                    ${hotel.Image ? `<img src="${hotel.Image}" alt="Image of ${hotel.Name}" style="width:200px;">` : ''}#}
  1572. {#                    ${hotel.Facilities ? `#}
  1573. {#                    <h3>Facilities</h3>#}
  1574. {#                    <ul>#}
  1575. {#                        ${hotel.Facilities.map(facility => `<li>${facility.Title} (${facility.Category})</li>`).join('')}#}
  1576. {#                    </ul>` : ''}#}
  1577. {#                    ${hotel.Theme ? `#}
  1578. {#                    <h3>Themes</h3>#}
  1579. {#                    <ul>#}
  1580. {#                        ${hotel.Theme.map(theme => `<li>${theme}</li>`).join('')}#}
  1581. {#                    </ul>` : ''}#}
  1582. {#                    ${hotel.Note ? `<p>Note: ${hotel.Note}</p>` : ''}#}
  1583. {#                    ${hotel.Album ? `#}
  1584. {#                    <h3>Album</h3>#}
  1585. {#                    <div class="album">#}
  1586. {#                        ${hotel.Album.map(photo => `<img src="${photo.Url}" alt="Photo of ${hotel.Name}">`).join('')}#}
  1587. {#                    </div>` : ''}#}
  1588. {#                    <p>Price: ${price} €</p>#}
  1589. {#                    <a href="/hotel-detail/${hotel.Id}">Voir les détails</a>#}
  1590. {#                `;#}
  1591. {#                hotelList.append(hotelDiv);#}
  1592. {#            });#}
  1593. {#        } catch (e) {#}
  1594. {#            console.error('Error displaying hotels:', e);#}
  1595. {#            // Si le contenu ne peut pas être analysé comme JSON, affiche-le tel quel#}
  1596. {#            hotelList.innerHTML = content;#}
  1597. {#        }#}
  1598. {#    }#}
  1599. {#    // Affiche les données de tous les hôtels si le contenu est en JSON#}
  1600. {#    try {#}
  1601. {#        displayAllHotels(content);#}
  1602. {#    } catch (e) {#}
  1603. {#        console.error('Error displaying hotels:', e);#}
  1604. {#    }#}
  1605. {#</script>#}
  1606. {#</body>#}
  1607. {#</html>#}