templates/events/evenements.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block title %}Événements - WA BENIN{% endblock %}
  3. {% block body %}
  4. <div class="page-header" style="height: 40vh; min-height: 300px; background-image: linear-gradient(rgba(31, 31, 31, 0.8), rgba(31, 31, 31, 0.8)), url('https://images.unsplash.com/photo-1540575467063-178a50c2df87?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80'); margin-bottom: 40px;">
  5. <div class="container fade-up">
  6. <h1 class="page-title">Nos Événements</h1>
  7. <p style="font-size: 1.2rem; color: var(--gold); max-width: 600px; margin: 0 auto;">Festivals, conférences, expositions... Découvrez l'agenda culturel de WA BENIN.</p>
  8. </div>
  9. </div>
  10. <section class="section-padding" style="padding-top: 0;">
  11. <div class="container">
  12. <!-- Filters -->
  13. <form method="GET" action="{{ path('app_evenements') }}" style="background: #fff; padding: 20px; border-radius: var(--border-radius); box-shadow: var(--shadow-soft); margin-bottom: 40px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px;">
  14. <div style="display: flex; gap: 15px; align-items: center;">
  15. <select name="category" onchange="this.form.submit()" style="padding: 10px 15px; border: 1px solid #ddd; border-radius: 8px; outline: none; background: #f9f9f9; font-family: var(--font-body);">
  16. <option value="">Toutes les catégories</option>
  17. {% for cat in categories %}
  18. <option value="{{ cat }}" {% if current_category == cat %}selected{% endif %}>{{ cat }}</option>
  19. {% endfor %}
  20. </select>
  21. </div>
  22. <div style="position: relative; display: flex;">
  23. <input type="text" name="search" value="{{ search_query }}" placeholder="Rechercher un événement..." style="padding: 10px 15px; padding-right: 40px; border: 1px solid #ddd; border-radius: 8px 0 0 8px; outline: none; width: 250px; font-family: var(--font-body);">
  24. <button type="submit" style="background: var(--gold); color: #fff; border: none; padding: 0 15px; border-radius: 0 8px 8px 0; cursor: pointer;">
  25. <i class="fas fa-search"></i>
  26. </button>
  27. </div>
  28. </form>
  29. <!-- List View -->
  30. <div style="display: flex; flex-direction: column; gap: 30px;">
  31. {% for event in events %}
  32. <!-- Event Row -->
  33. <div class="fade-up" style="background: #fff; border-radius: var(--border-radius); overflow: hidden; box-shadow: var(--shadow-soft); display: flex; transition: var(--transition);">
  34. <div style="width: 350px; flex-shrink: 0; position: relative;">
  35. <img src="{{ event.image }}" alt="{{ event.title }}" style="width: 100%; height: 100%; object-fit: cover;">
  36. <div style="position: absolute; top: 20px; left: 20px; background: var(--white-off); padding: 10px 15px; border-radius: 8px; text-align: center; font-family: var(--font-heading); font-weight: 700; box-shadow: 0 4px 10px rgba(0,0,0,0.1);">
  37. <span style="display: block; color: var(--red); font-size: 1.5rem; line-height: 1;">{{ event.date|date('d') }}</span>
  38. <small style="font-size: 0.8rem; color: var(--black-soft);">{{ event.date|date('M') }}</small>
  39. </div>
  40. </div>
  41. <div style="padding: 30px; display: flex; flex-direction: column; justify-content: center; flex: 1;">
  42. <span style="color: var(--green); font-size: 0.85rem; font-weight: 600; text-transform: uppercase; margin-bottom: 10px; display: inline-block;">{{ event.category }}</span>
  43. <h3 style="font-size: 1.8rem; margin-bottom: 15px;">{{ event.title }}</h3>
  44. <div style="display: flex; gap: 20px; color: #666; font-size: 0.95rem; margin-bottom: 20px;">
  45. <span><i class="fas fa-map-marker-alt" style="color: var(--gold);"></i> {{ event.location }}</span>
  46. <span><i class="far fa-clock" style="color: var(--gold);"></i> {{ event.date|date('H:i') }}</span>
  47. <span><i class="fas fa-ticket-alt" style="color: var(--gold);"></i> {% if event.isFree %} Gratuit {% else %} {{ event.price }} € {% endif %}</span>
  48. </div>
  49. <p style="color: #555; margin-bottom: 25px;">{{ event.description|slice(0, 150) ~ '...' }}</p>
  50. <div style="display: flex; gap: 15px;">
  51. <a href="#" class="btn btn-primary">Réserver ma place</a>
  52. <a href="{{ path('app_event_show', {id: event.id}) }}" class="btn btn-outline">En savoir plus</a>
  53. </div>
  54. </div>
  55. </div>
  56. {% else %}
  57. <p style="text-align: center;">Aucun événement programmé pour le moment.</p>
  58. {% endfor %}
  59. </div>
  60. {% if total_pages > 1 %}
  61. <div style="margin-top: 50px; display: flex; justify-content: center; gap: 10px;">
  62. {% for i in 1..total_pages %}
  63. <a href="{{ path('app_evenements', {page: i, category: current_category, search: search_query}) }}" style="width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; {% if current_page == i %}background: var(--gold); color: #fff; border: none;{% else %}background: #fff; border: 1px solid #ddd; color: var(--black-dark);{% endif %} border-radius: 8px; font-weight: bold;">
  64. {{ i }}
  65. </a>
  66. {% endfor %}
  67. </div>
  68. {% endif %}
  69. </div>
  70. </section>
  71. <style>
  72. @media (max-width: 768px) {
  73. .fade-up { flex-direction: column !important; }
  74. .fade-up > div:first-child { width: 100% !important; height: 250px; }
  75. }
  76. </style>
  77. {% endblock %}