Skip to content

Commit dec9642

Browse files
committed
feat: enhance page layout with consistent minimum height and add feature cards
1 parent b90aca2 commit dec9642

File tree

8 files changed

+82
-31
lines changed

8 files changed

+82
-31
lines changed

.github/workflows/main-workflow.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ jobs:
5858
run: npm run build
5959

6060
- name: Bump version and commit
61-
if: github.ref == 'refs/heads/main'
6261
run: |
6362
# Configure git to use GitHub Actions
6463
git config --global user.name "github-actions[bot]"
@@ -78,7 +77,7 @@ jobs:
7877
7978
# Make a commit
8079
git add package.json package-lock.json
81-
git commit -m "${{ github.event.head_commit.message}} [+ update version to: $(cat package.json | jq -r .version)]"
80+
git commit -m "Update version to: $(cat package.json | jq -r .version)]"
8281
8382
# Push commit without triggering a new build
8483
git push origin HEAD:$GITHUB_REF

app/ajout/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export default async function Page() {
88
return (
99
<>
1010
<Header navigation={navigation} />
11-
<main className="container mx-auto px-4 py-8">
11+
<main className="min-h-[calc(100vh-8rem)] container mx-auto px-4 py-8">
1212
<JsonUploadForm />
1313
</main>
1414
</>

app/page.tsx

Lines changed: 75 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,95 @@
11
import Header from "@/components/header"
22
import { Button } from "@/components/ui/button"
3+
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"
34
import { NavItemsBuilder } from "@/lib/routing-links"
5+
import { Activity, Database, Scan, Send } from "lucide-react"
46
import Link from "next/link"
57

68
export default async function Home() {
79
const navigation = new NavItemsBuilder().withHome().getItems()
810

11+
const features = [
12+
{
13+
icon: <Activity className="w-6 h-6" />,
14+
title: "Suivi des métriques",
15+
description: "Analysez l'évolution des performances de vos sites",
16+
href: "/suivi",
17+
},
18+
{
19+
icon: <Database className="w-6 h-6" />,
20+
title: "Import de données",
21+
description: "Importez vos rapports Lighthouse",
22+
href: "/ajout",
23+
},
24+
{
25+
icon: <Scan className="w-6 h-6" />,
26+
title: "Analyse rapide",
27+
description: "Testez instantanément n'importe quel site",
28+
href: "/scan",
29+
},
30+
]
31+
932
return (
1033
<>
1134
<Header navigation={navigation} />
12-
<main className="min-h-[calc(100vh-8rem)] flex flex-col items-center justify-center bg-gradient-to-b from-white to-gray-50">
13-
<div className="text-center p-8">
14-
<h1 className="text-6xl font-bold text-gray-900 mb-4">
35+
<main className="min-h-[calc(100vh-8rem)] flex flex-col gap-8 items-center justify-center bg-gradient-to-b from-white to-gray-50">
36+
{/* Hero section */}
37+
<div className="text-center">
38+
<h1 className="text-6xl font-bold text-gray-900">
1539
<span className="text-green-600">Eco</span>Track
1640
</h1>
17-
18-
<p className="text-xl text-gray-600 mx-auto mb-8">
41+
<p className="text-xl text-gray-600 mx-auto max-w-2xl">
1942
{"Suivez et optimisez la performance environnementale de vos applications web"}
2043
</p>
44+
</div>
45+
46+
{/* Section features */}
47+
<div className="w-full max-w-6xl">
48+
<div className="flex flex-wrap gap-6">
49+
{features.map((feature, index) => (
50+
<Link href={feature.href} key={index}>
51+
<Card className="h-full hover:shadow-lg transition-shadow duration-200 w-[350px]">
52+
<CardHeader>
53+
<CardTitle className="flex justify-center">
54+
<div className="bg-green-100 rounded-lg p-3">{feature.icon}</div>
55+
</CardTitle>
56+
</CardHeader>
57+
<CardContent className="flex flex-col items-center text-center">
58+
<h3 className="font-semibold text-lg">{feature.title}</h3>
59+
<p className="text-muted-foreground">{feature.description}</p>
60+
</CardContent>
61+
</Card>
62+
</Link>
63+
))}
64+
</div>
65+
</div>
2166

22-
<Link href="/suivi">
23-
<Button size="lg" className="text-lg px-8 py-6">
24-
{"Démarrer le suivi"}
25-
<svg
26-
className="ml-2 h-5 w-5"
27-
fill="none"
28-
stroke="currentColor"
29-
viewBox="0 0 24 24"
30-
xmlns="http://www.w3.org/2000/svg"
67+
{/* Section contact */}
68+
<div className="w-full max-w-2xl">
69+
<Card className="bg-gradient-to-r from-green-50 to-blue-50">
70+
<CardHeader>
71+
<CardTitle className="flex justify-center">
72+
<Send className="w-6 h-6 text-green-600" />
73+
</CardTitle>
74+
</CardHeader>
75+
<CardContent className="flex flex-col gap-4 text-center">
76+
<h3 className="font-semibold text-lg">{"Besoin d'aide ?"}</h3>
77+
<p className="text-muted-foreground">
78+
{"Des questions ou des suggestions pour améliorer EcoTrack ?"}
79+
</p>
80+
<a
81+
href="https://www.alextraveylan.fr/fr/contact"
82+
target="_blank"
83+
rel="noopener noreferrer"
84+
className="inline-block"
3185
>
32-
<path
33-
strokeLinecap="round"
34-
strokeLinejoin="round"
35-
strokeWidth={2}
36-
d="M13 7l5 5m0 0l-5 5m5-5H6"
37-
/>
38-
</svg>
39-
</Button>
40-
</Link>
86+
<Button variant="outline" className="gap-2">
87+
{"Contactez-moi"}
88+
<Send className="w-4 h-4" />
89+
</Button>
90+
</a>
91+
</CardContent>
92+
</Card>
4193
</div>
4294
</main>
4395
</>

app/scan/[url]/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export default async function Page({
4949
return (
5050
<>
5151
<Header navigation={navigation} />
52-
<main className="py-4">
52+
<main className="min-h-[calc(100vh-8rem)] py-4">
5353
<div className="flex flex-col gap-4">
5454
<ReportInfos metrics={metrics} />
5555
<DynamicEcoIndexDisplay ecoIndex={ecoIndex} />

app/scan/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default async function Page() {
77
return (
88
<>
99
<Header navigation={navigation} />
10-
<main className="container mx-auto px-4 py-8">
10+
<main className="min-h-[calc(100vh-8rem)] container mx-auto px-4 py-8">
1111
<div className="max-w-3xl mx-auto">
1212
<h1 className="text-4xl font-bold text-center mb-6">
1313
{"Analysez l'impact environnemental de votre site"}

app/suivi/[projectName]/[pageName]/[reportNumber]/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export default async function Page({
5656
return (
5757
<>
5858
<Header navigation={navigation} />
59-
<main className="py-4">
59+
<main className="min-h-[calc(100vh-8rem)] py-4">
6060
<div className="flex flex-col gap-4">
6161
<ReportInfos metrics={metrics} />
6262
<DynamicEcoIndexDisplay ecoIndex={ecoIndex} />

app/suivi/[projectName]/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export default async function Page({
3636
return (
3737
<>
3838
<Header navigation={navigation} />
39-
<main className="container mx-auto px-4 py-8">
39+
<main className="min-h-[calc(100vh-8rem)] container mx-auto px-4 py-8">
4040
<div className="mb-8">
4141
<h1 className="text-4xl font-bold mb-2">{project.name}</h1>
4242
<p className="text-gray-600">{"Vue d'ensemble du projet"}</p>

app/suivi/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export default async function Page() {
1717
return (
1818
<>
1919
<Header navigation={navigation} />
20-
<main className="container mx-auto px-4 py-8">
20+
<main className="min-h-[calc(100vh-8rem)] container mx-auto px-4 py-8">
2121
<h1 className="text-4xl font-bold mb-8">{"Suivi des Projets"}</h1>
2222
<div className="grid gap-6">
2323
{projects.map((project) => (

0 commit comments

Comments
 (0)