develop #3
@@ -7,8 +7,7 @@ class PagesController < ApplicationController
|
|||||||
|
|
||||||
# Homepage showing featured events
|
# Homepage showing featured events
|
||||||
def home
|
def home
|
||||||
# @events = Event.published.featured.limit(3)
|
@events = Event.published.featured.limit(3)
|
||||||
# @events = Event.where(state: :published).order(created_at: :desc)
|
|
||||||
|
|
||||||
if user_signed_in?
|
if user_signed_in?
|
||||||
return redirect_to(dashboard_path)
|
return redirect_to(dashboard_path)
|
||||||
|
|||||||
@@ -1,7 +1,3 @@
|
|||||||
// Entry point for the build script in your package.json
|
// Entry point for the build script in your package.json
|
||||||
import "@hotwired/turbo-rails";
|
import "@hotwired/turbo-rails";
|
||||||
import Alpine from 'alpinejs';
|
|
||||||
import "./controllers";
|
import "./controllers";
|
||||||
|
|
||||||
window.Alpine = Alpine;
|
|
||||||
Alpine.start();
|
|
||||||
|
|||||||
@@ -6,4 +6,8 @@ const application = Application.start();
|
|||||||
application.debug = false;
|
application.debug = false;
|
||||||
window.Stimulus = application;
|
window.Stimulus = application;
|
||||||
|
|
||||||
|
// import Alpine from 'alpinejs';
|
||||||
|
// window.Alpine = Alpine;
|
||||||
|
// Alpine.start();
|
||||||
|
|
||||||
export { application };
|
export { application };
|
||||||
|
|||||||
@@ -7,15 +7,17 @@ import { application } from "./application"
|
|||||||
import LogoutController from "./logout_controller"
|
import LogoutController from "./logout_controller"
|
||||||
import FlashMessageController from "./flash_message_controller"
|
import FlashMessageController from "./flash_message_controller"
|
||||||
import CounterController from "./counter_controller"
|
import CounterController from "./counter_controller"
|
||||||
import FeaturedEventController from "./featured_event_controller"
|
// import FeaturedEventController from "./featured_event_controller"
|
||||||
|
|
||||||
|
|
||||||
application.register("logout", LogoutController) // Allow logout using js
|
// application.register("logout", LogoutController) // Allow logout using js
|
||||||
application.register("flash-message", FlashMessageController) // Dismiss notification after 5 secondes
|
// application.register("flash-message", FlashMessageController) // Dismiss notification after 5 secondes
|
||||||
application.register("counter", CounterController) // Simple counter for homepage
|
// application.register("counter", CounterController) // Simple counter for homepage
|
||||||
application.register("featured-event", FeaturedEventController) // Featured event controller for homepage
|
// application.register("featured-event", FeaturedEventController) // Featured event controller for homepage
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// import ShadcnTestController from "./shadcn_test_controller"
|
// import ShadcnTestController from "./shadcn_test_controller"
|
||||||
// application.register("shadcn-test", ShadcnTestController) // Test controller for Shadcn
|
// application.register("shadcn-test", ShadcnTestController) // Test controller for Shadcn
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -26,97 +26,43 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="featured-events-grid" data-controller="featured-event">
|
<div class="featured-events-grid" data-controller="featured-event">
|
||||||
<!-- Featured Event 1 -->
|
<% @events.each do |event| %>
|
||||||
<div class="featured-event-card" data-featured-event-target="card">
|
<div class="featured-event-card" data-featured-event-target="card">
|
||||||
<img src="https://images.unsplash.com/photo-1540039155733-5bb30b53aa14?w=600&h=300&fit=crop" alt="Soirée de réseautage Tech & Innovation" class="featured-event-image" data-featured-event-target="animated">
|
<%= link_to event_path(event.slug, event) do %>
|
||||||
<div class="featured-event-content">
|
<img src="<%= event.image %>" alt="<%= event.name %>" class="featured-event-image" data-featured-event-target="animated">
|
||||||
<div class="featured-event-badges">
|
<% end %>
|
||||||
<span class="badge badge-featured">★ En vedette</span>
|
<div class="featured-event-content">
|
||||||
<span class="badge badge-available">Disponible</span>
|
<div class="featured-event-badges">
|
||||||
</div>
|
<% if event.featured? %>
|
||||||
<h3 class="featured-event-title">Soirée de réseautage Tech & Innovation</h3>
|
<span class="badge badge-featured">★ En vedette</span>
|
||||||
<div class="featured-event-meta">
|
<% end %>
|
||||||
<div class="featured-event-meta-item">
|
<% if event.tickets.any? { |ticket| ticket.quantity > 0 } %>
|
||||||
<i data-lucide="calendar"></i>
|
<span class="badge badge-available">Disponible</span>
|
||||||
Jeu, Mar 15 • 18:30 - 22:00
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<div class="featured-event-meta-item">
|
<h3 class="featured-event-title"><%= event.name %></h3>
|
||||||
<i data-lucide="map-pin"></i>
|
<div class="featured-event-meta">
|
||||||
Le Perchoir Marais, Paris
|
<div class="featured-event-meta-item">
|
||||||
|
<i data-lucide="calendar"></i>
|
||||||
|
<%= l(event.start_time, format: '%a, %b %d • %H:%M - %H:%M') %> <!-- Format: Wed, Jan 1 • 18:30 - 22:00 -->
|
||||||
|
</div>
|
||||||
|
<div class="featured-event-meta-item">
|
||||||
|
<i data-lucide="map-pin"></i>
|
||||||
|
<%= event.venue_name %>, <%= event.venue_address %>
|
||||||
|
</div>
|
||||||
|
<div class="featured-event-meta-item">
|
||||||
|
<i data-lucide="users"></i>
|
||||||
|
<%= event.tickets.sum(:quantity) %> participants • <%= event.tickets.joins(:ticket_type).where('ticket_types.quantity > ?', 0).count %> places disponibles
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="featured-event-meta-item">
|
<p class="featured-event-description"><%= event.description %></p>
|
||||||
<i data-lucide="users"></i>
|
<div class="featured-event-footer">
|
||||||
85 participants • 15 places disponibles
|
<span class="featured-event-price">€<%= event.ticket_types.minimum(:price_cents).to_f / 100 %></span>
|
||||||
|
<%= link_to "Réserver une place", event_path(event.slug, event), class: "btn btn-sm btn-primary" %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<p class="featured-event-description">Rejoignez plus de 100 professionnels de la technologie pour une soirée exclusive de réseautage, de boissons et de découvertes des dernières tendances innovantes. Connectez-vous avec des startups, des investisseurs et des leaders de l'industrie.</p>
|
|
||||||
<div class="featured-event-footer">
|
|
||||||
<span class="featured-event-price">€35</span>
|
|
||||||
<button class="btn btn-sm btn-primary">Réserver une place</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<% end %>
|
||||||
|
|
||||||
<!-- Featured Event 2 -->
|
|
||||||
<div class="featured-event-card" data-featured-event-target="card">
|
|
||||||
<img src="https://images.unsplash.com/photo-1574391884720-bbc3740c59d1?w=400&h=240&fit=crop" alt="Rencontre exclusive des directeurs créatifs" class="featured-event-image" data-featured-event-target="animated">
|
|
||||||
<div class="featured-event-content">
|
|
||||||
<div class="featured-event-badges">
|
|
||||||
<span class="badge badge-vip">VIP</span>
|
|
||||||
<span class="badge badge-limited">Limité</span>
|
|
||||||
</div>
|
|
||||||
<h3 class="featured-event-title">Rencontre exclusive des directeurs créatifs</h3>
|
|
||||||
<div class="featured-event-meta">
|
|
||||||
<div class="featured-event-meta-item">
|
|
||||||
<i data-lucide="calendar"></i>
|
|
||||||
Ven, Mar 16 • 19:00 - 23:00
|
|
||||||
</div>
|
|
||||||
<div class="featured-event-meta-item">
|
|
||||||
<i data-lucide="map-pin"></i>
|
|
||||||
Atelier Des Lumières, Paris
|
|
||||||
</div>
|
|
||||||
<div class="featured-event-meta-item">
|
|
||||||
<i data-lucide="users"></i>
|
|
||||||
30 créatifs • 8 places disponibles
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<p class="featured-event-description">Un rassemblement intime de directeurs créatifs, de designers et d'artistes visuels. Découvrez des installations d'art immersives tout en vous connectant avec des pionniers de l'industrie.</p>
|
|
||||||
<div class="featured-event-footer">
|
|
||||||
<span class="featured-event-price">€65</span>
|
|
||||||
<button class="btn btn-sm btn-primary">Rejoindre le VIP</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Featured Event 3 -->
|
|
||||||
<div class="featured-event-card" data-featured-event-target="card">
|
|
||||||
<img src="https://images.unsplash.com/photo-1569949381669-ecf31ae8e613?w=400&h=240&fit=crop" alt="Dégustation de vin et d'affaires de luxe" class="featured-event-image" data-featured-event-target="animated">
|
|
||||||
<div class="featured-event-content">
|
|
||||||
<div class="featured-event-badges">
|
|
||||||
<span class="badge badge-available">Disponible</span>
|
|
||||||
</div>
|
|
||||||
<h3 class="featured-event-title">Dégustation de vin et d'affaires de luxe</h3>
|
|
||||||
<div class="featured-event-meta">
|
|
||||||
<div class="featured-event-meta-item">
|
|
||||||
<i data-lucide="calendar"></i>
|
|
||||||
Sam, Mar 18 • 17:00 - 21:00
|
|
||||||
</div>
|
|
||||||
<div class="featured-event-meta-item">
|
|
||||||
<i data-lucide="map-pin"></i>
|
|
||||||
Cave Legrand, Paris
|
|
||||||
</div>
|
|
||||||
<div class="featured-event-meta-item">
|
|
||||||
<i data-lucide="users"></i>
|
|
||||||
45 professionnels • 12 places disponibles
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<p class="featured-event-description">Découvrez des vins français exceptionnels tout en vous connectant avec des professionnels d'affaires. Guidance d'un sommelier expert et dégustations de luxe dans une cave à vin historique.</p>
|
|
||||||
<div class="featured-event-footer">
|
|
||||||
<span class="featured-event-price">€55</span>
|
|
||||||
<button class="btn btn-sm btn-secondary">Réserver maintenant</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style="text-align: center; margin-top: var(--space-12);">
|
<div style="text-align: center; margin-top: var(--space-12);">
|
||||||
|
|||||||
Reference in New Issue
Block a user