templates/pages/_includes/base/search_bar/_search_bar_custom.html.twig line 1

Open in your IDE?
  1. <div
  2. class="custom-search-bar"
  3. data-context="auto"
  4. data-cruise-search-dynamic-options-url="{{ path('api_cruise_get_cruise_serach_dynamic_options') }}"
  5. data-cruise-list-url="/croisieres"
  6. {# Onglets Top / Autres — désactivés (cf. custom-search/engine.js)
  7. data-cruise-tab-top-destinations="{{ 'list.filters.top_destinations'|trans|e('html_attr') }}"
  8. data-cruise-tab-other-destinations="{{ 'search.custom.tab_other_destinations'|trans|e('html_attr') }}"
  9. data-cruise-tab-top-companies="{{ 'search.custom.tab_top_companies'|trans|e('html_attr') }}"
  10. data-cruise-tab-other-companies="{{ 'search.custom.tab_other_companies'|trans|e('html_attr') }}"
  11. data-cruise-tab-top-ports="{{ 'search.custom.tab_top_ports'|trans|e('html_attr') }}"
  12. data-cruise-tab-other-ports="{{ 'search.custom.tab_other_ports'|trans|e('html_attr') }}"
  13. data-cruise-tab-panel-empty="{{ 'search.custom.tab_panel_empty'|trans|e('html_attr') }}"
  14. #}
  15. data-cruise-search-placeholder-destinations="{{ 'search.custom.search_destinations'|trans|e('html_attr') }}"
  16. data-cruise-search-placeholder-companies="{{ 'search.custom.search_companies'|trans|e('html_attr') }}"
  17. data-cruise-search-placeholder-ports="{{ 'search.custom.search_ports'|trans|e('html_attr') }}"
  18. >
  19. <!-- Header mobile -->
  20. <div class="custom-search-header">
  21. <div class="header-icon">
  22. {{ getLucidIcon('search') }}
  23. </div> {# .header-icon #}
  24. <div class="header-title">{{ 'search.custom.header_title'|trans }}</div> {# .header-title #}
  25. </div> {# .custom-search-header #}
  26. <form class="custom-search-form">
  27. <!-- Section Destination -->
  28. <div class="custom-search-field custom-search-destination">
  29. <div class="field-content">
  30. <div class="field-icon">
  31. {{ getLucidIcon('map-pin') }}
  32. </div>
  33. <div class="field-label">{{ 'search.bar.destination'|trans }}</div>
  34. <div class="field-dropdown-icon">
  35. {{ getLucidIcon('chevron-down') }}
  36. </div>
  37. </div>
  38. <div class="field-separator"></div>
  39. <!-- Dropdown pour ce champ -->
  40. <div class="custom-dropdown custom-dropdown-destination">
  41. <div class="dropdown-content">
  42. <!-- Les options seront chargées dynamiquement -->
  43. </div>
  44. </div>
  45. </div>
  46. <!-- Section Dates (premier en mobile) -->
  47. <div class="custom-search-field custom-search-dates">
  48. <div class="field-content">
  49. <div class="field-icon">
  50. {{ getLucidIcon('calendar') }}
  51. </div>
  52. <div class="field-label">{{ 'search.custom.dates'|trans }}</div>
  53. <div class="field-dropdown-icon">
  54. {{ getLucidIcon('chevron-down') }}
  55. </div>
  56. </div>
  57. <div class="field-separator"></div>
  58. <div class="custom-dropdown custom-dropdown-dates">
  59. <div class="dropdown-content custom-search-dates-panel">
  60. {% set currentYear = "now"|date("Y") + 0 %}
  61. {% set currentMonth = "now"|date("n") + 0 %}
  62. {% set monthLabels = ['janvier', 'février', 'mars', 'avril', 'mai', 'juin', 'juillet', 'août', 'septembre', 'octobre', 'novembre', 'décembre'] %}
  63. <div class="custom-search-dates-year-slider">
  64. <button type="button" class="custom-search-dates-year-nav custom-search-dates-year-nav--prev" aria-label="{{ 'common.previous'|trans }}" disabled>
  65. {{ getLucidIcon('chevron-left') }}
  66. </button>
  67. <div class="custom-search-dates-year-viewport">
  68. <div class="custom-search-dates-year-track">
  69. {% for year in currentYear..(currentYear + 2) %}
  70. <span class="custom-search-dates-year{% if year == currentYear %} is-current{% endif %}" data-year="{{ year }}">{{ year }}</span>
  71. {% endfor %}
  72. </div>
  73. </div>
  74. <button type="button" class="custom-search-dates-year-nav custom-search-dates-year-nav--next" aria-label="{{ 'common.next'|trans }}">
  75. {{ getLucidIcon('chevron-right') }}
  76. </button>
  77. </div>
  78. <div class="custom-search-dates-months">
  79. {% for label in monthLabels %}
  80. {% set month = loop.index %}
  81. {% set monthPad = "%02d"|format(month) %}
  82. {% set firstDay = currentYear ~ "-" ~ monthPad ~ "-01" %}
  83. {% set lastDay = firstDay|date_modify("last day of this month")|date("d") %}
  84. {% set isPast = month < currentMonth %}
  85. <button
  86. type="button"
  87. class="custom-search-dates-month{% if isPast %} is-past{% endif %}"
  88. value="01{{ monthPad }}-{{ lastDay }}{{ monthPad }}"
  89. data-month="{{ month }}"
  90. aria-pressed="false"
  91. {% if isPast %}disabled{% endif %}
  92. >{{ label }}</button>
  93. {% endfor %}
  94. </div>
  95. </div>
  96. </div>
  97. </div>
  98. <!-- Section Port de départ -->
  99. <div class="custom-search-field custom-search-departure">
  100. <div class="field-content">
  101. <div class="field-icon">
  102. {{ getLucidIcon('anchor') }}
  103. </div>
  104. <div class="field-label">{{ 'search.bar.departure_port'|trans }}</div>
  105. <div class="field-dropdown-icon">
  106. {{ getLucidIcon('chevron-down') }}
  107. </div>
  108. </div>
  109. <div class="field-separator"></div>
  110. <!-- Dropdown pour ce champ -->
  111. <div class="custom-dropdown custom-dropdown-departure">
  112. <div class="dropdown-content">
  113. <!-- Les ports seront chargés dynamiquement -->
  114. </div>
  115. </div>
  116. </div>
  117. <!-- Section Compagnie -->
  118. <div class="custom-search-field custom-search-company">
  119. <div class="field-content">
  120. <div class="field-icon">
  121. {{ getLucidIcon('ship') }}
  122. </div>
  123. <div class="field-label">{{ 'search.bar.company'|trans }}</div>
  124. <div class="field-dropdown-icon">
  125. {{ getLucidIcon('chevron-down') }}
  126. </div>
  127. </div>
  128. <div class="field-separator"></div>
  129. <!-- Dropdown pour ce champ -->
  130. <div class="custom-dropdown custom-dropdown-company">
  131. <div class="dropdown-content">
  132. <!-- Les compagnies seront chargées dynamiquement -->
  133. </div>
  134. </div>
  135. </div>
  136. <!-- Bouton de recherche -->
  137. <div class="custom-search-submit">
  138. <button type="submit" class="search-submit-btn">
  139. <div class="submit-icon">
  140. {{ getLucidIcon('search') }}
  141. </div>
  142. </button>
  143. </div> {# .custom-search-submit #}
  144. </form> {# .custom-search-form #}
  145. </div> {# #search-bar-custom #}