Application complète SLUC Business Club (React + Express + PostgreSQL, Docker)
Implémente l'intégralité de la maquette « SLUC Business Club.dc.html » : - Site public : accueil (héro administrable, carrousel membres, agenda avec inscription en ligne, rencontres passées, demande d'adhésion), annuaire avec recherche/filtres/fiche détaillée, page association - Espace membre : connexion, édition de fiche avec aperçu direct, upload logo/photo, statut d'adhésion par saison, changement de mot de passe - Espace admin : tableau de bord, membres (validation par saison), rencontres (CRUD + inscrits + impression + export Excel), inscriptions, catégories, contenu du site Architecture : 3 conteneurs Docker Compose — PostgreSQL 16 (réseau interne, rôle applicatif restreint), API Express (non-root, read-only fs), nginx non privilégié (frontend React + reverse-proxy + CSP stricte). Sécurité : requêtes 100 % paramétrées, bcrypt + JWT httpOnly SameSite=Strict, vérification d'Origin (CSRF), validation zod, rate limiting, uploads vérifiés par octets magiques avec noms aléatoires, aucun secret committé. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Fkg15RCxNgUys4ru73He2o
This commit is contained in:
50 files changed
+6887
No files matched your search
@@ -0,0 +1,152 @@
|
||||
import { useEffect, useState } from 'react';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { useAuth } from '../lib/AuthContext.jsx';
|
||||
import { api, dateParts, statutLabel } from '../lib/api.js';
|
||||
import { LoginSection } from './Espace.jsx';
|
||||
import { MembersTab, RencontresTab, InscriptionsTab } from '../components/admin/AdminTabs.jsx';
|
||||
import { CategoriesTab, ContenuTab } from '../components/admin/AdminContent.jsx';
|
||||
|
||||
const TABS = [
|
||||
{ key: 'dashboard', icon: '◧', label: 'Tableau de bord', title: 'Tableau de bord' },
|
||||
{ key: 'membres', icon: '▤', label: 'Membres', title: 'Gestion des membres' },
|
||||
{ key: 'rencontres', icon: '◈', label: 'Rencontres', title: 'Rencontres' },
|
||||
{ key: 'inscriptions', icon: '✎', label: 'Inscriptions', title: 'Inscriptions' },
|
||||
{ key: 'categories', icon: '☲', label: 'Catégories', title: 'Catégories' },
|
||||
{ key: 'contenu', icon: '▧', label: 'Contenu du site', title: 'Contenu du site' },
|
||||
];
|
||||
|
||||
function Dashboard() {
|
||||
const [data, setData] = useState(null);
|
||||
useEffect(() => {
|
||||
api.get('/api/admin/dashboard').then(setData).catch(() => {});
|
||||
}, []);
|
||||
if (!data) return <p style={{ color: 'var(--gray-light)' }}>Chargement…</p>;
|
||||
|
||||
const k = data.kpis;
|
||||
const daysToNext = k.prochaine_date
|
||||
? Math.max(0, Math.round((new Date(k.prochaine_date) - Date.now()) / 86400000))
|
||||
: null;
|
||||
const kpis = [
|
||||
{ n: k.membres_valides, l: 'Membres validés', d: 'saison en cours' },
|
||||
{ n: k.a_renouveler, l: 'À renouveler', d: 'non validés' },
|
||||
{ n: k.rencontres_a_venir, l: 'Rencontres à venir', d: daysToNext != null ? `prochaine dans ${daysToNext} j` : '—' },
|
||||
{ n: k.inscriptions_attente, l: 'Inscriptions en attente', d: 'à valider' },
|
||||
];
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="grid-4" style={{ marginBottom: 32 }}>
|
||||
{kpis.map((x) => (
|
||||
<div key={x.l} className="card" style={{ borderRadius: 6, padding: 24 }}>
|
||||
<div style={{ fontSize: 12.5, color: 'var(--gray-light)', marginBottom: 12 }}>{x.l}</div>
|
||||
<div className="serif" style={{ fontSize: 38, fontWeight: 600, lineHeight: 1 }}>{x.n}</div>
|
||||
<div style={{ fontSize: 12, color: 'var(--red)', fontWeight: 600, marginTop: 10 }}>{x.d}</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
<div className="grid-2" style={{ gridTemplateColumns: '1.5fr 1fr', gap: 20 }}>
|
||||
<div className="card" style={{ borderRadius: 6, padding: 26 }}>
|
||||
<h3 className="serif" style={{ fontSize: 19, fontWeight: 600, marginBottom: 18 }}>Dernières inscriptions</h3>
|
||||
<div style={{ display: 'flex', flexDirection: 'column', gap: 2 }}>
|
||||
{data.latestInscriptions.map((i) => (
|
||||
<div key={i.id} style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', padding: '12px 0', borderBottom: '1px solid var(--border-soft)' }}>
|
||||
<div>
|
||||
<div style={{ fontSize: 14, fontWeight: 600 }}>{i.nom}</div>
|
||||
<div style={{ fontSize: 12.5, color: 'var(--gray-light)' }}>{i.entreprise} · {i.rencontre}</div>
|
||||
</div>
|
||||
<span className={`badge ${i.statut === 'confirmee' ? 'badge-green' : 'badge-amber'}`}>{statutLabel(i.statut)}</span>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
<div className="card" style={{ borderRadius: 6, padding: 26 }}>
|
||||
<h3 className="serif" style={{ fontSize: 19, fontWeight: 600, marginBottom: 18 }}>Prochaines rencontres</h3>
|
||||
<div style={{ display: 'flex', flexDirection: 'column', gap: 14 }}>
|
||||
{data.upcoming.map((e) => {
|
||||
const { jour, mois } = dateParts(e.date_renc);
|
||||
return (
|
||||
<div key={e.id} style={{ display: 'flex', gap: 14, alignItems: 'center' }}>
|
||||
<div style={{ width: 46, flexShrink: 0, textAlign: 'center', background: 'var(--admin-bg)', borderRadius: 4, padding: '8px 0', lineHeight: 1 }}>
|
||||
<div className="serif" style={{ fontSize: 20, fontWeight: 600 }}>{jour}</div>
|
||||
<div style={{ fontSize: 9, textTransform: 'uppercase', color: 'var(--gray-light)', letterSpacing: '.1em' }}>{mois}</div>
|
||||
</div>
|
||||
<div style={{ minWidth: 0 }}>
|
||||
<div style={{ fontSize: 14, fontWeight: 600, lineHeight: 1.2 }}>{e.titre}</div>
|
||||
<div style={{ fontSize: 12, color: 'var(--gray-light)', marginTop: 3 }}>
|
||||
{Math.max(0, e.places - e.inscrits)} places restantes
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
export default function Admin() {
|
||||
const { user, loading, logout } = useAuth();
|
||||
const [tab, setTab] = useState('dashboard');
|
||||
|
||||
if (loading) return <main style={{ minHeight: '60vh' }} />;
|
||||
if (!user || user.role !== 'admin') {
|
||||
return (
|
||||
<main>
|
||||
<LoginSection kicker="Espace admin" title="Administration du Business Club" />
|
||||
</main>
|
||||
);
|
||||
}
|
||||
|
||||
const current = TABS.find((t) => t.key === tab);
|
||||
const today = new Date().toLocaleDateString('fr-FR', { weekday: 'long', day: 'numeric', month: 'long', year: 'numeric' });
|
||||
|
||||
return (
|
||||
<div style={{ display: 'flex', minHeight: '100vh', background: 'var(--admin-bg)' }}>
|
||||
<aside style={{ width: 250, flexShrink: 0, background: 'var(--dark)', color: '#fff', display: 'flex', flexDirection: 'column', padding: '26px 0', position: 'sticky', top: 0, height: '100vh' }}>
|
||||
<div style={{ padding: '0 24px 26px', borderBottom: '1px solid rgba(255,255,255,.1)', display: 'flex', alignItems: 'center', gap: 12 }}>
|
||||
<img src="/assets/logo.jpg" alt="SLUC" style={{ height: 40, width: 40, objectFit: 'cover', borderRadius: 4, background: '#fff' }} />
|
||||
<div style={{ lineHeight: 1.1 }}>
|
||||
<div className="serif" style={{ fontSize: 16, fontWeight: 600 }}>Admin</div>
|
||||
<div style={{ fontSize: 10, letterSpacing: '.14em', textTransform: 'uppercase', color: '#8A8279' }}>Business Club</div>
|
||||
</div>
|
||||
</div>
|
||||
<nav style={{ padding: '20px 14px', display: 'flex', flexDirection: 'column', gap: 4, flex: 1 }}>
|
||||
{TABS.map((t) => (
|
||||
<button key={t.key} className={`admin-nav-btn${tab === t.key ? ' active' : ''}`} onClick={() => setTab(t.key)}>
|
||||
{t.icon} {t.label}
|
||||
</button>
|
||||
))}
|
||||
</nav>
|
||||
<div style={{ padding: '14px 24px 0', borderTop: '1px solid rgba(255,255,255,.1)', display: 'flex', flexDirection: 'column', gap: 4 }}>
|
||||
<Link to="/" style={{ color: '#B7AFA6', fontSize: 13.5, fontWeight: 500, padding: '6px 0', textDecoration: 'none' }}>← Retour au site</Link>
|
||||
<button onClick={logout} style={{ background: 'none', border: 'none', color: '#B7AFA6', fontSize: 13.5, fontWeight: 500, padding: '6px 0', textAlign: 'left' }}>
|
||||
Se déconnecter
|
||||
</button>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
<div style={{ flex: 1, minWidth: 0 }}>
|
||||
<div style={{ background: '#fff', borderBottom: '1px solid var(--border)', padding: '20px 40px', display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}>
|
||||
<div>
|
||||
<h1 className="serif" style={{ fontSize: 24, fontWeight: 600 }}>{current.title}</h1>
|
||||
<div style={{ fontSize: 13, color: 'var(--gray-light)', marginTop: 2, textTransform: 'capitalize' }}>{today}</div>
|
||||
</div>
|
||||
<div style={{ width: 38, height: 38, borderRadius: '50%', background: '#FBEDEC', color: 'var(--red)', display: 'flex', alignItems: 'center', justifyContent: 'center', fontWeight: 700, fontSize: 14 }}>
|
||||
{(user.email || 'AD').slice(0, 2).toUpperCase()}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style={{ padding: '36px 40px' }}>
|
||||
{tab === 'dashboard' && <Dashboard />}
|
||||
{tab === 'membres' && <MembersTab />}
|
||||
{tab === 'rencontres' && <RencontresTab />}
|
||||
{tab === 'inscriptions' && <InscriptionsTab />}
|
||||
{tab === 'categories' && <CategoriesTab />}
|
||||
{tab === 'contenu' && <ContenuTab />}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,101 @@
|
||||
import { useMemo, useState } from 'react';
|
||||
import { usePublicData } from '../lib/usePublic.js';
|
||||
import MemberModal from '../components/MemberModal.jsx';
|
||||
|
||||
export default function Annuaire() {
|
||||
const { data } = usePublicData();
|
||||
const [search, setSearch] = useState('');
|
||||
const [category, setCategory] = useState('Toutes');
|
||||
const [detail, setDetail] = useState(null);
|
||||
|
||||
const members = data?.members ?? [];
|
||||
const categories = data?.categories ?? [];
|
||||
|
||||
const filtered = useMemo(() => {
|
||||
const q = search.trim().toLowerCase();
|
||||
return members.filter((m) => {
|
||||
const matchCat = category === 'Toutes' || (m.categorie || 'Non classée') === category;
|
||||
const matchText = !q || `${m.nom} ${m.dirigeant} ${m.secteur} ${m.categorie || ''}`.toLowerCase().includes(q);
|
||||
return matchCat && matchText;
|
||||
});
|
||||
}, [members, search, category]);
|
||||
|
||||
const chips = ['Toutes', ...categories.map((c) => c.name)];
|
||||
|
||||
return (
|
||||
<main>
|
||||
<section style={{ background: '#fff', borderBottom: '1px solid var(--border)' }}>
|
||||
<div className="container" style={{ padding: '70px 32px 60px' }}>
|
||||
<div className="kicker" style={{ marginBottom: 16 }}>Annuaire des membres</div>
|
||||
<h1 className="serif" style={{ fontWeight: 500, fontSize: 'clamp(36px, 5vw, 54px)', lineHeight: 1.05, marginBottom: 18 }}>
|
||||
{members.length} entreprises, un réseau.
|
||||
</h1>
|
||||
<p style={{ fontSize: 17, lineHeight: 1.6, color: 'var(--gray)', maxWidth: 600 }}>
|
||||
Découvrez les entreprises membres du Business Club SLUC Nancy et prenez contact directement avec leurs dirigeants.
|
||||
</p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section className="container" style={{ padding: '44px 32px 100px' }}>
|
||||
<div style={{ display: 'flex', alignItems: 'center', gap: 16, flexWrap: 'wrap', marginBottom: 14 }}>
|
||||
<div style={{ position: 'relative', flex: 1, minWidth: 260 }}>
|
||||
<span style={{ position: 'absolute', left: 16, top: '50%', transform: 'translateY(-50%)', color: 'var(--gray-light)', fontSize: 15 }}>⌕</span>
|
||||
<input
|
||||
value={search}
|
||||
onChange={(e) => setSearch(e.target.value)}
|
||||
placeholder="Rechercher une entreprise, un dirigeant, un secteur…"
|
||||
maxLength={120}
|
||||
style={{ width: '100%', padding: '14px 16px 14px 42px', border: '1px solid var(--input-border)', borderRadius: 3, background: '#fff' }}
|
||||
/>
|
||||
</div>
|
||||
<span style={{ fontSize: 13.5, color: 'var(--gray-light)', whiteSpace: 'nowrap' }}>
|
||||
{filtered.length} entreprise{filtered.length > 1 ? 's' : ''}
|
||||
</span>
|
||||
</div>
|
||||
<div style={{ display: 'flex', gap: 10, flexWrap: 'wrap', marginBottom: 36 }}>
|
||||
{chips.map((c) => (
|
||||
<button key={c} className={`chip${category === c ? ' active' : ''}`} onClick={() => setCategory(c)}>
|
||||
{c}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
|
||||
<div className="grid-3">
|
||||
{filtered.map((m) => (
|
||||
<div key={m.id} className="card" style={{ padding: 26, display: 'flex', flexDirection: 'column' }}>
|
||||
<div style={{ display: 'flex', alignItems: 'center', gap: 16, marginBottom: 16 }}>
|
||||
<div className={m.logo_path ? '' : 'placeholder-pattern'} style={{ width: 64, height: 64, flexShrink: 0, borderRadius: 4, display: 'flex', alignItems: 'center', justifyContent: 'center', fontFamily: 'monospace', fontSize: 9, color: '#a8a099', overflow: 'hidden', background: m.logo_path ? '#fff' : undefined }}>
|
||||
{m.logo_path ? <img src={m.logo_path} alt="" style={{ width: '100%', height: '100%', objectFit: 'contain' }} /> : 'logo'}
|
||||
</div>
|
||||
<div>
|
||||
<div className="serif" style={{ fontSize: 20, fontWeight: 600, lineHeight: 1.15 }}>{m.nom}</div>
|
||||
<div style={{ fontSize: 11, letterSpacing: '.08em', textTransform: 'uppercase', color: 'var(--red)', fontWeight: 600, marginTop: 5 }}>{m.secteur}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style={{ marginBottom: 16 }}>
|
||||
<span className="badge-cat">{m.categorie || 'Non classée'}</span>
|
||||
</div>
|
||||
<p style={{ fontSize: 14, lineHeight: 1.6, color: 'var(--gray)', flex: 1, marginBottom: 20 }}>{m.presentation}</p>
|
||||
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', paddingTop: 18, borderTop: '1px solid var(--border-soft)' }}>
|
||||
<span style={{ fontSize: 13, color: 'var(--gray-light)' }}>{m.dirigeant}</span>
|
||||
<button className="btn-link" onClick={() => setDetail(m)}>Voir la fiche →</button>
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
|
||||
{filtered.length === 0 && (
|
||||
<div style={{ textAlign: 'center', padding: '80px 20px', color: 'var(--gray-light)' }}>
|
||||
<div className="serif" style={{ fontSize: 26, color: 'var(--ink)', marginBottom: 10 }}>Aucune entreprise trouvée</div>
|
||||
<p style={{ fontSize: 15, marginBottom: 24 }}>Essayez d'autres mots-clés ou réinitialisez les filtres.</p>
|
||||
<button className="btn btn-dark btn-sm" style={{ fontSize: 14, padding: '12px 24px' }} onClick={() => { setSearch(''); setCategory('Toutes'); }}>
|
||||
Réinitialiser
|
||||
</button>
|
||||
</div>
|
||||
)}
|
||||
</section>
|
||||
|
||||
<MemberModal member={detail} onClose={() => setDetail(null)} />
|
||||
</main>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,125 @@
|
||||
const VALUES = [
|
||||
{ t: 'Réseau', d: "Un carnet d'adresses vivant, nourri par des rencontres régulières et de vraies affinités." },
|
||||
{ t: 'Convivialité', d: "Des moments d'échange chaleureux, où les relations se nouent avant les contrats." },
|
||||
{ t: 'Performance', d: "L'exigence du haut niveau appliquée au monde de l'entreprise." },
|
||||
{ t: 'Territoire', d: "Un engagement fort pour l'économie et le rayonnement du Grand Est." },
|
||||
];
|
||||
|
||||
const TIMELINE = [
|
||||
{ y: '1996', t: 'Création du Club', d: "Une poignée d'entreprises se rassemblent autour du SLUC Nancy." },
|
||||
{ y: '2005', t: '50 membres', d: "Le réseau s'impose comme un acteur économique local." },
|
||||
{ y: '2015', t: 'Premier gala', d: 'La soirée annuelle devient le rendez-vous phare du Club.' },
|
||||
{ y: '2026', t: '85 membres actifs', d: "Un réseau d'affaires de référence dans la région." },
|
||||
];
|
||||
|
||||
const STATS = [
|
||||
{ n: '85', l: 'entreprises membres' },
|
||||
{ n: '12', l: 'rencontres par an' },
|
||||
{ n: '30 ans', l: 'de partenariat' },
|
||||
{ n: '200+', l: 'invités au gala annuel' },
|
||||
];
|
||||
|
||||
export default function Association() {
|
||||
return (
|
||||
<main>
|
||||
<section style={{ background: 'var(--dark)', color: '#fff' }}>
|
||||
<div style={{ maxWidth: 900, margin: '0 auto', padding: '110px 32px', textAlign: 'center' }}>
|
||||
<div className="kicker on-dark" style={{ letterSpacing: '.22em', marginBottom: 26 }}>L'association</div>
|
||||
<h1 className="serif" style={{ fontWeight: 400, fontSize: 'clamp(38px, 5vw, 56px)', lineHeight: 1.08, marginBottom: 26 }}>
|
||||
Trente ans à réunir le sport<br />et l'entreprise.
|
||||
</h1>
|
||||
<p style={{ fontSize: 18, lineHeight: 1.65, color: '#B7AFA6', maxWidth: 620, margin: '0 auto' }}>
|
||||
Le Business Club est l'association des partenaires économiques du SLUC Nancy Basket.
|
||||
Une communauté de dirigeants qui partagent les valeurs du haut niveau.
|
||||
</p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section className="hero-grid" style={{ maxWidth: 1080, margin: '0 auto', padding: '96px 32px 40px', display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 64, alignItems: 'center' }}>
|
||||
<div>
|
||||
<div className="kicker" style={{ marginBottom: 16 }}>Notre mission</div>
|
||||
<h2 className="serif" style={{ fontWeight: 500, fontSize: 38, lineHeight: 1.12, marginBottom: 22 }}>
|
||||
Créer des liens qui font grandir les entreprises.
|
||||
</h2>
|
||||
<p style={{ fontSize: 16, lineHeight: 1.7, color: 'var(--gray)', marginBottom: 16 }}>
|
||||
Nous rassemblons chaque année des dirigeants du Grand Est autour de rencontres d'affaires,
|
||||
d'événements exclusifs et de moments de convivialité, dans le cadre unique de la vie d'un
|
||||
club de basket professionnel.
|
||||
</p>
|
||||
<p style={{ fontSize: 16, lineHeight: 1.7, color: 'var(--gray)' }}>
|
||||
Adhérer, c'est développer son réseau, gagner en visibilité et soutenir le sport de haut
|
||||
niveau sur son territoire.
|
||||
</p>
|
||||
</div>
|
||||
<div className="placeholder-pattern" style={{ aspectRatio: '4/3', borderRadius: 5, display: 'flex', alignItems: 'flex-end', padding: 22 }}>
|
||||
<span style={{ fontFamily: 'monospace', fontSize: 11, color: '#a8a099', background: 'var(--bg)', padding: '5px 9px', borderRadius: 2 }}>
|
||||
photo — assemblée des membres
|
||||
</span>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section style={{ maxWidth: 1080, margin: '0 auto', padding: '56px 32px' }}>
|
||||
<div className="grid-4">
|
||||
{VALUES.map((v) => (
|
||||
<div key={v.t} className="card" style={{ padding: 26 }}>
|
||||
<div style={{ width: 34, height: 3, background: 'var(--red)', marginBottom: 18 }} />
|
||||
<h3 className="serif" style={{ fontSize: 21, fontWeight: 600, marginBottom: 10 }}>{v.t}</h3>
|
||||
<p style={{ fontSize: 14, lineHeight: 1.6, color: 'var(--gray)' }}>{v.d}</p>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section style={{ background: 'var(--beige)', marginTop: 56, padding: '90px 0' }}>
|
||||
<div className="hero-grid" style={{ maxWidth: 980, margin: '0 auto', padding: '0 32px', display: 'grid', gridTemplateColumns: '.8fr 1.2fr', gap: 56, alignItems: 'center' }}>
|
||||
<div style={{ textAlign: 'center' }}>
|
||||
<div style={{ aspectRatio: '1/1', borderRadius: 6, background: 'repeating-linear-gradient(135deg,#e4dfd8 0 12px,#eeeae3 12px 24px)', display: 'flex', alignItems: 'center', justifyContent: 'center', fontFamily: 'monospace', fontSize: 11, color: '#a8a099', marginBottom: 16 }}>
|
||||
portrait
|
||||
</div>
|
||||
<div className="serif" style={{ fontSize: 20, fontWeight: 600 }}>Jean-Marc Lefèvre</div>
|
||||
<div style={{ fontSize: 13, color: 'var(--gray-light)', marginTop: 2 }}>Président du Business Club</div>
|
||||
</div>
|
||||
<div>
|
||||
<div className="serif" style={{ fontSize: 60, color: 'var(--red)', lineHeight: 0.5, height: 32 }}>“</div>
|
||||
<p className="serif" style={{ fontSize: 26, lineHeight: 1.45, fontWeight: 400, marginBottom: 22 }}>
|
||||
Notre force, c'est le collectif. Comme sur le terrain, nos membres avancent ensemble,
|
||||
se soutiennent et bâtissent des réussites communes.
|
||||
</p>
|
||||
<p style={{ fontSize: 15, lineHeight: 1.7, color: 'var(--gray)' }}>
|
||||
Depuis sa création, le Club n'a cessé de grandir grâce à l'engagement de dirigeants qui
|
||||
croient à la puissance du réseau. Je vous invite à nous rejoindre.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section style={{ maxWidth: 1080, margin: '0 auto', padding: '96px 32px' }}>
|
||||
<div style={{ textAlign: 'center', marginBottom: 52 }}>
|
||||
<div className="kicker" style={{ marginBottom: 14 }}>Notre histoire</div>
|
||||
<h2 className="serif" style={{ fontWeight: 500, fontSize: 40 }}>30 ans de croissance</h2>
|
||||
</div>
|
||||
<div className="grid-4" style={{ gap: 0 }}>
|
||||
{TIMELINE.map((t) => (
|
||||
<div key={t.y} style={{ padding: '0 20px', borderLeft: '1px solid var(--border)', position: 'relative' }}>
|
||||
<div style={{ position: 'absolute', left: -6, top: 6, width: 11, height: 11, borderRadius: '50%', background: 'var(--red)' }} />
|
||||
<div className="serif" style={{ fontSize: 30, fontWeight: 600, color: 'var(--red)', marginBottom: 8 }}>{t.y}</div>
|
||||
<div style={{ fontSize: 15, fontWeight: 600, marginBottom: 6 }}>{t.t}</div>
|
||||
<div style={{ fontSize: 13.5, lineHeight: 1.55, color: 'var(--gray)' }}>{t.d}</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section style={{ background: 'var(--dark)', color: '#fff', padding: '80px 0' }}>
|
||||
<div className="grid-4" style={{ maxWidth: 1080, margin: '0 auto', padding: '0 32px', gap: 40, textAlign: 'center' }}>
|
||||
{STATS.map((s) => (
|
||||
<div key={s.l}>
|
||||
<div className="serif" style={{ fontSize: 46, fontWeight: 600 }}>{s.n}</div>
|
||||
<div style={{ fontSize: 13.5, color: '#B7AFA6', marginTop: 6 }}>{s.l}</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,277 @@
|
||||
import { useEffect, useState } from 'react';
|
||||
import { useAuth } from '../lib/AuthContext.jsx';
|
||||
import { api, seasonLabel } from '../lib/api.js';
|
||||
import ImageSlot from '../components/ImageSlot.jsx';
|
||||
|
||||
function LoginSection({ title = 'Gérez votre présence au Club', kicker = 'Espace membre' }) {
|
||||
const { login } = useAuth();
|
||||
const [email, setEmail] = useState('');
|
||||
const [password, setPassword] = useState('');
|
||||
const [error, setError] = useState('');
|
||||
const [busy, setBusy] = useState(false);
|
||||
|
||||
const submit = async (e) => {
|
||||
e.preventDefault();
|
||||
setError('');
|
||||
setBusy(true);
|
||||
try {
|
||||
await login(email, password);
|
||||
} catch (err) {
|
||||
setError(err.message);
|
||||
} finally {
|
||||
setBusy(false);
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<section style={{ minHeight: 'calc(100vh - 76px)', display: 'flex', alignItems: 'center', justifyContent: 'center', padding: '60px 24px', background: 'var(--dark)' }}>
|
||||
<div style={{ width: '100%', maxWidth: 440 }}>
|
||||
<div style={{ textAlign: 'center', marginBottom: 28 }}>
|
||||
<div className="kicker on-dark" style={{ marginBottom: 14 }}>{kicker}</div>
|
||||
<h1 className="serif" style={{ fontWeight: 500, fontSize: 34, color: '#fff', lineHeight: 1.1 }}>{title}</h1>
|
||||
</div>
|
||||
<form onSubmit={submit} style={{ background: '#fff', borderRadius: 8, padding: '32px 30px' }}>
|
||||
<div style={{ display: 'flex', flexDirection: 'column', gap: 16 }}>
|
||||
<label className="field">Email professionnel
|
||||
<input name="email" type="email" value={email} onChange={(e) => setEmail(e.target.value)} placeholder="vous@entreprise.fr" required maxLength={254} autoComplete="username" />
|
||||
</label>
|
||||
<label className="field">Mot de passe
|
||||
<input name="password" type="password" value={password} onChange={(e) => setPassword(e.target.value)} placeholder="••••••••" required maxLength={200} autoComplete="current-password" />
|
||||
</label>
|
||||
</div>
|
||||
{error && <p className="error-text" style={{ marginTop: 14 }}>{error}</p>}
|
||||
<button type="submit" className="btn btn-red" style={{ width: '100%', marginTop: 22, padding: 14, borderRadius: 3 }} disabled={busy}>
|
||||
{busy ? 'Connexion…' : 'Se connecter'}
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
|
||||
function PasswordCard() {
|
||||
const [form, setForm] = useState({ currentPassword: '', newPassword: '' });
|
||||
const [msg, setMsg] = useState(null);
|
||||
|
||||
const submit = async (e) => {
|
||||
e.preventDefault();
|
||||
setMsg(null);
|
||||
try {
|
||||
await api.post('/api/auth/change-password', form);
|
||||
setMsg({ ok: true, text: '✓ Mot de passe modifié' });
|
||||
setForm({ currentPassword: '', newPassword: '' });
|
||||
} catch (err) {
|
||||
setMsg({ ok: false, text: err.message });
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="card" style={{ borderRadius: 8, padding: 30, marginTop: 24 }}>
|
||||
<h2 className="serif" style={{ fontSize: 22, fontWeight: 600, marginBottom: 6 }}>Mot de passe</h2>
|
||||
<p style={{ fontSize: 13.5, color: 'var(--gray-light)', marginBottom: 20, lineHeight: 1.55 }}>
|
||||
10 caractères minimum, avec au moins une lettre et un chiffre.
|
||||
</p>
|
||||
<form onSubmit={submit} style={{ display: 'flex', flexDirection: 'column', gap: 14 }}>
|
||||
<label className="field">Mot de passe actuel
|
||||
<input type="password" value={form.currentPassword} onChange={(e) => setForm({ ...form, currentPassword: e.target.value })} required autoComplete="current-password" />
|
||||
</label>
|
||||
<label className="field">Nouveau mot de passe
|
||||
<input type="password" value={form.newPassword} onChange={(e) => setForm({ ...form, newPassword: e.target.value })} required minLength={10} autoComplete="new-password" />
|
||||
</label>
|
||||
<div style={{ display: 'flex', alignItems: 'center', gap: 16 }}>
|
||||
<button type="submit" className="btn btn-red btn-sm" style={{ fontSize: 14.5, padding: '13px 26px' }}>Changer le mot de passe</button>
|
||||
{msg && <span className={msg.ok ? 'success-text' : 'error-text'}>{msg.text}</span>}
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
function Portal() {
|
||||
const { logout } = useAuth();
|
||||
const [member, setMember] = useState(null);
|
||||
const [categories, setCategories] = useState([]);
|
||||
const [form, setForm] = useState(null);
|
||||
const [saved, setSaved] = useState(false);
|
||||
const [error, setError] = useState('');
|
||||
const season = seasonLabel();
|
||||
|
||||
useEffect(() => {
|
||||
Promise.all([api.get('/api/member/profile'), api.get('/api/public/bootstrap')])
|
||||
.then(([p, b]) => {
|
||||
setMember(p.member);
|
||||
setForm(p.member);
|
||||
setCategories(b.categories);
|
||||
})
|
||||
.catch((e) => setError(e.message));
|
||||
}, []);
|
||||
|
||||
if (!form) {
|
||||
return (
|
||||
<section className="container" style={{ padding: '60px 32px' }}>
|
||||
<p style={{ color: 'var(--gray-light)' }}>{error || 'Chargement…'}</p>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
|
||||
const onChange = (e) => {
|
||||
const { name, value } = e.target;
|
||||
setForm({ ...form, [name]: name === 'categorie_id' ? (value ? Number(value) : null) : value });
|
||||
setSaved(false);
|
||||
};
|
||||
|
||||
const save = async (e) => {
|
||||
e.preventDefault();
|
||||
setError('');
|
||||
try {
|
||||
const d = await api.put('/api/member/profile', {
|
||||
nom: form.nom, secteur: form.secteur, categorie_id: form.categorie_id,
|
||||
dirigeant: form.dirigeant, email: form.email || '', tel: form.tel || '',
|
||||
site: form.site || '', presentation: form.presentation || '',
|
||||
});
|
||||
setMember(d.member);
|
||||
setForm(d.member);
|
||||
setSaved(true);
|
||||
} catch (err) {
|
||||
setError(err.message);
|
||||
}
|
||||
};
|
||||
|
||||
const valide = member?.valide;
|
||||
const catName = categories.find((c) => c.id === form.categorie_id)?.name || 'Non classée';
|
||||
|
||||
return (
|
||||
<section style={{ maxWidth: 1100, margin: '0 auto', padding: '44px 32px 90px' }}>
|
||||
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: 20, flexWrap: 'wrap', marginBottom: 26 }}>
|
||||
<div>
|
||||
<div className="kicker" style={{ letterSpacing: '.16em', marginBottom: 8 }}>Espace membre</div>
|
||||
<h1 className="serif" style={{ fontWeight: 500, fontSize: 34, lineHeight: 1.1 }}>Bonjour {member.dirigeant}</h1>
|
||||
<div style={{ fontSize: 14, color: 'var(--gray-light)', marginTop: 4 }}>{member.nom}</div>
|
||||
</div>
|
||||
<button className="btn btn-outline-soft btn-sm" onClick={logout}>Se déconnecter</button>
|
||||
</div>
|
||||
|
||||
<div style={{ display: 'flex', alignItems: 'center', gap: 14, background: valide ? '#E8F3EC' : '#FBF0E6', border: `1px solid ${valide ? '#BFE0CB' : '#F0D6BC'}`, color: valide ? '#22623E' : '#8A5A22', borderRadius: 8, padding: '18px 22px' }}>
|
||||
<span style={{ fontSize: 22 }}>{valide ? '✓' : '⏳'}</span>
|
||||
<div>
|
||||
<div style={{ fontWeight: 600, fontSize: 15 }}>
|
||||
{valide ? `Adhésion validée pour la saison ${season}` : 'Adhésion à renouveler'}
|
||||
</div>
|
||||
<div style={{ fontSize: 13, opacity: 0.85, marginTop: 2 }}>
|
||||
{valide
|
||||
? "Votre fiche est visible dans l'annuaire et vous pouvez vous inscrire aux rencontres."
|
||||
: "Tant que votre adhésion n'est pas validée par le Club, votre fiche n'apparaît pas dans l'annuaire et vous ne pouvez pas vous inscrire aux rencontres."}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="hero-grid" style={{ display: 'grid', gridTemplateColumns: '1.35fr .9fr', gap: 32, marginTop: 30, alignItems: 'start' }}>
|
||||
<div>
|
||||
<div className="card" style={{ borderRadius: 8, padding: 30 }}>
|
||||
<h2 className="serif" style={{ fontSize: 22, fontWeight: 600, marginBottom: 6 }}>Mon profil</h2>
|
||||
<p style={{ fontSize: 13.5, color: 'var(--gray-light)', marginBottom: 24, lineHeight: 1.55 }}>
|
||||
Ces informations alimentent votre fiche dans l'annuaire des membres.
|
||||
</p>
|
||||
|
||||
<div style={{ display: 'flex', gap: 22, marginBottom: 24 }}>
|
||||
<div style={{ textAlign: 'center' }}>
|
||||
<div style={{ fontSize: 11, textTransform: 'uppercase', letterSpacing: '.08em', color: 'var(--gray-light)', fontWeight: 600, marginBottom: 8 }}>Logo</div>
|
||||
<div style={{ width: 96, height: 96 }}>
|
||||
<ImageSlot endpoint="/api/member/profile/logo" value={form.logo_path} placeholder="Déposez votre logo" onUploaded={(path) => { setForm((f) => ({ ...f, logo_path: path })); setMember((m) => ({ ...m, logo_path: path })); }} />
|
||||
</div>
|
||||
</div>
|
||||
<div style={{ textAlign: 'center' }}>
|
||||
<div style={{ fontSize: 11, textTransform: 'uppercase', letterSpacing: '.08em', color: 'var(--gray-light)', fontWeight: 600, marginBottom: 8 }}>Photo dirigeant·e</div>
|
||||
<div style={{ width: 96, height: 96 }}>
|
||||
<ImageSlot circle endpoint="/api/member/profile/photo" value={form.photo_path} placeholder="Déposez votre photo" onUploaded={(path) => { setForm((f) => ({ ...f, photo_path: path })); setMember((m) => ({ ...m, photo_path: path })); }} />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form onSubmit={save}>
|
||||
<div style={{ display: 'flex', flexDirection: 'column', gap: 14 }}>
|
||||
<div style={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 12 }}>
|
||||
<label className="field">Entreprise
|
||||
<input name="nom" value={form.nom} onChange={onChange} required maxLength={120} />
|
||||
</label>
|
||||
<label className="field">Catégorie
|
||||
<select name="categorie_id" value={form.categorie_id || ''} onChange={onChange}>
|
||||
<option value="">Non classée</option>
|
||||
{categories.map((c) => <option key={c.id} value={c.id}>{c.name}</option>)}
|
||||
</select>
|
||||
</label>
|
||||
</div>
|
||||
<label className="field">Secteur d'activité
|
||||
<input name="secteur" value={form.secteur} onChange={onChange} required maxLength={120} />
|
||||
</label>
|
||||
<label className="field">Dirigeant·e
|
||||
<input name="dirigeant" value={form.dirigeant} onChange={onChange} required maxLength={120} />
|
||||
</label>
|
||||
<label className="field">Présentation
|
||||
<textarea name="presentation" value={form.presentation || ''} onChange={onChange} rows={3} maxLength={2000} />
|
||||
</label>
|
||||
<div style={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 12 }}>
|
||||
<label className="field">Email
|
||||
<input name="email" type="email" value={form.email || ''} onChange={onChange} maxLength={254} />
|
||||
</label>
|
||||
<label className="field">Téléphone
|
||||
<input name="tel" value={form.tel || ''} onChange={onChange} maxLength={30} />
|
||||
</label>
|
||||
</div>
|
||||
<label className="field">Site web
|
||||
<input name="site" value={form.site || ''} onChange={onChange} maxLength={200} />
|
||||
</label>
|
||||
</div>
|
||||
{error && <p className="error-text" style={{ marginTop: 12 }}>{error}</p>}
|
||||
<div style={{ display: 'flex', alignItems: 'center', gap: 16, marginTop: 24 }}>
|
||||
<button type="submit" className="btn btn-red btn-sm" style={{ fontSize: 14.5, padding: '13px 26px' }}>Enregistrer mon profil</button>
|
||||
{saved && <span className="success-text">✓ Profil enregistré</span>}
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<PasswordCard />
|
||||
</div>
|
||||
|
||||
<div style={{ position: 'sticky', top: 96 }}>
|
||||
<div style={{ fontSize: 11, textTransform: 'uppercase', letterSpacing: '.1em', color: 'var(--gray-light)', fontWeight: 600, marginBottom: 12 }}>
|
||||
Aperçu de votre fiche annuaire
|
||||
</div>
|
||||
<div className="card" style={{ padding: 26 }}>
|
||||
<div style={{ display: 'flex', alignItems: 'center', gap: 16, marginBottom: 16 }}>
|
||||
<div className={form.logo_path ? '' : 'placeholder-pattern'} style={{ width: 64, height: 64, flexShrink: 0, borderRadius: 4, overflow: 'hidden', display: 'flex', alignItems: 'center', justifyContent: 'center', fontFamily: 'monospace', fontSize: 9, color: '#a8a099', background: form.logo_path ? '#fff' : undefined }}>
|
||||
{form.logo_path ? <img src={form.logo_path} alt="" style={{ width: '100%', height: '100%', objectFit: 'contain' }} /> : 'logo'}
|
||||
</div>
|
||||
<div>
|
||||
<div className="serif" style={{ fontSize: 20, fontWeight: 600, lineHeight: 1.15 }}>{form.nom}</div>
|
||||
<div style={{ fontSize: 11, letterSpacing: '.08em', textTransform: 'uppercase', color: 'var(--red)', fontWeight: 600, marginTop: 5 }}>{form.secteur}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style={{ marginBottom: 16 }}>
|
||||
<span className="badge-cat">{catName}</span>
|
||||
</div>
|
||||
<p style={{ fontSize: 14, lineHeight: 1.6, color: 'var(--gray)', marginBottom: 20 }}>{form.presentation}</p>
|
||||
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', paddingTop: 18, borderTop: '1px solid var(--border-soft)' }}>
|
||||
<span style={{ fontSize: 13, color: 'var(--gray-light)' }}>{form.dirigeant}</span>
|
||||
<span className="btn-link">Voir la fiche →</span>
|
||||
</div>
|
||||
</div>
|
||||
<p style={{ fontSize: 12.5, color: 'var(--gray-light)', lineHeight: 1.55, marginTop: 14 }}>
|
||||
{valide
|
||||
? "Votre fiche est publiée dans l'annuaire des membres."
|
||||
: "Cette fiche ne sera publiée qu'une fois votre adhésion validée pour la saison en cours."}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
|
||||
export default function Espace() {
|
||||
const { user, loading } = useAuth();
|
||||
|
||||
if (loading) return <main style={{ minHeight: '60vh' }} />;
|
||||
if (!user || user.role !== 'member') return <main><LoginSection /></main>;
|
||||
return <main><Portal /></main>;
|
||||
}
|
||||
|
||||
export { LoginSection };
|
||||
@@ -0,0 +1,340 @@
|
||||
import { useState } from 'react';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { usePublicData } from '../lib/usePublic.js';
|
||||
import { api, dateParts } from '../lib/api.js';
|
||||
import Modal from '../components/Modal.jsx';
|
||||
|
||||
function InscriptionModal({ rencontre, onClose, onDone }) {
|
||||
const [form, setForm] = useState({ nom: '', entreprise: '', email: '', tel: '' });
|
||||
const [done, setDone] = useState(false);
|
||||
const [error, setError] = useState('');
|
||||
const { jour, mois } = dateParts(rencontre.date_renc);
|
||||
|
||||
const onChange = (e) => setForm({ ...form, [e.target.name]: e.target.value });
|
||||
|
||||
const submit = async (e) => {
|
||||
e.preventDefault();
|
||||
setError('');
|
||||
try {
|
||||
await api.post(`/api/public/rencontres/${rencontre.id}/inscriptions`, form);
|
||||
setDone(true);
|
||||
onDone?.();
|
||||
} catch (err) {
|
||||
setError(err.message);
|
||||
}
|
||||
};
|
||||
|
||||
if (done) {
|
||||
return (
|
||||
<Modal onClose={onClose} maxWidth={460}>
|
||||
<div style={{ textAlign: 'center', padding: '50px 36px' }}>
|
||||
<div style={{ width: 60, height: 60, borderRadius: '50%', background: '#FBEDEC', color: 'var(--red)', display: 'flex', alignItems: 'center', justifyContent: 'center', fontSize: 30, margin: '0 auto 22px' }}>✓</div>
|
||||
<h3 className="serif" style={{ fontSize: 26, fontWeight: 600, marginBottom: 10 }}>Inscription enregistrée</h3>
|
||||
<p style={{ fontSize: 15, color: 'var(--gray)', lineHeight: 1.6, marginBottom: 8 }}>
|
||||
Votre demande pour <strong>{rencontre.titre}</strong> est bien enregistrée.
|
||||
</p>
|
||||
<p style={{ fontSize: 13.5, color: 'var(--gray-light)', marginBottom: 26 }}>
|
||||
Elle sera confirmée par l'équipe du Club.
|
||||
</p>
|
||||
<button className="btn btn-dark btn-sm" style={{ padding: '13px 28px', fontSize: 14 }} onClick={onClose}>Fermer</button>
|
||||
</div>
|
||||
</Modal>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<Modal
|
||||
onClose={onClose}
|
||||
maxWidth={460}
|
||||
header={{ kicker: 'Inscription', title: rencontre.titre, meta: `${jour} ${mois} · ${rencontre.heure} · ${rencontre.lieu}` }}
|
||||
>
|
||||
<form onSubmit={submit} style={{ padding: '28px 30px' }}>
|
||||
<div style={{ display: 'flex', flexDirection: 'column', gap: 14 }}>
|
||||
<label className="field-plain">Nom & prénom
|
||||
<input name="nom" value={form.nom} onChange={onChange} required maxLength={120} />
|
||||
</label>
|
||||
<label className="field-plain">Entreprise
|
||||
<input name="entreprise" value={form.entreprise} onChange={onChange} required maxLength={120} />
|
||||
</label>
|
||||
<label className="field-plain">Email
|
||||
<input name="email" type="email" value={form.email} onChange={onChange} required maxLength={254} />
|
||||
</label>
|
||||
</div>
|
||||
{error && <p className="error-text" style={{ marginTop: 12 }}>{error}</p>}
|
||||
<button type="submit" className="btn btn-red" style={{ width: '100%', marginTop: 22, padding: 14 }}>
|
||||
Confirmer mon inscription
|
||||
</button>
|
||||
<p style={{ fontSize: 12, color: 'var(--gray-light)', textAlign: 'center', marginTop: 12, lineHeight: 1.5 }}>
|
||||
Réservé aux membres à jour de leur adhésion pour la saison en cours.
|
||||
</p>
|
||||
</form>
|
||||
</Modal>
|
||||
);
|
||||
}
|
||||
|
||||
export default function Home() {
|
||||
const { data, reload } = usePublicData();
|
||||
const [inscrRenc, setInscrRenc] = useState(null);
|
||||
const [homeDone, setHomeDone] = useState(false);
|
||||
const [homeError, setHomeError] = useState('');
|
||||
const [form, setForm] = useState({ nom: '', fonction: '', entreprise: '', email: '' });
|
||||
|
||||
const onChange = (e) => setForm({ ...form, [e.target.name]: e.target.value });
|
||||
|
||||
const submitHome = async (e) => {
|
||||
e.preventDefault();
|
||||
setHomeError('');
|
||||
try {
|
||||
await api.post('/api/public/demandes-adhesion', form);
|
||||
setHomeDone(true);
|
||||
} catch (err) {
|
||||
setHomeError(err.message);
|
||||
}
|
||||
};
|
||||
|
||||
const members = data?.members ?? [];
|
||||
const rencontres = data?.rencontres ?? [];
|
||||
const passees = data?.rencontresPassees ?? [];
|
||||
const content = data?.content ?? {};
|
||||
const marquee = members.concat(members);
|
||||
|
||||
return (
|
||||
<main>
|
||||
{/* HERO */}
|
||||
<section className="container hero-grid" style={{ padding: '64px 32px 40px', display: 'grid', gridTemplateColumns: '1.05fr .95fr', gap: 64, alignItems: 'center' }}>
|
||||
<div>
|
||||
<div className="kicker" style={{ marginBottom: 26 }}>Réseau d'affaires · SLUC Nancy Basket</div>
|
||||
<h1 className="serif" style={{ fontWeight: 500, fontSize: 'clamp(40px, 6vw, 66px)', lineHeight: 1.02, letterSpacing: '-.01em', marginBottom: 26 }}>
|
||||
Le business se joue en <em style={{ fontStyle: 'italic', color: 'var(--red)' }}>équipe</em>.
|
||||
</h1>
|
||||
<p style={{ fontSize: 18, lineHeight: 1.65, color: 'var(--gray)', maxWidth: 480, marginBottom: 38 }}>
|
||||
Depuis 30 ans, le Business Club rassemble les dirigeants du Grand Est autour des valeurs du sport
|
||||
de haut niveau : performance, engagement et esprit collectif.
|
||||
</p>
|
||||
<div style={{ display: 'flex', gap: 14, flexWrap: 'wrap' }}>
|
||||
<a href="#adhesion" style={{ textDecoration: 'none' }}>
|
||||
<button className="btn btn-red">Rejoindre le club</button>
|
||||
</a>
|
||||
<Link to="/association" style={{ textDecoration: 'none' }}>
|
||||
<button className="btn btn-outline">Découvrir l'association</button>
|
||||
</Link>
|
||||
</div>
|
||||
<div style={{ display: 'flex', gap: 42, marginTop: 54, paddingTop: 34, borderTop: '1px solid var(--border)' }}>
|
||||
{[['85', 'entreprises membres'], ['12', 'rencontres / an'], ['30 ans', 'de partenariat']].map(([n, l]) => (
|
||||
<div key={l}>
|
||||
<div className="serif" style={{ fontSize: 34, fontWeight: 600 }}>{n}</div>
|
||||
<div style={{ fontSize: 13, color: 'var(--gray-light)', marginTop: 2 }}>{l}</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
<div style={{ position: 'relative' }}>
|
||||
<div className={content.hero_photo ? '' : 'placeholder-pattern'} style={{ aspectRatio: '4/5', borderRadius: 4, overflow: 'hidden', boxShadow: '0 30px 60px -30px rgba(27,27,27,.4)', display: 'flex', alignItems: 'flex-end', padding: content.hero_photo ? 0 : 22 }}>
|
||||
{content.hero_photo ? (
|
||||
<img src={content.hero_photo} alt="L'esprit du Club" style={{ width: '100%', height: '100%', objectFit: 'cover' }} />
|
||||
) : (
|
||||
<span style={{ fontFamily: 'monospace', fontSize: 11, color: '#a8a099', background: 'var(--bg)', padding: '5px 9px', borderRadius: 2 }}>
|
||||
photo — networking en tribune VIP
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
<div style={{ position: 'absolute', left: -30, bottom: 40, background: 'var(--ink)', color: '#fff', padding: '22px 26px', borderRadius: 4, maxWidth: 230, boxShadow: '0 20px 40px -20px rgba(0,0,0,.5)' }}>
|
||||
<div className="serif" style={{ fontSize: 19, lineHeight: 1.3, marginBottom: 6 }}>
|
||||
« {content.hero_quote_text || 'On ne réussit jamais seul.'} »
|
||||
</div>
|
||||
<div style={{ fontSize: 12, color: '#B7AFA6' }}>{content.hero_quote_author || "L'esprit du Club"}</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{/* SLUC LINK */}
|
||||
<section className="container" style={{ paddingBottom: 56 }}>
|
||||
<a
|
||||
href="https://www.sluc-nancy-basket.com"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
style={{ display: 'grid', gridTemplateColumns: '110px 1fr auto', alignItems: 'center', gap: 28, background: 'var(--dark)', borderRadius: 6, padding: '28px 32px', textDecoration: 'none', color: 'inherit' }}
|
||||
>
|
||||
<div style={{ aspectRatio: '1/1', width: 110, borderRadius: 8, overflow: 'hidden', background: '#fff', padding: 14 }}>
|
||||
<img src="/assets/logo.jpg" alt="Logo SLUC Nancy Basket" style={{ width: '100%', height: '100%', objectFit: 'contain' }} />
|
||||
</div>
|
||||
<div>
|
||||
<div style={{ fontSize: 11.5, letterSpacing: '.18em', textTransform: 'uppercase', color: 'var(--red-soft)', fontWeight: 600, marginBottom: 8 }}>
|
||||
Partenaire officiel
|
||||
</div>
|
||||
<div className="serif" style={{ fontSize: 22, fontWeight: 600, color: '#fff', marginBottom: 6 }}>SLUC Nancy Basket</div>
|
||||
<div style={{ fontSize: 14, lineHeight: 1.5, color: '#B7AFA6' }}>
|
||||
Retrouvez l'actualité, le calendrier et la billetterie du club sur son site officiel.
|
||||
</div>
|
||||
</div>
|
||||
<div style={{ fontSize: 13, fontWeight: 600, color: '#fff', whiteSpace: 'nowrap', display: 'flex', alignItems: 'center', gap: 8 }}>
|
||||
Voir le site <span style={{ fontSize: 16 }}>↗</span>
|
||||
</div>
|
||||
</a>
|
||||
</section>
|
||||
|
||||
{/* MEMBERS MARQUEE */}
|
||||
<section style={{ padding: '72px 0', background: '#fff', borderTop: '1px solid var(--border)', borderBottom: '1px solid var(--border)' }}>
|
||||
<div className="container" style={{ paddingBottom: 34, display: 'flex', alignItems: 'flex-end', justifyContent: 'space-between', gap: 24 }}>
|
||||
<div>
|
||||
<div className="kicker" style={{ marginBottom: 12 }}>Ils nous font confiance</div>
|
||||
<h2 className="serif" style={{ fontWeight: 500, fontSize: 36, lineHeight: 1.1 }}>Nos entreprises membres</h2>
|
||||
</div>
|
||||
<Link to="/annuaire" style={{ textDecoration: 'none' }}>
|
||||
<span className="btn-link" style={{ fontSize: 14, whiteSpace: 'nowrap' }}>Voir l'annuaire complet →</span>
|
||||
</Link>
|
||||
</div>
|
||||
<div className="marquee-mask">
|
||||
<div className="marquee-track">
|
||||
{marquee.map((m, i) => (
|
||||
<div key={`${m.id}-${i}`} style={{ width: 210, flexShrink: 0, background: 'var(--bg)', border: '1px solid var(--border)', borderRadius: 4, padding: '22px 20px', display: 'flex', flexDirection: 'column', gap: 14 }}>
|
||||
<div className={m.logo_path ? '' : 'placeholder-pattern'} style={{ height: 56, borderRadius: 3, display: 'flex', alignItems: 'center', justifyContent: 'center', fontFamily: 'monospace', fontSize: 10, color: '#a8a099', overflow: 'hidden', background: m.logo_path ? '#fff' : undefined }}>
|
||||
{m.logo_path ? <img src={m.logo_path} alt="" style={{ maxWidth: '100%', maxHeight: '100%', objectFit: 'contain' }} /> : 'logo'}
|
||||
</div>
|
||||
<div>
|
||||
<div className="serif" style={{ fontSize: 17, fontWeight: 600, lineHeight: 1.2 }}>{m.nom}</div>
|
||||
<div style={{ fontSize: 11, letterSpacing: '.08em', textTransform: 'uppercase', color: 'var(--red)', fontWeight: 600, marginTop: 6 }}>{m.secteur}</div>
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{/* UPCOMING */}
|
||||
<section className="container" style={{ padding: '96px 32px 40px' }}>
|
||||
<div style={{ textAlign: 'center', marginBottom: 52 }}>
|
||||
<div className="kicker" style={{ marginBottom: 14 }}>Agenda</div>
|
||||
<h2 className="serif" style={{ fontWeight: 500, fontSize: 44, lineHeight: 1.08 }}>Prochaines rencontres</h2>
|
||||
</div>
|
||||
<div className="grid-3">
|
||||
{rencontres.map((e) => {
|
||||
const { jour, mois } = dateParts(e.date_renc);
|
||||
const restantes = Math.max(0, e.places - e.inscrits);
|
||||
return (
|
||||
<div key={e.id} className="card" style={{ overflow: 'hidden', display: 'flex', flexDirection: 'column' }}>
|
||||
<div className="placeholder-pattern" style={{ height: 170, position: 'relative' }}>
|
||||
<div style={{ position: 'absolute', top: 16, left: 16, background: 'var(--dark)', color: '#fff', borderRadius: 3, padding: '8px 12px', textAlign: 'center', lineHeight: 1.05 }}>
|
||||
<div className="serif" style={{ fontSize: 24, fontWeight: 600 }}>{jour}</div>
|
||||
<div style={{ fontSize: 10, letterSpacing: '.12em', textTransform: 'uppercase', color: '#B7AFA6' }}>{mois}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style={{ padding: 24, display: 'flex', flexDirection: 'column', flex: 1 }}>
|
||||
<div style={{ fontSize: 12, color: 'var(--gray-light)', marginBottom: 8, display: 'flex', alignItems: 'center', gap: 8 }}>
|
||||
<span>{e.heure}</span><span>·</span><span>{e.lieu}</span>
|
||||
</div>
|
||||
<h3 className="serif" style={{ fontSize: 22, fontWeight: 600, lineHeight: 1.2, marginBottom: 10 }}>{e.titre}</h3>
|
||||
<p style={{ fontSize: 14.5, lineHeight: 1.6, color: 'var(--gray)', flex: 1 }}>{e.description}</p>
|
||||
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', marginTop: 22, paddingTop: 18, borderTop: '1px solid var(--border-soft)' }}>
|
||||
<span style={{ fontSize: 13, color: 'var(--red)', fontWeight: 600 }}>
|
||||
{restantes > 0 ? `${restantes} places restantes` : 'Complet'}
|
||||
</span>
|
||||
<button className="btn btn-dark btn-sm" style={{ fontSize: 13.5 }} disabled={restantes === 0} onClick={() => setInscrRenc(e)}>
|
||||
S'inscrire
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{/* PAST */}
|
||||
<section style={{ background: 'var(--beige)', marginTop: 56, padding: '96px 0' }}>
|
||||
<div className="container">
|
||||
<div style={{ marginBottom: 52 }}>
|
||||
<div className="kicker" style={{ marginBottom: 14 }}>Ils y étaient</div>
|
||||
<h2 className="serif" style={{ fontWeight: 500, fontSize: 44, lineHeight: 1.08 }}>Rencontres passées</h2>
|
||||
</div>
|
||||
<div style={{ display: 'flex', flexDirection: 'column', gap: 34 }}>
|
||||
{passees.map((p) => (
|
||||
<article key={p.id} className="card hero-grid" style={{ display: 'grid', gridTemplateColumns: '1.15fr .85fr', gap: 40, alignItems: 'center', padding: 36 }}>
|
||||
<div>
|
||||
<div style={{ fontSize: 12, letterSpacing: '.14em', textTransform: 'uppercase', color: 'var(--gray-light)', fontWeight: 600, marginBottom: 12 }}>
|
||||
{p.date_label} · {p.lieu}
|
||||
</div>
|
||||
<h3 className="serif" style={{ fontSize: 30, fontWeight: 600, lineHeight: 1.12, marginBottom: 16 }}>{p.titre}</h3>
|
||||
<p style={{ fontSize: 15.5, lineHeight: 1.7, color: 'var(--gray)', marginBottom: 20 }}>{p.texte}</p>
|
||||
<div style={{ display: 'flex', gap: 20, fontSize: 13, color: 'var(--gray-light)' }}>
|
||||
<span>👥 {p.participants} participants</span>
|
||||
<span>📷 {p.nb_photos} photos</span>
|
||||
</div>
|
||||
</div>
|
||||
<div style={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gridTemplateRows: '1fr 1fr', gap: 10, height: 240 }}>
|
||||
<div className="placeholder-pattern" style={{ gridRow: 'span 2', borderRadius: 3 }} />
|
||||
<div className="placeholder-pattern" style={{ borderRadius: 3 }} />
|
||||
<div className="placeholder-pattern" style={{ borderRadius: 3 }} />
|
||||
</div>
|
||||
</article>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{/* ADHESION */}
|
||||
<section id="adhesion" style={{ background: 'var(--dark)', color: '#fff', padding: '100px 0' }}>
|
||||
<div className="hero-grid" style={{ maxWidth: 1080, margin: '0 auto', padding: '0 32px', display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 70, alignItems: 'center' }}>
|
||||
<div>
|
||||
<div className="kicker on-dark" style={{ marginBottom: 20 }}>Nous rejoindre</div>
|
||||
<h2 className="serif" style={{ fontWeight: 500, fontSize: 46, lineHeight: 1.08, marginBottom: 22 }}>
|
||||
Faites entrer votre entreprise dans le Club.
|
||||
</h2>
|
||||
<p style={{ fontSize: 16.5, lineHeight: 1.65, color: '#B7AFA6', marginBottom: 32 }}>
|
||||
Rejoignez un réseau de 85 dirigeants, accédez à toutes nos rencontres et bénéficiez d'une visibilité au cœur du SLUC Nancy.
|
||||
</p>
|
||||
<ul style={{ listStyle: 'none', display: 'flex', flexDirection: 'column', gap: 14 }}>
|
||||
{['Accès à toutes les rencontres business', 'Places privilégiées aux matchs', "Présence dans l'annuaire des membres"].map((t) => (
|
||||
<li key={t} style={{ display: 'flex', gap: 12, alignItems: 'flex-start', fontSize: 15, color: '#E7E1D9' }}>
|
||||
<span style={{ color: 'var(--red-soft)', fontWeight: 700 }}>—</span>{t}
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</div>
|
||||
<div style={{ background: '#fff', color: 'var(--ink)', borderRadius: 6, padding: 38 }}>
|
||||
{homeDone ? (
|
||||
<div style={{ textAlign: 'center', padding: '30px 10px' }}>
|
||||
<div style={{ width: 58, height: 58, borderRadius: '50%', background: '#FBEDEC', color: 'var(--red)', display: 'flex', alignItems: 'center', justifyContent: 'center', fontSize: 28, margin: '0 auto 20px' }}>✓</div>
|
||||
<h3 className="serif" style={{ fontSize: 26, fontWeight: 600, marginBottom: 10 }}>Demande envoyée !</h3>
|
||||
<p style={{ fontSize: 15, color: 'var(--gray)', lineHeight: 1.6, marginBottom: 24 }}>
|
||||
Merci pour votre intérêt. Notre équipe vous recontacte sous 48h.
|
||||
</p>
|
||||
<button className="btn btn-outline btn-sm" style={{ fontSize: 14, padding: '12px 24px' }} onClick={() => { setHomeDone(false); setForm({ nom: '', fonction: '', entreprise: '', email: '' }); }}>
|
||||
Nouvelle demande
|
||||
</button>
|
||||
</div>
|
||||
) : (
|
||||
<form onSubmit={submitHome}>
|
||||
<h3 className="serif" style={{ fontSize: 24, fontWeight: 600, marginBottom: 22 }}>Demande d'adhésion</h3>
|
||||
<div style={{ display: 'flex', flexDirection: 'column', gap: 16 }}>
|
||||
<div style={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 12 }}>
|
||||
<label className="field-plain">Nom & prénom
|
||||
<input name="nom" value={form.nom} onChange={onChange} required maxLength={120} />
|
||||
</label>
|
||||
<label className="field-plain">Fonction
|
||||
<input name="fonction" value={form.fonction} onChange={onChange} maxLength={120} />
|
||||
</label>
|
||||
</div>
|
||||
<label className="field-plain">Entreprise
|
||||
<input name="entreprise" value={form.entreprise} onChange={onChange} required maxLength={120} />
|
||||
</label>
|
||||
<label className="field-plain">Email professionnel
|
||||
<input name="email" type="email" value={form.email} onChange={onChange} required maxLength={254} />
|
||||
</label>
|
||||
</div>
|
||||
{homeError && <p className="error-text" style={{ marginTop: 12 }}>{homeError}</p>}
|
||||
<button type="submit" className="btn btn-red" style={{ width: '100%', marginTop: 24, padding: 15 }}>
|
||||
Envoyer ma demande
|
||||
</button>
|
||||
</form>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{inscrRenc && (
|
||||
<InscriptionModal rencontre={inscrRenc} onClose={() => setInscrRenc(null)} onDone={reload} />
|
||||
)}
|
||||
</main>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user