templates/partials/_toast.html.twig line 1

  1. <div class="toast-container position-fixed bottom-0 end-0 p-3">
  2.     {% for message in app.flashes('badge') %}
  3.         <div class="toast " role="alert" aria-live="assertive" aria-atomic="true" data-bs-delay="5000">
  4.             <div class="toast-header bg-primary text-white">
  5.                 <strong class="ms-2 me-auto">
  6.                     Nouveau badge obtenu</strong>
  7.                 <button type="button" class="btn-close btn-close-white" data-bs-dismiss="toast" aria-label="Close"></button>
  8.             </div>
  9.             <div class="toast-body bg-white">
  10.                 Vous venez d'obtenir le badge
  11.                 <strong>{{message}}</strong>
  12.                 !
  13.             </div>
  14.         </div>
  15.     {% endfor %}
  16.     {% for message in app.flashes('success') %}
  17.         <div class="toast " role="alert" aria-live="assertive" aria-atomic="true" data-bs-delay="5000">
  18.             <div class="toast-header bg-terminated text-white">
  19.                 <strong class="ms-2 me-auto">
  20.                     Succès</strong>
  21.                 <button type="button" class="btn-close btn-close-white" data-bs-dismiss="toast" aria-label="Close"></button>
  22.             </div>
  23.             <div class="toast-body bg-terminated text-white">{{message}}
  24.             </div>
  25.         </div>
  26.     {% endfor %}
  27.     {% for message in app.flashes('danger') %}
  28.         <div class="toast " role="alert" aria-live="assertive" aria-atomic="true" data-bs-delay="5000">
  29.             <div class="toast-header bg-late text-white">
  30.                 <strong class="ms-2 me-auto">
  31.                     Erreur</strong>
  32.                 <button type="button" class="btn-close btn-close-white" data-bs-dismiss="toast" aria-label="Close"></button>
  33.             </div>
  34.             <div class="toast-body bg-late text-white">{{message}}
  35.             </div>
  36.         </div>
  37.     {% endfor %}
  38. </div>
  39. <template id="toast-template">
  40.     <div class="toast " role="alert" aria-live="assertive" aria-atomic="true" data-bs-delay="5000">
  41.         <div class="toast-header bg-primary text-white">
  42.             <strong class="ms-2 me-auto toast-title"></strong>
  43.             <button type="button" class="btn-close btn-close-white" data-bs-dismiss="toast" aria-label="Close"></button>
  44.         </div>
  45.         <div class="toast-body bg-white toast-message"></div>
  46.     </div>
  47. </template>
  48. <template id="toast-success-template">
  49.     <div class="toast " role="alert" aria-live="assertive" aria-atomic="true" data-bs-delay="5000">
  50.         <div class="toast-header bg-terminated text-white">
  51.             <strong class="ms-2 me-auto toast-title"></strong>
  52.             <button type="button" class="btn-close btn-close-white" data-bs-dismiss="toast" aria-label="Close"></button>
  53.         </div>
  54.         <div class="toast-body bg-terminated text-white toast-message"></div>
  55.     </div>
  56. </template>
  57. <template id="toast-danger-template">
  58.     <div class="toast " role="alert" aria-live="assertive" aria-atomic="true" data-bs-delay="5000">
  59.         <div class="toast-header bg-late text-white">
  60.             <strong class="ms-2 me-auto toast-title"></strong>
  61.             <button type="button" class="btn-close btn-close-white" data-bs-dismiss="toast" aria-label="Close"></button>
  62.         </div>
  63.         <div class="toast-body bg-late text-white toast-message"></div>
  64.     </div>
  65. </template>