fix
All checks were successful
CI/CD Pipeline / Backend - Build, Test & Push (push) Successful in 20m31s
CI/CD Pipeline / Frontend - Build, Test & Push (push) Successful in 38m16s
CI/CD Pipeline / Integration Tests (push) Has been skipped
CI/CD Pipeline / Deployment Summary (push) Successful in 1s
CI/CD Pipeline / Deploy to Portainer (push) Successful in 12s
CI/CD Pipeline / Discord Notification (Failure) (push) Has been skipped
CI/CD Pipeline / Discord Notification (Success) (push) Successful in 1s
All checks were successful
CI/CD Pipeline / Backend - Build, Test & Push (push) Successful in 20m31s
CI/CD Pipeline / Frontend - Build, Test & Push (push) Successful in 38m16s
CI/CD Pipeline / Integration Tests (push) Has been skipped
CI/CD Pipeline / Deployment Summary (push) Successful in 1s
CI/CD Pipeline / Deploy to Portainer (push) Successful in 12s
CI/CD Pipeline / Discord Notification (Failure) (push) Has been skipped
CI/CD Pipeline / Discord Notification (Success) (push) Successful in 1s
This commit is contained in:
parent
a200987288
commit
94039598d9
@ -1,18 +1,14 @@
|
||||
'use client';
|
||||
|
||||
import { useEffect, useRef, useState } from 'react';
|
||||
import { useRef } from 'react';
|
||||
import Link from 'next/link';
|
||||
import Image from 'next/image';
|
||||
import { motion, useInView, useScroll, useTransform, AnimatePresence } from 'framer-motion';
|
||||
import { motion, useInView, useScroll, useTransform } from 'framer-motion';
|
||||
import {
|
||||
Ship,
|
||||
TrendingUp,
|
||||
Globe,
|
||||
Shield,
|
||||
Zap,
|
||||
BarChart3,
|
||||
Calculator,
|
||||
MapPin,
|
||||
Package,
|
||||
Clock,
|
||||
CheckCircle2,
|
||||
@ -25,46 +21,14 @@ import {
|
||||
Bell,
|
||||
BookOpen,
|
||||
Users,
|
||||
Building2,
|
||||
Check,
|
||||
X,
|
||||
ChevronDown,
|
||||
Briefcase,
|
||||
Newspaper,
|
||||
Mail,
|
||||
Info,
|
||||
} from 'lucide-react';
|
||||
import { useAuth } from '@/lib/context/auth-context';
|
||||
import { LandingHeader, LandingFooter } from '@/components/layout';
|
||||
|
||||
export default function LandingPage() {
|
||||
const [isScrolled, setIsScrolled] = useState(false);
|
||||
const [isCompanyMenuOpen, setIsCompanyMenuOpen] = useState(false);
|
||||
const { user, isAuthenticated, loading } = useAuth();
|
||||
|
||||
const companyMenuItems = [
|
||||
{ href: '/about', label: 'À propos', icon: Info, description: 'Notre histoire et mission' },
|
||||
{ href: '/contact', label: 'Contact', icon: Mail, description: 'Nous contacter' },
|
||||
{ href: '/careers', label: 'Carrières', icon: Briefcase, description: 'Rejoignez-nous' },
|
||||
{ href: '/blog', label: 'Blog', icon: BookOpen, description: 'Actualités et insights' },
|
||||
{ href: '/press', label: 'Presse', icon: Newspaper, description: 'Espace presse' },
|
||||
];
|
||||
|
||||
// Helper function to get user initials
|
||||
const getUserInitials = () => {
|
||||
if (!user) return '';
|
||||
const firstInitial = user.firstName?.charAt(0)?.toUpperCase() || '';
|
||||
const lastInitial = user.lastName?.charAt(0)?.toUpperCase() || '';
|
||||
return firstInitial + lastInitial || user.email?.charAt(0)?.toUpperCase() || '?';
|
||||
};
|
||||
|
||||
// Helper function to get full name
|
||||
const getFullName = () => {
|
||||
if (!user) return '';
|
||||
if (user.firstName && user.lastName) {
|
||||
return `${user.firstName} ${user.lastName}`;
|
||||
}
|
||||
return user.email || '';
|
||||
};
|
||||
const { user, isAuthenticated } = useAuth();
|
||||
|
||||
const heroRef = useRef(null);
|
||||
const featuresRef = useRef(null);
|
||||
@ -85,14 +49,6 @@ export default function LandingPage() {
|
||||
const { scrollYProgress } = useScroll();
|
||||
const backgroundY = useTransform(scrollYProgress, [0, 1], ['0%', '50%']);
|
||||
|
||||
useEffect(() => {
|
||||
const handleScroll = () => {
|
||||
setIsScrolled(window.scrollY > 50);
|
||||
};
|
||||
window.addEventListener('scroll', handleScroll);
|
||||
return () => window.removeEventListener('scroll', handleScroll);
|
||||
}, []);
|
||||
|
||||
const features = [
|
||||
{
|
||||
icon: BarChart3,
|
||||
@ -292,140 +248,7 @@ export default function LandingPage() {
|
||||
|
||||
return (
|
||||
<div className="min-h-screen bg-white">
|
||||
{/* Navigation */}
|
||||
<motion.nav
|
||||
initial={{ y: -100 }}
|
||||
animate={{ y: 0 }}
|
||||
className={`fixed top-0 left-0 right-0 z-50 transition-all duration-300 ${
|
||||
isScrolled ? 'bg-brand-navy/95 backdrop-blur-md shadow-lg' : 'bg-transparent'
|
||||
}`}
|
||||
>
|
||||
<div className="max-w-7xl mx-auto px-6 lg:px-8">
|
||||
<div className="flex items-center justify-between h-20">
|
||||
<Link href="/" className="flex items-center space-x-2">
|
||||
<Image
|
||||
src="/assets/logos/logo-white.png"
|
||||
alt="Xpeditis"
|
||||
width={70}
|
||||
height={80}
|
||||
priority
|
||||
className="h-auto"
|
||||
/>
|
||||
</Link>
|
||||
<div className="hidden md:flex items-center space-x-8">
|
||||
<Link
|
||||
href="#features"
|
||||
className="text-white hover:text-brand-turquoise transition-colors font-medium"
|
||||
>
|
||||
Fonctionnalités
|
||||
</Link>
|
||||
<Link
|
||||
href="#tools"
|
||||
className="text-white hover:text-brand-turquoise transition-colors font-medium"
|
||||
>
|
||||
Outils
|
||||
</Link>
|
||||
<Link
|
||||
href="#pricing"
|
||||
className="text-white hover:text-brand-turquoise transition-colors font-medium"
|
||||
>
|
||||
Tarifs
|
||||
</Link>
|
||||
|
||||
{/* Menu Entreprise */}
|
||||
<div
|
||||
className="relative"
|
||||
onMouseEnter={() => setIsCompanyMenuOpen(true)}
|
||||
onMouseLeave={() => setIsCompanyMenuOpen(false)}
|
||||
>
|
||||
<button
|
||||
className="flex items-center space-x-1 text-white hover:text-brand-turquoise transition-colors font-medium"
|
||||
>
|
||||
<span>Entreprise</span>
|
||||
<ChevronDown
|
||||
className={`w-4 h-4 transition-transform ${isCompanyMenuOpen ? 'rotate-180' : ''}`}
|
||||
/>
|
||||
</button>
|
||||
|
||||
<AnimatePresence>
|
||||
{isCompanyMenuOpen && (
|
||||
<motion.div
|
||||
initial={{ opacity: 0, y: 10 }}
|
||||
animate={{ opacity: 1, y: 0 }}
|
||||
exit={{ opacity: 0, y: 10 }}
|
||||
transition={{ duration: 0.2 }}
|
||||
className="absolute top-full left-1/2 -translate-x-1/2 pt-4 z-50"
|
||||
>
|
||||
<div className="bg-white rounded-2xl shadow-2xl border border-gray-100 overflow-hidden min-w-[280px]">
|
||||
<div className="p-2">
|
||||
{companyMenuItems.map((item) => {
|
||||
const IconComponent = item.icon;
|
||||
return (
|
||||
<Link
|
||||
key={item.href}
|
||||
href={item.href}
|
||||
className="flex items-center space-x-3 px-4 py-3 rounded-xl hover:bg-gray-50 transition-colors group"
|
||||
>
|
||||
<div className="w-10 h-10 bg-brand-turquoise/10 rounded-lg flex items-center justify-center group-hover:bg-brand-turquoise/20 transition-colors">
|
||||
<IconComponent className="w-5 h-5 text-brand-turquoise" />
|
||||
</div>
|
||||
<div>
|
||||
<div className="font-medium text-brand-navy group-hover:text-brand-turquoise transition-colors">
|
||||
{item.label}
|
||||
</div>
|
||||
<div className="text-sm text-gray-500">
|
||||
{item.description}
|
||||
</div>
|
||||
</div>
|
||||
</Link>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
</motion.div>
|
||||
)}
|
||||
</AnimatePresence>
|
||||
</div>
|
||||
|
||||
{/* Affichage conditionnel: connecté vs non connecté */}
|
||||
{loading ? (
|
||||
<div className="w-8 h-8 rounded-full bg-white/20 animate-pulse" />
|
||||
) : isAuthenticated && user ? (
|
||||
<Link
|
||||
href="/dashboard"
|
||||
className="flex items-center space-x-3 group"
|
||||
>
|
||||
{/* Avatar avec initiales */}
|
||||
<div className="w-10 h-10 rounded-full bg-brand-turquoise flex items-center justify-center text-white font-semibold text-sm border-2 border-white/30 group-hover:border-white transition-colors">
|
||||
{getUserInitials()}
|
||||
</div>
|
||||
{/* Nom de l'utilisateur */}
|
||||
<span className="text-white font-medium group-hover:text-brand-turquoise transition-colors max-w-[150px] truncate">
|
||||
{getFullName()}
|
||||
</span>
|
||||
{/* Icône dashboard */}
|
||||
<LayoutDashboard className="w-5 h-5 text-white/70 group-hover:text-brand-turquoise transition-colors" />
|
||||
</Link>
|
||||
) : (
|
||||
<>
|
||||
<Link
|
||||
href="/login"
|
||||
className="text-white hover:text-brand-turquoise transition-colors font-medium"
|
||||
>
|
||||
Connexion
|
||||
</Link>
|
||||
<Link
|
||||
href="/register"
|
||||
className="px-6 py-2.5 bg-brand-turquoise text-white rounded-lg hover:bg-brand-turquoise/90 transition-all hover:shadow-lg font-medium"
|
||||
>
|
||||
Commencer Gratuitement
|
||||
</Link>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</motion.nav>
|
||||
<LandingHeader transparentOnTop={true} />
|
||||
|
||||
{/* Hero Section */}
|
||||
<section ref={heroRef} className="relative min-h-screen flex items-center overflow-hidden">
|
||||
@ -1052,165 +875,7 @@ export default function LandingPage() {
|
||||
</motion.div>
|
||||
</section>
|
||||
|
||||
{/* Footer */}
|
||||
<footer className="bg-brand-navy text-white py-16">
|
||||
<div className="max-w-7xl mx-auto px-6 lg:px-8">
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-5 gap-12 mb-12">
|
||||
{/* Company Info */}
|
||||
<div className="lg:col-span-2">
|
||||
<Image
|
||||
src="/assets/logos/logo-white.png"
|
||||
alt="Xpeditis"
|
||||
width={160}
|
||||
height={55}
|
||||
className="h-auto mb-6"
|
||||
/>
|
||||
<p className="text-white/70 text-sm mb-6 leading-relaxed">
|
||||
Xpeditis est la plateforme B2B leader pour le fret maritime en Europe. Nous
|
||||
connectons les transitaires avec les plus grandes compagnies maritimes mondiales.
|
||||
</p>
|
||||
<div className="flex space-x-4">
|
||||
<a
|
||||
href="#"
|
||||
className="w-10 h-10 bg-white/10 hover:bg-brand-turquoise rounded-full flex items-center justify-center transition-colors"
|
||||
>
|
||||
<span className="sr-only">LinkedIn</span>
|
||||
<svg className="w-5 h-5" fill="currentColor" viewBox="0 0 24 24">
|
||||
<path d="M19 0h-14c-2.761 0-5 2.239-5 5v14c0 2.761 2.239 5 5 5h14c2.762 0 5-2.239 5-5v-14c0-2.761-2.238-5-5-5zm-11 19h-3v-11h3v11zm-1.5-12.268c-.966 0-1.75-.79-1.75-1.764s.784-1.764 1.75-1.764 1.75.79 1.75 1.764-.783 1.764-1.75 1.764zm13.5 12.268h-3v-5.604c0-3.368-4-3.113-4 0v5.604h-3v-11h3v1.765c1.396-2.586 7-2.777 7 2.476v6.759z" />
|
||||
</svg>
|
||||
</a>
|
||||
<a
|
||||
href="#"
|
||||
className="w-10 h-10 bg-white/10 hover:bg-brand-turquoise rounded-full flex items-center justify-center transition-colors"
|
||||
>
|
||||
<span className="sr-only">Twitter</span>
|
||||
<svg className="w-5 h-5" fill="currentColor" viewBox="0 0 24 24">
|
||||
<path d="M24 4.557c-.883.392-1.832.656-2.828.775 1.017-.609 1.798-1.574 2.165-2.724-.951.564-2.005.974-3.127 1.195-.897-.957-2.178-1.555-3.594-1.555-3.179 0-5.515 2.966-4.797 6.045-4.091-.205-7.719-2.165-10.148-5.144-1.29 2.213-.669 5.108 1.523 6.574-.806-.026-1.566-.247-2.229-.616-.054 2.281 1.581 4.415 3.949 4.89-.693.188-1.452.232-2.224.084.626 1.956 2.444 3.379 4.6 3.419-2.07 1.623-4.678 2.348-7.29 2.04 2.179 1.397 4.768 2.212 7.548 2.212 9.142 0 14.307-7.721 13.995-14.646.962-.695 1.797-1.562 2.457-2.549z" />
|
||||
</svg>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Products */}
|
||||
<div>
|
||||
<h4 className="font-bold text-lg mb-4 text-white">Produits</h4>
|
||||
<ul className="space-y-3 text-white/70 text-sm">
|
||||
<li>
|
||||
<Link href="#features" className="hover:text-brand-turquoise transition-colors">
|
||||
Fonctionnalités
|
||||
</Link>
|
||||
</li>
|
||||
<li>
|
||||
<Link href="#tools" className="hover:text-brand-turquoise transition-colors">
|
||||
Outils & Calculateurs
|
||||
</Link>
|
||||
</li>
|
||||
<li>
|
||||
<Link href="#pricing" className="hover:text-brand-turquoise transition-colors">
|
||||
Tarifs
|
||||
</Link>
|
||||
</li>
|
||||
<li>
|
||||
<Link href="/api" className="hover:text-brand-turquoise transition-colors">
|
||||
API Documentation
|
||||
</Link>
|
||||
</li>
|
||||
<li>
|
||||
<Link
|
||||
href="/integrations"
|
||||
className="hover:text-brand-turquoise transition-colors"
|
||||
>
|
||||
Intégrations
|
||||
</Link>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
{/* Company */}
|
||||
<div>
|
||||
<h4 className="font-bold text-lg mb-4 text-white">Entreprise</h4>
|
||||
<ul className="space-y-3 text-white/70 text-sm">
|
||||
<li>
|
||||
<Link href="/about" className="hover:text-brand-turquoise transition-colors">
|
||||
À propos
|
||||
</Link>
|
||||
</li>
|
||||
<li>
|
||||
<Link href="/contact" className="hover:text-brand-turquoise transition-colors">
|
||||
Contact
|
||||
</Link>
|
||||
</li>
|
||||
<li>
|
||||
<Link href="/careers" className="hover:text-brand-turquoise transition-colors">
|
||||
Carrières
|
||||
</Link>
|
||||
</li>
|
||||
<li>
|
||||
<Link href="/blog" className="hover:text-brand-turquoise transition-colors">
|
||||
Blog
|
||||
</Link>
|
||||
</li>
|
||||
<li>
|
||||
<Link href="/press" className="hover:text-brand-turquoise transition-colors">
|
||||
Presse
|
||||
</Link>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
{/* Legal */}
|
||||
<div>
|
||||
<h4 className="font-bold text-lg mb-4 text-white">Légal</h4>
|
||||
<ul className="space-y-3 text-white/70 text-sm">
|
||||
<li>
|
||||
<Link href="/privacy" className="hover:text-brand-turquoise transition-colors">
|
||||
Politique de confidentialité
|
||||
</Link>
|
||||
</li>
|
||||
<li>
|
||||
<Link href="/terms" className="hover:text-brand-turquoise transition-colors">
|
||||
Conditions générales
|
||||
</Link>
|
||||
</li>
|
||||
<li>
|
||||
<Link href="/cookies" className="hover:text-brand-turquoise transition-colors">
|
||||
Politique de cookies
|
||||
</Link>
|
||||
</li>
|
||||
<li>
|
||||
<Link href="/security" className="hover:text-brand-turquoise transition-colors">
|
||||
Sécurité
|
||||
</Link>
|
||||
</li>
|
||||
<li>
|
||||
<Link href="/compliance" className="hover:text-brand-turquoise transition-colors">
|
||||
Conformité RGPD
|
||||
</Link>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Bottom Footer */}
|
||||
<div className="border-t border-white/10 pt-8">
|
||||
<div className="flex flex-col md:flex-row items-center justify-between space-y-4 md:space-y-0">
|
||||
<div className="text-white/50 text-sm">
|
||||
© 2025 Xpeditis SAS. Tous droits réservés.
|
||||
</div>
|
||||
<div className="flex items-center space-x-6 text-sm text-white/50">
|
||||
<span className="flex items-center space-x-2">
|
||||
<MapPin className="w-4 h-4" />
|
||||
<span>Paris, France</span>
|
||||
</span>
|
||||
<span className="flex items-center space-x-2">
|
||||
<Globe className="w-4 h-4" />
|
||||
<span>50+ Pays</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
<LandingFooter />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@ -63,19 +63,6 @@ export function LandingFooter() {
|
||||
Tarifs
|
||||
</Link>
|
||||
</li>
|
||||
<li>
|
||||
<Link href="/api" className="hover:text-brand-turquoise transition-colors">
|
||||
API Documentation
|
||||
</Link>
|
||||
</li>
|
||||
<li>
|
||||
<Link
|
||||
href="/integrations"
|
||||
className="hover:text-brand-turquoise transition-colors"
|
||||
>
|
||||
Intégrations
|
||||
</Link>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user