rework home page, fichier config pour l'url , ajout de liens en bas des pages publiques
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 391 KiB After Width: | Height: | Size: 397 KiB |
@@ -12,6 +12,7 @@ import { Badge } from '@/components/ui/badge';
|
|||||||
import { ArrowLeft, FileText, User, Mail, CheckCircle, AlertCircle } from 'lucide-react';
|
import { ArrowLeft, FileText, User, Mail, CheckCircle, AlertCircle } from 'lucide-react';
|
||||||
import { MarkdownContent } from '@/components/MarkdownContent';
|
import { MarkdownContent } from '@/components/MarkdownContent';
|
||||||
import { MarkdownEditor } from '@/components/MarkdownEditor';
|
import { MarkdownEditor } from '@/components/MarkdownEditor';
|
||||||
|
import { PROJECT_CONFIG } from '@/lib/project.config';
|
||||||
|
|
||||||
export const dynamic = 'force-dynamic';
|
export const dynamic = 'force-dynamic';
|
||||||
|
|
||||||
@@ -302,6 +303,22 @@ export default function PublicProposePage() {
|
|||||||
</form>
|
</form>
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
|
|
||||||
|
{/* Footer discret */}
|
||||||
|
<div className="text-center mt-16 pb-8">
|
||||||
|
<p className="text-slate-400 dark:text-slate-500 text-sm">
|
||||||
|
Développé avec ❤️ pour faciliter la démocratie participative -{' '}
|
||||||
|
<a
|
||||||
|
href={PROJECT_CONFIG.repository.url}
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
className="text-slate-500 dark:text-slate-400 hover:text-slate-700 dark:hover:text-slate-300 underline"
|
||||||
|
>
|
||||||
|
Logiciel libre
|
||||||
|
</a>{' '}
|
||||||
|
et transparent pour tous
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import Link from 'next/link';
|
|||||||
import { Campaign, Proposition, Participant, Vote, PropositionWithVote } from '@/types';
|
import { Campaign, Proposition, Participant, Vote, PropositionWithVote } from '@/types';
|
||||||
import { campaignService, participantService, propositionService, voteService, settingsService } from '@/lib/services';
|
import { campaignService, participantService, propositionService, voteService, settingsService } from '@/lib/services';
|
||||||
import { MarkdownContent } from '@/components/MarkdownContent';
|
import { MarkdownContent } from '@/components/MarkdownContent';
|
||||||
|
import { PROJECT_CONFIG } from '@/lib/project.config';
|
||||||
|
|
||||||
// Force dynamic rendering to avoid SSR issues with Supabase
|
// Force dynamic rendering to avoid SSR issues with Supabase
|
||||||
export const dynamic = 'force-dynamic';
|
export const dynamic = 'force-dynamic';
|
||||||
@@ -536,6 +537,22 @@ export default function PublicVotePage() {
|
|||||||
{error}
|
{error}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
{/* Footer discret */}
|
||||||
|
<div className="text-center mt-16 pb-20">
|
||||||
|
<p className="text-gray-400 text-sm">
|
||||||
|
Développé avec ❤️ pour faciliter la démocratie participative -{' '}
|
||||||
|
<a
|
||||||
|
href={PROJECT_CONFIG.repository.url}
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
className="text-gray-500 hover:text-gray-700 underline"
|
||||||
|
>
|
||||||
|
Logiciel libre
|
||||||
|
</a>{' '}
|
||||||
|
et transparent pour tous
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Barre fixe en bas */}
|
{/* Barre fixe en bas */}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import Link from 'next/link';
|
|||||||
import { Button } from '@/components/ui/button';
|
import { Button } from '@/components/ui/button';
|
||||||
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card';
|
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card';
|
||||||
import { Badge } from '@/components/ui/badge';
|
import { Badge } from '@/components/ui/badge';
|
||||||
|
import { PROJECT_CONFIG } from '@/lib/project.config';
|
||||||
|
|
||||||
export default function HomePage() {
|
export default function HomePage() {
|
||||||
return (
|
return (
|
||||||
@@ -19,22 +20,10 @@ export default function HomePage() {
|
|||||||
Participez aux décisions budgétaires de vos collectifs.
|
Participez aux décisions budgétaires de vos collectifs.
|
||||||
Votez pour les projets qui vous tiennent à cœur et façonnez ensemble l'avenir de votre communauté.
|
Votez pour les projets qui vous tiennent à cœur et façonnez ensemble l'avenir de votre communauté.
|
||||||
</p>
|
</p>
|
||||||
<div className="flex flex-col sm:flex-row gap-4 justify-center">
|
|
||||||
<Button asChild size="lg" className="text-lg px-8 py-6">
|
|
||||||
<Link href="/admin">
|
|
||||||
🔐 Espace Administration
|
|
||||||
</Link>
|
|
||||||
</Button>
|
|
||||||
<Button asChild variant="outline" size="lg" className="text-lg px-8 py-6">
|
|
||||||
<Link href="#features">
|
|
||||||
📋 Découvrir les fonctionnalités
|
|
||||||
</Link>
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Features Section */}
|
{/* Features Section */}
|
||||||
<div id="features" className="grid md:grid-cols-3 gap-8 mb-16">
|
<div id="features" className="grid md:grid-cols-2 lg:grid-cols-3 gap-8 mb-16">
|
||||||
<Card className="border-0 shadow-lg hover:shadow-xl transition-shadow duration-300">
|
<Card className="border-0 shadow-lg hover:shadow-xl transition-shadow duration-300">
|
||||||
<CardHeader className="text-center">
|
<CardHeader className="text-center">
|
||||||
<div className="w-12 h-12 bg-blue-100 dark:bg-blue-900 rounded-lg flex items-center justify-center mx-auto mb-4">
|
<div className="w-12 h-12 bg-blue-100 dark:bg-blue-900 rounded-lg flex items-center justify-center mx-auto mb-4">
|
||||||
@@ -57,7 +46,7 @@ export default function HomePage() {
|
|||||||
<div className="w-12 h-12 bg-green-100 dark:bg-green-900 rounded-lg flex items-center justify-center mx-auto mb-4">
|
<div className="w-12 h-12 bg-green-100 dark:bg-green-900 rounded-lg flex items-center justify-center mx-auto mb-4">
|
||||||
<span className="text-2xl">🗳️</span>
|
<span className="text-2xl">🗳️</span>
|
||||||
</div>
|
</div>
|
||||||
<CardTitle className="text-xl">Vote</CardTitle>
|
<CardTitle className="text-xl">Vote Intelligent</CardTitle>
|
||||||
<CardDescription>
|
<CardDescription>
|
||||||
Votez pour les projets qui vous semblent prioritaires
|
Votez pour les projets qui vous semblent prioritaires
|
||||||
</CardDescription>
|
</CardDescription>
|
||||||
@@ -74,9 +63,9 @@ export default function HomePage() {
|
|||||||
<div className="w-12 h-12 bg-purple-100 dark:bg-purple-900 rounded-lg flex items-center justify-center mx-auto mb-4">
|
<div className="w-12 h-12 bg-purple-100 dark:bg-purple-900 rounded-lg flex items-center justify-center mx-auto mb-4">
|
||||||
<span className="text-2xl">📊</span>
|
<span className="text-2xl">📊</span>
|
||||||
</div>
|
</div>
|
||||||
<CardTitle className="text-xl">Résultats</CardTitle>
|
<CardTitle className="text-xl">Résultats en Temps Réel</CardTitle>
|
||||||
<CardDescription>
|
<CardDescription>
|
||||||
Suivez en temps réel l'évolution des votes
|
Suivez l'évolution des votes et visualisez les tendances
|
||||||
</CardDescription>
|
</CardDescription>
|
||||||
</CardHeader>
|
</CardHeader>
|
||||||
<CardContent className="text-center">
|
<CardContent className="text-center">
|
||||||
@@ -85,24 +74,91 @@ export default function HomePage() {
|
|||||||
</p>
|
</p>
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
|
|
||||||
|
<Card className="border-0 shadow-lg hover:shadow-xl transition-shadow duration-300">
|
||||||
|
<CardHeader className="text-center">
|
||||||
|
<div className="w-12 h-12 bg-orange-100 dark:bg-orange-900 rounded-lg flex items-center justify-center mx-auto mb-4">
|
||||||
|
<span className="text-2xl">👥</span>
|
||||||
|
</div>
|
||||||
|
<CardTitle className="text-xl">Gestion des Participants</CardTitle>
|
||||||
|
<CardDescription>
|
||||||
|
Gérez facilement les membres de votre collectif
|
||||||
|
</CardDescription>
|
||||||
|
</CardHeader>
|
||||||
|
<CardContent className="text-center">
|
||||||
|
<p className="text-slate-600 dark:text-slate-300">
|
||||||
|
Invitez, gérez et suivez la participation de votre communauté
|
||||||
|
</p>
|
||||||
|
</CardContent>
|
||||||
|
</Card>
|
||||||
|
|
||||||
|
<Card className="border-0 shadow-lg hover:shadow-xl transition-shadow duration-300">
|
||||||
|
<CardHeader className="text-center">
|
||||||
|
<div className="w-12 h-12 bg-indigo-100 dark:bg-indigo-900 rounded-lg flex items-center justify-center mx-auto mb-4">
|
||||||
|
<span className="text-2xl">⚙️</span>
|
||||||
|
</div>
|
||||||
|
<CardTitle className="text-xl">Administration Complète</CardTitle>
|
||||||
|
<CardDescription>
|
||||||
|
Interface d'administration intuitive et puissante
|
||||||
|
</CardDescription>
|
||||||
|
</CardHeader>
|
||||||
|
<CardContent className="text-center">
|
||||||
|
<p className="text-slate-600 dark:text-slate-300">
|
||||||
|
Créez des campagnes, gérez les emails et analysez les statistiques
|
||||||
|
</p>
|
||||||
|
</CardContent>
|
||||||
|
</Card>
|
||||||
|
|
||||||
|
<Card className="border-0 shadow-lg hover:shadow-xl transition-shadow duration-300">
|
||||||
|
<CardHeader className="text-center">
|
||||||
|
<div className="w-12 h-12 bg-emerald-100 dark:bg-emerald-900 rounded-lg flex items-center justify-center mx-auto mb-4">
|
||||||
|
<span className="text-2xl">🔓</span>
|
||||||
|
</div>
|
||||||
|
<CardTitle className="text-xl">Open Source</CardTitle>
|
||||||
|
<CardDescription>
|
||||||
|
Logiciel libre et transparent pour tous
|
||||||
|
</CardDescription>
|
||||||
|
</CardHeader>
|
||||||
|
<CardContent className="text-center">
|
||||||
|
<p className="text-slate-600 dark:text-slate-300">
|
||||||
|
Code source ouvert, modifiable et adaptable à vos besoins
|
||||||
|
</p>
|
||||||
|
</CardContent>
|
||||||
|
</Card>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Administration Button */}
|
||||||
|
<div className="text-center mb-16">
|
||||||
|
<Button asChild size="lg" className="text-lg px-8 py-6">
|
||||||
|
<Link href="/admin">
|
||||||
|
🔐 Espace Administration
|
||||||
|
</Link>
|
||||||
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* CTA Section */}
|
{/* CTA Section */}
|
||||||
<Card className="border-0 shadow-xl bg-gradient-to-r from-blue-600 to-purple-600 text-white">
|
<Card className="border-0 shadow-xl bg-gradient-to-r from-blue-600 to-purple-600 text-white">
|
||||||
<CardContent className="p-8 text-center">
|
<CardContent className="p-8 text-center">
|
||||||
<h2 className="text-3xl font-bold mb-4">
|
<h2 className="text-3xl font-bold mb-4">
|
||||||
Prêt à participer ?
|
Envie de participer ?
|
||||||
</h2>
|
</h2>
|
||||||
<p className="text-xl mb-6 opacity-90">
|
<p className="text-xl mb-6 opacity-90">
|
||||||
Rejoignez votre collectif et prenez part aux décisions qui vous concernent
|
Dotez votre collectif d'outils pour prendre des décisions budgétaires en utilisant l'intelligence collective
|
||||||
</p>
|
</p>
|
||||||
<Button asChild size="lg" variant="secondary" className="text-lg px-8 py-6">
|
<Button asChild size="lg" variant="secondary" className="text-lg px-8 py-6">
|
||||||
<Link href="/admin">
|
<Link href={PROJECT_CONFIG.repository.url} target="_blank" rel="noopener noreferrer">
|
||||||
Commencer maintenant
|
Obtenir l'outil
|
||||||
</Link>
|
</Link>
|
||||||
</Button>
|
</Button>
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
|
|
||||||
|
{/* Footer */}
|
||||||
|
<div className="text-center mt-16 pb-8">
|
||||||
|
<p className="text-slate-600 dark:text-slate-400 text-lg">
|
||||||
|
Développé avec ❤️ pour faciliter la démocratie participative
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
41
src/lib/project.config.ts
Normal file
41
src/lib/project.config.ts
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
/**
|
||||||
|
* Configuration centralisée du projet
|
||||||
|
* Toutes les informations importantes du projet sont stockées ici
|
||||||
|
*/
|
||||||
|
|
||||||
|
export const PROJECT_CONFIG = {
|
||||||
|
// Informations générales du projet
|
||||||
|
name: "Mes Budgets Participatifs",
|
||||||
|
description: "Application de gestion de budgets participatifs",
|
||||||
|
version: "1.0.0",
|
||||||
|
|
||||||
|
// Repository Git officiel
|
||||||
|
repository: {
|
||||||
|
url: "https://git.astrolabe.coop/yannick.leduc/mes-budgets-participatifs", // À définir par l'utilisateur
|
||||||
|
type: "git",
|
||||||
|
provider: "gitea" // ou "gitlab", "bitbucket", etc.
|
||||||
|
},
|
||||||
|
|
||||||
|
// Informations de contact
|
||||||
|
contact: {
|
||||||
|
email: "yannick.leduc@astrolabe.coop",
|
||||||
|
website: "https://astrolabe.coop"
|
||||||
|
},
|
||||||
|
|
||||||
|
// Licence
|
||||||
|
license: "MIT",
|
||||||
|
|
||||||
|
// Auteurs
|
||||||
|
authors: [],
|
||||||
|
|
||||||
|
// Configuration technique
|
||||||
|
tech: {
|
||||||
|
framework: "Next.js",
|
||||||
|
language: "TypeScript",
|
||||||
|
database: "Supabase",
|
||||||
|
styling: "Tailwind CSS"
|
||||||
|
}
|
||||||
|
} as const;
|
||||||
|
|
||||||
|
// Type pour la configuration
|
||||||
|
export type ProjectConfig = typeof PROJECT_CONFIG;
|
||||||
Reference in New Issue
Block a user