templates/donation/dons.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block title %}Faire un Don - Soutenir WA BENIN{% endblock %}
  3. {% block body %}
  4. <div class="page-header" style="height: 50vh; background-image: linear-gradient(rgba(192, 57, 43, 0.8), rgba(31, 31, 31, 0.9)), url('https://images.unsplash.com/photo-1488521787991-ed7bbaae773c?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80');">
  5. <div class="container fade-up" style="max-width: 800px;">
  6. <h1 class="page-title">Chaque Geste Compte</h1>
  7. <p style="font-size: 1.2rem; color: #fff; opacity: 0.9;">Votre générosité permet de préserver notre patrimoine, de soutenir nos artistes émergents et de financer les éditions du Festival WA BENIN.</p>
  8. </div>
  9. </div>
  10. <section class="section-padding" style="margin-top: -100px; position: relative; z-index: 10;">
  11. <div class="container">
  12. <div style="background: #fff; border-radius: var(--border-radius-lg); box-shadow: var(--shadow-hover); padding: 50px; display: grid; grid-template-columns: 1fr 1fr; gap: 50px;">
  13. <!-- Donation Form -->
  14. <div>
  15. <h3 style="font-size: 1.8rem; margin-bottom: 30px;">Faire un Don Sécurisé</h3>
  16. <div style="display: flex; gap: 10px; margin-bottom: 25px;">
  17. <button type="button" class="btn btn-type active" data-type="unique" style="flex: 1; border-radius: 8px;">Don Unique</button>
  18. <button type="button" class="btn btn-type" data-type="mensuel" style="flex: 1; border-radius: 8px;">Don Mensuel</button>
  19. </div>
  20. <div style="display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin-bottom: 25px;">
  21. <div class="amount-box" data-amount="20">20€</div>
  22. <div class="amount-box active" data-amount="50">50€</div>
  23. <div class="amount-box" data-amount="100">100€</div>
  24. <div style="border: 2px solid #eee; padding: 15px; text-align: center; border-radius: 8px; transition: var(--transition); font-weight: bold; font-size: 1.2rem; grid-column: span 3;" class="amount-custom-box">
  25. <input type="number" id="custom_amount" placeholder="Montant libre (€)" min="5" style="border: none; background: transparent; width: 100%; text-align: center; font-size: 1.2rem; outline: none;">
  26. </div>
  27. </div>
  28. <form action="{{ path('app_checkout') }}" method="POST" id="donationForm" target="_blank">
  29. <input type="hidden" name="donation_type" id="donation_type" value="unique">
  30. <input type="hidden" name="amount" id="amount" value="50">
  31. <div style="display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 15px;">
  32. <input type="text" name="firstname" placeholder="Prénom" required style="padding: 15px; border: 1px solid #ddd; border-radius: 8px; width: 100%; outline: none;">
  33. <input type="text" name="lastname" placeholder="Nom" required style="padding: 15px; border: 1px solid #ddd; border-radius: 8px; width: 100%; outline: none;">
  34. </div>
  35. <input type="email" name="email" placeholder="Adresse Email" required style="padding: 15px; border: 1px solid #ddd; border-radius: 8px; width: 100%; margin-bottom: 15px; outline: none;">
  36. <div style="margin-bottom: 15px;">
  37. <label style="display: flex; align-items: center; gap: 10px; cursor: pointer;">
  38. <input type="checkbox" name="anonymous" value="1">
  39. <span style="color: #666;">Je souhaite faire un don anonyme (mon nom n'apparaîtra pas)</span>
  40. </label>
  41. </div>
  42. <div style="margin-bottom: 25px;">
  43. <select name="project_id" style="padding: 15px; border: 1px solid #ddd; border-radius: 8px; width: 100%; outline: none;">
  44. <option value="">Soutenir un projet spécifique (Optionnel)</option>
  45. {% for project in projects %}
  46. <option value="{{ project.id }}">{{ project.title }}</option>
  47. {% endfor %}
  48. </select>
  49. </div>
  50. <div style="margin-bottom: 25px; padding: 15px; border: 1px solid #ddd; border-radius: 8px; display: flex; justify-content: space-between; align-items: center;">
  51. <span style="color: #666;"><i class="fas fa-lock" style="color: var(--green); margin-right: 10px;"></i> Paiement sécurisé via Stripe</span>
  52. <i class="fab fa-cc-stripe fa-2x" style="color: #635bff;"></i>
  53. </div>
  54. <button type="submit" class="btn btn-primary" style="width: 100%; padding: 15px; font-size: 1.1rem; border-radius: 8px; display: flex; justify-content: center; align-items: center; gap: 10px;">
  55. Valider mon don de <span id="submit_amount">50</span>€
  56. </button>
  57. </form>
  58. </div>
  59. <!-- Impact Information & Projects -->
  60. <div style="background: var(--white-off); padding: 40px; border-radius: 16px;">
  61. <h3 style="font-size: 1.8rem; margin-bottom: 30px;">Projets en cours de financement</h3>
  62. {% for project in projects|slice(0,3) %}
  63. <div style="margin-bottom: 30px; background: #fff; padding: 20px; border-radius: 8px; box-shadow: 0 4px 10px rgba(0,0,0,0.05);">
  64. <h4 style="margin-bottom: 10px; font-size: 1.2rem;">{{ project.title }}</h4>
  65. <p style="color: #555; font-size: 0.9rem; margin-bottom: 15px;">{{ project.description|slice(0, 80) ~ '...' }}</p>
  66. <div style="width: 100%; background: #eee; height: 10px; border-radius: 5px; margin-bottom: 10px;">
  67. {% set percent = (project.currentAmount / project.targetAmount) * 100 %}
  68. <div style="width: {{ percent > 100 ? 100 : percent }}%; background: var(--green); height: 100%; border-radius: 5px;"></div>
  69. </div>
  70. <div style="display: flex; justify-content: space-between; font-size: 0.85rem; font-weight: bold;">
  71. <span style="color: var(--green);">{{ project.currentAmount|number_format(0, ',', ' ') }} € collectés</span>
  72. <span style="color: #888;">Objectif : {{ project.targetAmount|number_format(0, ',', ' ') }} €</span>
  73. </div>
  74. </div>
  75. {% endfor %}
  76. <div style="margin-top: 40px; padding-top: 20px; border-top: 1px solid #ddd;">
  77. <h4 style="color: var(--gold); margin-bottom: 10px; font-size: 1.3rem;">Pourquoi donner ?</h4>
  78. <ul style="color: #555; padding-left: 20px;">
  79. <li>Transparence totale sur l'utilisation des fonds</li>
  80. <li>Déduction fiscale à hauteur de 66% (selon juridiction)</li>
  81. <li>Impact direct sur les artistes locaux béninois</li>
  82. </ul>
  83. </div>
  84. </div>
  85. </div>
  86. </div>
  87. </section>
  88. <style>
  89. .btn-type {
  90. background: #f0f0f0;
  91. color: #555;
  92. }
  93. .btn-type.active {
  94. background: var(--black-dark);
  95. color: #fff;
  96. }
  97. .amount-box {
  98. border: 2px solid #eee;
  99. padding: 15px;
  100. text-align: center;
  101. border-radius: 8px;
  102. cursor: pointer;
  103. transition: var(--transition);
  104. font-weight: bold;
  105. font-size: 1.2rem;
  106. color: var(--black-dark);
  107. }
  108. .amount-box.active {
  109. border-color: var(--green);
  110. background: rgba(116, 172, 49, 0.1);
  111. color: var(--green);
  112. }
  113. .amount-custom-box:focus-within {
  114. border-color: var(--green);
  115. }
  116. </style>
  117. <script>
  118. document.addEventListener('DOMContentLoaded', function() {
  119. const btnTypes = document.querySelectorAll('.btn-type');
  120. const amountBoxes = document.querySelectorAll('.amount-box');
  121. const customAmountInput = document.getElementById('custom_amount');
  122. const hiddenType = document.getElementById('donation_type');
  123. const hiddenAmount = document.getElementById('amount');
  124. const submitAmountSpan = document.getElementById('submit_amount');
  125. // Type Selection
  126. btnTypes.forEach(btn => {
  127. btn.addEventListener('click', function() {
  128. btnTypes.forEach(b => b.classList.remove('active'));
  129. this.classList.add('active');
  130. hiddenType.value = this.getAttribute('data-type');
  131. });
  132. });
  133. // Amount Selection
  134. amountBoxes.forEach(box => {
  135. box.addEventListener('click', function() {
  136. amountBoxes.forEach(b => b.classList.remove('active'));
  137. this.classList.add('active');
  138. customAmountInput.value = ''; // clear custom
  139. const val = this.getAttribute('data-amount');
  140. hiddenAmount.value = val;
  141. submitAmountSpan.textContent = val;
  142. });
  143. });
  144. // Custom Amount
  145. customAmountInput.addEventListener('input', function() {
  146. amountBoxes.forEach(b => b.classList.remove('active'));
  147. const val = this.value;
  148. if(val && val >= 5) {
  149. hiddenAmount.value = val;
  150. submitAmountSpan.textContent = val;
  151. } else {
  152. hiddenAmount.value = 5;
  153. submitAmountSpan.textContent = "5";
  154. }
  155. });
  156. });
  157. </script>
  158. {% endblock %}