- Updated all breadcrumbs across the application to use the new consistent style - Added rounded background with shadow for better visual hierarchy - Improved spacing and responsive design - Maintained proper navigation paths for all pages - Enhanced overall UI consistency with the new design language Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
165 lines
6.5 KiB
Plaintext
Executable File
165 lines
6.5 KiB
Plaintext
Executable File
<div class="container min-h-screen mx-auto px-4 sm:px-6 lg:px-8 py-8">
|
|
<div class="flex justify-between items-center my-8">
|
|
<h1 class="text-3xl font-bold text-gray-900">Événements à venir</h1>
|
|
<div class="text-sm text-gray-500">
|
|
<%= @events.total_count %>
|
|
événements trouvés
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Breadcrumb -->
|
|
<nav class="flex mb-6" aria-label="Breadcrumb">
|
|
<ol class="inline-flex items-center space-x-1 md:space-x-2 rounded-lg bg-white px-4 py-2 shadow-sm">
|
|
<li class="inline-flex items-center">
|
|
<%= link_to "Accueil", root_path, class: "inline-flex items-center text-sm font-medium text-gray-700 hover:text-purple-600" %>
|
|
</li>
|
|
<li>
|
|
<div class="flex items-center">
|
|
<svg class="w-4 h-4 text-gray-400" fill="currentColor" viewBox="0 0 20 20">
|
|
<path fill-rule="evenodd" d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z" clip-rule="evenodd"></path>
|
|
</svg>
|
|
<span class="ml-1 text-sm font-medium text-purple-600 md:ml-2">Événements</span>
|
|
</div>
|
|
</li>
|
|
</ol>
|
|
</nav>
|
|
|
|
<% if @events.any? %>
|
|
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
|
|
<% @events.each do |event| %>
|
|
<div
|
|
class="
|
|
bg-white rounded-xl shadow-md overflow-hidden hover:shadow-xl transition-all
|
|
duration-300 transform hover:-translate-y-1
|
|
"
|
|
>
|
|
<% if event.image.present? %>
|
|
<div class="h-48 overflow-hidden">
|
|
<%= 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="
|
|
h-48 bg-gradient-to-r from-purple-500 to-indigo-600 flex items-center
|
|
justify-center
|
|
"
|
|
>
|
|
<svg
|
|
class="w-16 h-16 text-white opacity-80"
|
|
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="p-6">
|
|
<div class="flex justify-between items-start mb-3">
|
|
<div>
|
|
<h2 class="text-xl font-bold text-gray-900 line-clamp-1"><%= event.name %></h2>
|
|
<p class="text-xs text-gray-500 flex items-center mt-1">
|
|
<svg class="w-4 h-4 mr-1" 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="
|
|
inline-flex items-center my-2 px-2.5 py-2 rounded-full text-xs font-medium
|
|
bg-purple-100 text-purple-800
|
|
"
|
|
>
|
|
<%= event.start_time.strftime("%d/%m") %>
|
|
</span>
|
|
</div>
|
|
|
|
<div class="mb-4">
|
|
<p class="text-gray-600 text-sm line-clamp-2"><%= event.description.truncate(100) %></p>
|
|
</div>
|
|
|
|
<div class="flex justify-between items-center">
|
|
<div>
|
|
<% if event.ticket_types.any? %>
|
|
<p class="text-sm font-medium text-gray-900">
|
|
À partir de
|
|
<%= format_price(event.ticket_types.minimum(:price_cents)) %>€
|
|
</p>
|
|
<% else %>
|
|
<p class="text-sm text-gray-500">Pas de billets disponibles</p>
|
|
<% end %>
|
|
</div>
|
|
|
|
<%= link_to event_path(event.slug, event), class: "inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-lg shadow-sm text-white bg-gradient-to-r from-purple-600 to-indigo-600 hover:from-purple-700 hover:to-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-purple-500 transition-all duration-200" do %>
|
|
Détails
|
|
<svg class="w-4 h-4 ml-2" 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>
|
|
</div>
|
|
<% end %>
|
|
</div>
|
|
|
|
<div class="mt-8 flex justify-center">
|
|
<%= paginate @events, theme: "tailwind" %>
|
|
</div>
|
|
<% else %>
|
|
<div class="text-center py-16">
|
|
<div class="mx-auto max-w-md">
|
|
<div
|
|
class="
|
|
w-24 h-24 mx-auto bg-gradient-to-r from-purple-100 to-indigo-100 rounded-full
|
|
flex items-center justify-center mb-6
|
|
"
|
|
>
|
|
<svg
|
|
class="w-12 h-12 text-purple-600"
|
|
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="text-lg font-medium text-gray-900 mb-2">Aucun événement disponible</h3>
|
|
<p class="text-gray-500 mb-6">Il n'y a aucun événement à venir pour le moment.</p>
|
|
<%= link_to "Retour à l'accueil",
|
|
root_path,
|
|
class:
|
|
"inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-gradient-to-r from-purple-600 to-indigo-600 hover:from-purple-700 hover:to-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-purple-500" %>
|
|
</div>
|
|
</div>
|
|
<% end %>
|
|
</div>
|