136 lines
4.4 KiB
Plaintext
Executable File
136 lines
4.4 KiB
Plaintext
Executable File
<div class="container">
|
|
<!-- Breadcrumb -->
|
|
<nav class="breadcrumb" aria-label="Breadcrumb">
|
|
<div class="breadcrumb-item">
|
|
<%= link_to "Accueil", root_path %>
|
|
</div>
|
|
<div class="breadcrumb-item breadcrumb-current">
|
|
Événements
|
|
</div>
|
|
</nav>
|
|
|
|
<!-- Page Header -->
|
|
<header class="page-header">
|
|
<div>
|
|
<h1 class="page-title">Événements à venir</h1>
|
|
</div>
|
|
<div class="page-meta">
|
|
<%= @events.total_count %>
|
|
événements trouvés
|
|
</div>
|
|
</header>
|
|
|
|
<!-- Events Grid -->
|
|
<% if @events.any? %>
|
|
<div class="events-grid">
|
|
<% @events.each do |event| %>
|
|
<article class="event-card">
|
|
<% if event.image.present? %>
|
|
<div class="event-card-image">
|
|
<%= link_to event_path(event.slug, event) do %>
|
|
<img
|
|
src="<%= event.image %>"
|
|
alt="<%= event.name %>"
|
|
class="featured-event-image"
|
|
data-featured-event-target="animated"
|
|
>
|
|
<% end %>
|
|
</div>
|
|
<% else %>
|
|
<div class="event-card-placeholder">
|
|
<svg
|
|
fill="none"
|
|
stroke="currentColor"
|
|
viewBox="0 0 24 24"
|
|
>
|
|
<path
|
|
stroke-linecap="round"
|
|
stroke-linejoin="round"
|
|
stroke-width="2"
|
|
d="M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"
|
|
/>
|
|
</svg>
|
|
</div>
|
|
<% end %>
|
|
|
|
<div class="event-card-content">
|
|
<div class="event-card-header">
|
|
<div>
|
|
<h2 class="event-card-title"><%= event.name %></h2>
|
|
<p class="event-card-venue">
|
|
<svg width="16" height="16" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path
|
|
stroke-linecap="round"
|
|
stroke-linejoin="round"
|
|
stroke-width="2"
|
|
d="M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z"
|
|
/>
|
|
</svg>
|
|
<%= event.venue_name.truncate(20) %>
|
|
</p>
|
|
</div>
|
|
<span class="event-card-date">
|
|
<%= event.start_time.strftime("%d/%m") %>
|
|
</span>
|
|
</div>
|
|
|
|
<p class="event-card-description">
|
|
<%= event.description.truncate(100) %>
|
|
</p>
|
|
|
|
<div class="event-card-footer">
|
|
<div>
|
|
<% if event.ticket_types.any? %>
|
|
<p class="event-card-price">
|
|
À partir de <%= format_price(event.ticket_types.minimum(:price_cents)) %>€
|
|
</p>
|
|
<% else %>
|
|
<p class="event-card-price-unavailable">Pas de billets disponibles</p>
|
|
<% end %>
|
|
</div>
|
|
|
|
<%= link_to event_path(event.slug, event), class: "event-card-link" do %>
|
|
Détails
|
|
<svg width="16" height="16" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path
|
|
stroke-linecap="round"
|
|
stroke-linejoin="round"
|
|
stroke-width="2"
|
|
d="M9 5l7 7-7 7"
|
|
/>
|
|
</svg>
|
|
<% end %>
|
|
</div>
|
|
</div>
|
|
</article>
|
|
<% end %>
|
|
</div>
|
|
|
|
<!-- Pagination -->
|
|
<div class="pagination">
|
|
<%= paginate @events, theme: "tailwind" %>
|
|
</div>
|
|
<% else %>
|
|
<!-- Empty State -->
|
|
<div class="empty-state">
|
|
<div class="empty-state-icon">
|
|
<svg
|
|
fill="none"
|
|
stroke="currentColor"
|
|
viewBox="0 0 24 24"
|
|
>
|
|
<path
|
|
stroke-linecap="round"
|
|
stroke-linejoin="round"
|
|
stroke-width="2"
|
|
d="M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"
|
|
/>
|
|
</svg>
|
|
</div>
|
|
<h3 class="empty-state-title">Aucun événement disponible</h3>
|
|
<p class="empty-state-description">Il n'y a aucun événement à venir pour le moment.</p>
|
|
<%= link_to "Retour à l'accueil", root_path, class: "btn btn-primary" %>
|
|
</div>
|
|
<% end %>
|
|
</div>
|