refactor(events): replace parties concept with events throughout the application

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

This commit refactors the entire application to replace the 'parties' concept with 'events'. All controllers, models, views, and related files have been updated to reflect this change. The parties table has been replaced with an events table, and all related functionality has been updated accordingly.
This commit is contained in:
Kevin BATAILLE
2025-08-28 13:20:51 +02:00
parent 2f80fe8321
commit 30f3ecc6ad
218 changed files with 864 additions and 787 deletions

361
app/views/pages/home.html.erb Normal file → Executable file
View File

@@ -1,69 +1,44 @@
<% content_for :title, "Aperonight - Discover Premium Afterwork Events" %>
<% content_for :title, "Aperonight - Découvrez des événements après-travail de luxe" %>
<!-- Hero Section -->
<section class="hero">
<div class="container">
<div class="hero-content">
<h1>Discover Premium Afterwork Events</h1>
<p class="subtitle">Connect with professionals, explore unique venues, and create memorable experiences at carefully curated afterwork events in your city.</p>
<h1>Découvrez les afterworks à Paris</h1>
<p class="subtitle">Connectez-vous avec des professionnels, explorez des lieux uniques et créez des expériences mémorables lors d'événements après-travail soigneusement sélectionnés dans votre ville.</p>
<div class="cta-group">
<button class="btn btn-lg btn-primary">
<i data-lucide="search"></i>
Explore Events
</button>
<button class="btn btn-lg btn-secondary">
<i data-lucide="plus"></i>
Host an Event
</button>
</div>
<div class="hero-stats">
<div class="hero-stat">
<span class="hero-stat-number">150+</span>
<span class="hero-stat-label">Events Monthly</span>
</div>
<div class="hero-stat">
<span class="hero-stat-number">5.2K</span>
<span class="hero-stat-label">Active Members</span>
</div>
<div class="hero-stat">
<span class="hero-stat-number">200+</span>
<span class="hero-stat-label">Partner Venues</span>
</div>
<div class="hero-stat">
<span class="hero-stat-number">98%</span>
<span class="hero-stat-label">Satisfaction</span>
</div>
<%= link_to "Explorer les événements", events_path, class: "btn btn-lg btn-primary" %>
<%= link_to "Organiser un événement", "#", class: "btn btn-lg btn-secondary" %>
</div>
</div>
</div>
</section>
<%= render "components/party_finder" %>
<%= render "components/event_finder" %>
<!-- Featured Events Section -->
<section class="section featured-events" id="events">
<div class="container">
<div class="section-header">
<h2 class="section-title">Featured This Week</h2>
<p class="section-description">Handpicked premium events that bring together the best professionals and creators in the city.</p>
<h2 class="section-title">En vedette cette semaine</h2>
<p class="section-description">Événements de luxe sélectionnés avec soin qui réunissent les meilleurs professionnels et créateurs de la ville.</p>
</div>
<div class="featured-events-grid animate-fadeInUp">
<div class="featured-events-grid" data-controller="featured-event">
<!-- Featured Event 1 -->
<div class="featured-event-card animate-slideInLeft">
<img src="https://images.unsplash.com/photo-1540039155733-5bb30b53aa14?w=600&h=300&fit=crop" alt="Tech Networking Night" class="featured-event-image">
<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">
<div class="featured-event-content">
<div class="featured-event-badges">
<span class="badge badge-featured">★ Featured</span>
<span class="badge badge-available">Available</span>
<span class="badge badge-featured">★ En vedette</span>
<span class="badge badge-available">Disponible</span>
</div>
<h3 class="featured-event-title">Tech & Innovation Networking Night</h3>
<h3 class="featured-event-title">Soirée de réseautage Tech & Innovation</h3>
<div class="featured-event-meta">
<div class="featured-event-meta-item">
<i data-lucide="calendar"></i>
Thu, Mar 15 • 18:30 - 22:00
Jeu, Mar 15 • 18:30 - 22:00
</div>
<div class="featured-event-meta-item">
<i data-lucide="map-pin"></i>
@@ -71,30 +46,30 @@
</div>
<div class="featured-event-meta-item">
<i data-lucide="users"></i>
85 attendees • 15 spots left
85 participants • 15 places disponibles
</div>
</div>
<p class="featured-event-description">Join 100+ tech professionals for an exclusive evening of networking, drinks, and insights into the latest innovation trends. Connect with startups, investors, and industry leaders.</p>
<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">Reserve Spot</button>
<button class="btn btn-sm btn-primary">Réserver une place</button>
</div>
</div>
</div>
<!-- Featured Event 2 -->
<div class="featured-event-card animate-fadeInUp">
<img src="https://images.unsplash.com/photo-1574391884720-bbc3740c59d1?w=400&h=240&fit=crop" alt="Creative Afterwork" class="featured-event-image">
<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">Limited</span>
<span class="badge badge-limited">Limité</span>
</div>
<h3 class="featured-event-title">Creative Directors Exclusive Meetup</h3>
<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>
Fri, Mar 16 • 19:00 - 23:00
Ven, Mar 16 • 19:00 - 23:00
</div>
<div class="featured-event-meta-item">
<i data-lucide="map-pin"></i>
@@ -102,29 +77,29 @@
</div>
<div class="featured-event-meta-item">
<i data-lucide="users"></i>
30 creatives • 8 spots left
30 créatifs • 8 places disponibles
</div>
</div>
<p class="featured-event-description">An intimate gathering of creative directors, designers, and visual artists. Experience immersive art installations while networking with industry pioneers.</p>
<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">Join VIP</button>
<button class="btn btn-sm btn-primary">Rejoindre le VIP</button>
</div>
</div>
</div>
<!-- Featured Event 3 -->
<div class="featured-event-card animate-slideInRight">
<img src="https://images.unsplash.com/photo-1569949381669-ecf31ae8e613?w=400&h=240&fit=crop" alt="Wine Tasting" class="featured-event-image">
<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">Available</span>
<span class="badge badge-available">Disponible</span>
</div>
<h3 class="featured-event-title">Wine & Business Premium Tasting</h3>
<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>
Sat, Mar 18 • 17:00 - 21:00
Sam, Mar 18 • 17:00 - 21:00
</div>
<div class="featured-event-meta-item">
<i data-lucide="map-pin"></i>
@@ -132,189 +107,105 @@
</div>
<div class="featured-event-meta-item">
<i data-lucide="users"></i>
45 professionals • 12 spots left
45 professionnels • 12 places disponibles
</div>
</div>
<p class="featured-event-description">Discover exceptional French wines while connecting with business professionals. Expert sommelier guidance and premium tastings in a historic wine cellar.</p>
<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">Book Now</button>
<button class="btn btn-sm btn-secondary">Réserver maintenant</button>
</div>
</div>
</div>
</div>
<div style="text-align: center; margin-top: var(--space-12);">
<%= link_to "View All Events", parties_path, class: "btn btn-lg btn-outline" %>
<%= link_to "Voir tous les événements", events_path, class: "btn btn-lg btn-outline" %>
</div>
</div>
</section>
<!-- Features Section -->
<section class="section features-section">
<div class="container">
<div class="section-header">
<h2 class="section-title">Why Choose Aperonight?</h2>
<p class="section-description">We curate premium experiences that connect professionals and create lasting relationships.</p>
</div>
<div class="features-grid">
<div class="feature-card">
<div class="feature-icon">
<i data-lucide="crown"></i>
</div>
<h3 class="feature-title">Premium Curation</h3>
<p class="feature-description">Every event is carefully selected and designed to provide exceptional value and networking opportunities.</p>
</div>
<div class="feature-card">
<div class="feature-icon">
<i data-lucide="shield-check"></i>
</div>
<h3 class="feature-title">Secure & Trusted</h3>
<p class="feature-description">Safe payments, verified venues, and trusted community with comprehensive insurance coverage.</p>
</div>
<div class="feature-card">
<div class="feature-icon">
<i data-lucide="users-2"></i>
</div>
<h3 class="feature-title">Quality Networking</h3>
<p class="feature-description">Connect with verified professionals, entrepreneurs, and industry leaders in intimate settings.</p>
</div>
<div class="feature-card">
<div class="feature-icon">
<i data-lucide="zap"></i>
</div>
<h3 class="feature-title">Instant Booking</h3>
<p class="feature-description">Seamless reservation process with instant confirmation and easy event management.</p>
</div>
</div>
</div>
</section>
<style>
/* Updated Featured Events Grid - 3 Cards Side by Side */
.featured-events-grid {
display: grid;
gap: var(--space-8);
grid-template-columns: 1fr;
}
<!-- Stats Section -->
<section class="section stats-section">
<div class="container">
<div class="stats-grid">
<div class="stat-item" data-controller="counter" data-action="counter:scroll->counter#animate">
<span class="stat-number" data-target-value="150">0</span>
<div class="stat-label">Monthly Events</div>
</div>
<div class="stat-item" data-controller="counter" data-action="counter:scroll->counter#animate">
<span class="stat-number" data-target-value="5200">0</span>
<div class="stat-label">Active Members</div>
</div>
<div class="stat-item" data-controller="counter" data-action="counter:scroll->counter#animate">
<span class="stat-number" data-target-value="200">0</span>
<div class="stat-label">Partner Venues</div>
</div>
<div class="stat-item" data-controller="counter" data-action="counter:scroll->counter#animate">
<span class="stat-number" data-target-value="98">0</span>
<div class="stat-label">Satisfaction Rate</div>
</div>
</div>
</div>
</section>
@media (min-width: 768px) {
.featured-events-grid {
grid-template-columns: repeat(2, 1fr);
}
}
@media (min-width: 1024px) {
.featured-events-grid {
grid-template-columns: repeat(3, 1fr);
}
}
.featured-event-card {
background: white;
border-radius: var(--radius-xl);
overflow: hidden;
box-shadow: var(--shadow-md);
transition: all var(--duration-slow) var(--ease-out);
border: 1px solid var(--color-neutral-200);
position: relative;
}
.featured-event-card:hover {
transform: translateY(-8px) scale(1.02);
box-shadow: var(--shadow-2xl);
border-color: var(--color-primary-200);
}
.featured-event-image {
width: 100%;
height: 240px;
object-fit: cover;
transition: transform var(--duration-slow) var(--ease-out);
}
.featured-event-card:hover .featured-event-image {
transform: scale(1.05);
}
.featured-event-content {
padding: var(--space-6);
}
.featured-event-badges {
display: flex;
gap: var(--space-2);
margin-bottom: var(--space-4);
flex-wrap: wrap;
}
.featured-event-title {
font-family: var(--font-display);
font-size: var(--text-xl);
font-weight: 700;
margin-bottom: var(--space-3);
color: var(--color-neutral-900);
line-height: 1.3;
}
.featured-event-meta {
display: flex;
flex-direction: column;
gap: var(--space-2);
margin-bottom: var(--space-4);
}
.featured-event-meta-item {
display: flex;
align-items: center;
gap: var(--space-2);
color: var(--color-neutral-600);
font-size: var(--text-sm);
font-weight: 500;
}
.featured-event-description {
color: var(--color-neutral-700);
margin-bottom: var(--space-6);
line-height: 1.6;
font-size: var(--text-sm);
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
overflow: hidden;
}
.featured-event-footer {
display: flex;
justify-content: space-between;
align-items: center;
}
.featured-event-price {
font-family: var(--font-display);
font-size: var(--text-xl);
font-weight: 800;
color: var(--color-primary-600);
}
@media (max-width: 768px) {
.featured-event-image {
height: 200px;
}
.featured-event-content {
padding: var(--space-4);
}
}
/* Enhanced animations */
.animate-slideInLeft {
opacity: 0;
transform: translateX(-30px);
transition: all 0.5s var(--ease-out);
}
.animate-slideInLeft.visible {
opacity: 1;
transform: translateX(0);
}
.animate-slideInRight {
opacity: 0;
transform: translateX(30px);
transition: all 0.5s var(--ease-out);
}
.animate-slideInRight.visible {
opacity: 1;
transform: translateX(0);
}
</style>
<script>
// Add animation classes when elements are in view
document.addEventListener("DOMContentLoaded", function() {
const observerOptions = {
threshold: 0.1,
rootMargin: '0px 0px -50px 0px'
};
const observer = new IntersectionObserver((entries) => {
entries.forEach(entry => {
if (entry.isIntersecting) {
entry.target.classList.add('visible');
}
});
}, observerOptions);
// Observe animated elements
document.querySelectorAll('.animate-fadeInUp, .animate-slideInLeft, .animate-slideInRight').forEach(el => {
observer.observe(el);
});
// Add staggered animation delays
document.querySelectorAll('.featured-event-card').forEach((card, index) => {
card.style.transitionDelay = `${index * 0.2}s`;
});
});
</script>
<!-- CTA Section -->
<section class="cta-section">
<div class="container">
<div class="cta-content">
<h2>Ready to Join the Community?</h2>
<p>Start discovering amazing events and connect with like-minded professionals in your city.</p>
<div style="display: flex; gap: var(--space-4); justify-content: center; flex-wrap: wrap;">
<button class="btn btn-lg" style="background: white; color: var(--color-primary-600); border: 2px solid white;">
<i data-lucide="user-plus"></i>
Join Now - Free
</button>
<button class="btn btn-lg btn-ghost" style="border: 2px solid rgba(255,255,255,0.5); color: white;">
<i data-lucide="calendar"></i>
Browse Events
</button>
</div>
</div>
</div>
</section>