templates/pages/form_confirmation.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block page_class %}
  3. page form-confirmation-page
  4. {% endblock %}
  5. {% block header %}
  6. <header class="site-header site-header--desktop">
  7. <div class="site-header__inner">
  8. <div class="site-header__bar">
  9. <div class="site-header__brand">
  10. <a class="site-header__logo logo" href="{{ sulu_content_root_path() }}">
  11. {% include 'pages/_includes/icons/croisiland-logo.svg' %}
  12. </a>
  13. </div>
  14. <div class="site-header__meta">
  15. {% include 'pages/_includes/base/_phone.html.twig' %}
  16. {% include 'pages/_includes/base/_hours.html.twig' %}
  17. </div>
  18. </div>
  19. </div>
  20. </header>
  21. <header class="site-header site-header--mobile">
  22. <div class="site-header__inner">
  23. <div class="site-header__bar">
  24. <div class="site-header__brand">
  25. <a class="site-header__logo logo" href="{{ sulu_content_root_path() }}">
  26. {% include 'pages/_includes/icons/croisiland-logo.svg' %}
  27. </a>
  28. </div>
  29. </div>
  30. </div>
  31. </header>
  32. {% endblock %}
  33. {% block aside %}{% endblock %}
  34. {% block footer %}{% endblock %}
  35. {% block modals %}{% endblock %}
  36. {% block stylesheets %}
  37. {{ parent() }}
  38. {{ encore_entry_link_tags('form_confirmation_styles') }}
  39. {% endblock %}
  40. {% block content %}
  41. {% set text = content.text|default('') %}
  42. {% set buttonText = content.buttonText|default('') %}
  43. {% set buttonLink = content.buttonLink|default('') %}
  44. {% set pictogramElement = content.pictogramElement|default('') %}
  45. {% set currentFormType = content.formType|default(formType|default('connection')) %}
  46. {# pageMedia peut être une image ou une vidéo (affiché en arrière-plan) #}
  47. {% set media = null %}
  48. {% if content.pageMedia is defined and content.pageMedia is not null and content.pageMedia.id is defined %}
  49. {% set media = sulu_resolve_media(content.pageMedia.id, app.request.locale) %}
  50. {% endif %}
  51. {% set mediaUrl = media ? sulu_media_url(media, '1600x') : asset('img/connection-screen/background.gif') %}
  52. {% set mediaMimeType = media.mimeType|default('') %}
  53. {% set isVideo = (mediaMimeType starts with 'video/') or (mediaUrl matches '/\.(mp4|webm|ogg)(\\?.*)?$/i') %}
  54. <section class="form-confirmation">
  55. {% if mediaUrl is not empty %}
  56. <div class="form-confirmation__media" aria-hidden="true">
  57. {% if isVideo %}
  58. <video class="form-confirmation__media-video" autoplay muted loop playsinline preload="metadata">
  59. <source src="{{ mediaUrl|e('html_attr') }}" type="{{ mediaMimeType|e('html_attr') }}" />
  60. </video>
  61. {% else %}
  62. <img class="form-confirmation__media-img" src="{{ mediaUrl|e('html_attr') }}" alt="" />
  63. {% endif %}
  64. </div>
  65. {% endif %}
  66. <div class="form-confirmation__content">
  67. <div class="form-confirmation__content-text">
  68. {{ getLucidIcon(pictogramElement|default('')) }}
  69. <div>{{ text }}</div>
  70. </div>
  71. <a class="btn style1 reverse_color little" href="{{ buttonLink }}">{{ buttonText }}</a>
  72. </div>
  73. </section>
  74. {% endblock %}