This commit is contained in:
2026-04-12 22:51:57 +02:00
parent a5ccf2047b
commit c26c3b9485
37 changed files with 934 additions and 34 deletions

View File

@@ -0,0 +1,74 @@
"use client";
import React, { useState, useEffect } from 'react';
import Link from 'next/link';
import { X, Cookie } from 'lucide-react';
const CookieBanner = () => {
const [isVisible, setIsVisible] = useState(false);
useEffect(() => {
// Check if the user has already consented
const consent = localStorage.getItem('cookie-consent');
if (!consent) {
// Small delay for better UX
const timer = setTimeout(() => {
setIsVisible(true);
}, 1500);
return () => clearTimeout(timer);
}
}, []);
const handleConsent = (level: 'all' | 'essential') => {
localStorage.setItem('cookie-consent', level);
setIsVisible(false);
};
if (!isVisible) return null;
return (
<div className="fixed bottom-0 left-0 right-0 z-[100] p-4 md:p-6 pointer-events-none">
<div className="max-w-4xl mx-auto bg-gray-900 text-white rounded-2xl shadow-2xl border border-gray-800 p-5 md:p-6 pointer-events-auto transform transition-all duration-500 ease-in-out animate-in slide-in-from-bottom-10">
<div className="flex flex-col md:flex-row items-start md:items-center justify-between gap-6">
<div className="flex items-start gap-4">
<div className="bg-brand-500/10 p-2 rounded-lg shrink-0">
<Cookie className="w-6 h-6 text-brand-500" />
</div>
<div>
<h3 className="text-lg font-bold mb-1">Nous respectons votre vie privée</h3>
<p className="text-sm text-gray-400 leading-relaxed">
Afropreunariat utilise des cookies pour améliorer votre expérience, analyser le trafic et personnaliser le contenu.
Certains sont essentiels, d'autres nous aident à grandir avec vous.
Consultez nos <Link href="/cgu" className="text-brand-500 hover:underline">CGU</Link> pour en savoir plus.
</p>
</div>
</div>
<div className="flex flex-wrap gap-3 shrink-0 w-full md:w-auto">
<button
onClick={() => handleConsent('essential')}
className="flex-1 md:flex-none px-5 py-2.5 text-sm font-medium text-gray-300 hover:text-white border border-gray-700 hover:border-gray-500 rounded-xl transition-all"
>
Uniquement essentiels
</button>
<button
onClick={() => handleConsent('all')}
className="flex-1 md:flex-none px-5 py-2.5 text-sm font-medium bg-brand-500 hover:bg-brand-600 text-white rounded-xl shadow-lg shadow-brand-500/20 transition-all active:scale-95"
>
Tout accepter
</button>
<button
onClick={() => setIsVisible(false)}
className="absolute top-4 right-4 text-gray-500 hover:text-white transition-colors p-1"
aria-label="Fermer"
>
<X className="w-5 h-5" />
</button>
</div>
</div>
</div>
</div>
);
};
export default CookieBanner;

View File

@@ -5,19 +5,31 @@ import React from 'react';
import Link from 'next/link';
import { usePathname } from 'next/navigation';
const Footer = () => {
interface FooterProps {
settings?: any;
}
const Footer = ({ settings }: FooterProps) => {
const pathname = usePathname() || '';
if (pathname.startsWith('/dashboard')) return null;
const siteInfo = settings || {
siteName: "Afropreunariat",
siteSlogan: "La plateforme de référence pour l'entrepreneuriat africain. Visibilité, connexion et croissance pour les TPE/PME.",
contactEmail: "support@afropreunariat.com",
contactPhone: "+225 00 00 00 00 00",
address: "Abidjan, Côte d'Ivoire / Paris, France",
footerText: "© 2025 Afropreunariat. Tous droits réservés."
};
return (
<footer className="bg-dark-900 text-white">
<div className="max-w-7xl mx-auto py-12 px-4 overflow-hidden sm:px-6 lg:px-8">
<div className="grid grid-cols-1 md:grid-cols-3 gap-8">
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-8">
<div>
<h3 className="text-2xl font-serif font-bold text-brand-500 mb-4">Afropreunariat</h3>
<h3 className="text-2xl font-serif font-bold text-brand-500 mb-4">{siteInfo.siteName}</h3>
<p className="text-gray-400 text-sm">
La plateforme de référence pour l'entrepreneuriat africain.
Visibilité, connexion et croissance pour les TPE/PME.
{siteInfo.siteSlogan}
</p>
</div>
<div>
@@ -30,12 +42,20 @@ const Footer = () => {
</div>
<div>
<h4 className="font-bold text-lg mb-4">Contact</h4>
<p className="text-gray-400 text-sm mb-2">Abidjan, Côte d'Ivoire / Paris, France</p>
<p className="text-gray-400 text-sm">support@afropreunariat.com</p>
<p className="text-gray-400 text-sm mb-2">{siteInfo.address}</p>
<p className="text-gray-400 text-sm">{siteInfo.contactEmail}</p>
{siteInfo.contactPhone && <p className="text-gray-400 text-sm mt-1">{siteInfo.contactPhone}</p>}
</div>
<div>
<h4 className="font-bold text-lg mb-4">Légal</h4>
<ul className="space-y-2 text-gray-400 text-sm">
<li><Link href="/cgu" className="hover:text-brand-500 transition-colors">CGU</Link></li>
<li><Link href="/cgv" className="hover:text-brand-500 transition-colors">CGV</Link></li>
</ul>
</div>
</div>
<div className="mt-8 pt-8 border-t border-gray-800 text-center text-gray-500 text-sm">
&copy; 2025 Afropreunariat. Tous droits réservés.
{siteInfo.footerText}
</div>
</div>
</footer>