From a7f088fb631f6f1ea196ccd7d4826d9c68f25110 Mon Sep 17 00:00:00 2001
From: diubi
Date: Wed, 11 Mar 2026 22:41:52 +0100
Subject: [PATCH 01/20] Card initial commit
---
src/app/page.tsx | 14 +++++++-
src/components/ui/card.tsx | 74 ++++++++++++++++++++++++++++++++++++++
2 files changed, 87 insertions(+), 1 deletion(-)
create mode 100644 src/components/ui/card.tsx
diff --git a/src/app/page.tsx b/src/app/page.tsx
index ecc1240..e625073 100644
--- a/src/app/page.tsx
+++ b/src/app/page.tsx
@@ -1,6 +1,7 @@
-import { Users } from "lucide-react"
+import { CropIcon, Users } from "lucide-react"
import { Button } from "@/components/ui/button"
import { ButtonWithIcon } from "@/components/ui/buttonWithIcon"
+import { Card, CardAction, CardBottomButton, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"
export default function Home() {
return (
@@ -17,6 +18,17 @@ export default function Home() {
+
+
+
+ Card Title
+
+
+
+ description: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incidunt ut labore et dolore magna aliqua.
+
+ Button
+
)
}
diff --git a/src/components/ui/card.tsx b/src/components/ui/card.tsx
new file mode 100644
index 0000000..630278a
--- /dev/null
+++ b/src/components/ui/card.tsx
@@ -0,0 +1,74 @@
+import type { LucideIcon } from "lucide-react"
+import type * as React from "react"
+import { cn } from "@/lib/utils"
+import { Glass } from "../glass"
+import { Button } from "./button"
+
+function Card({ className, size = "default", ...props }: React.ComponentProps<"div"> & { size?: "default" | "sm" }) {
+ return (
+ img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl group/card flex flex-col",
+ className
+ )}
+ {...props}
+ />
+ )
+}
+
+function CardHeader({ className, ...props }: React.ComponentProps<"div">) {
+ return (
+
+ )
+}
+
+function CardTitle({ className, ...props }: React.ComponentProps<"div">) {
+ return (
+
+ )
+}
+
+function CardDescription({ className, ...props }: React.ComponentProps<"div">) {
+ return
+}
+
+function CardAction({ className, icon: Icon, ...props }: React.ComponentProps<"div"> & { icon: LucideIcon }) {
+ return (
+
+
+
+ )
+}
+
+function CardContent({ className, ...props }: React.ComponentProps<"div">) {
+ return
+}
+
+function CardBottomButton({ className, ...props }: React.ComponentProps) {
+ return (
+
+ )
+}
+
+export { Card, CardHeader, CardBottomButton, CardTitle, CardAction, CardDescription, CardContent }
From cb61f097a8b285d4dd5aa5b287c924f5161d85a3 Mon Sep 17 00:00:00 2001
From: diubi
Date: Wed, 11 Mar 2026 23:57:19 +0100
Subject: [PATCH 02/20] Text and icon gradients
---
src/app/page.tsx | 11 +++++++----
src/components/ui/card.tsx | 35 +++++++++++++++++++++++------------
2 files changed, 30 insertions(+), 16 deletions(-)
diff --git a/src/app/page.tsx b/src/app/page.tsx
index e625073..f3feec5 100644
--- a/src/app/page.tsx
+++ b/src/app/page.tsx
@@ -1,7 +1,7 @@
import { CropIcon, Users } from "lucide-react"
import { Button } from "@/components/ui/button"
import { ButtonWithIcon } from "@/components/ui/buttonWithIcon"
-import { Card, CardAction, CardBottomButton, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"
+import { Card, CardAction, CardBottomButton, CardContent, CardHeader, CardTitle } from "@/components/ui/card"
export default function Home() {
return (
@@ -21,13 +21,16 @@ export default function Home() {
- Card Title
+ Title
- description: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incidunt ut labore et dolore magna aliqua.
+
+ description: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incidunt ut
+ labore et dolore magna aliqua.
+
- Button
+ Label
)
diff --git a/src/components/ui/card.tsx b/src/components/ui/card.tsx
index 630278a..82cfe0e 100644
--- a/src/components/ui/card.tsx
+++ b/src/components/ui/card.tsx
@@ -1,10 +1,14 @@
import type { LucideIcon } from "lucide-react"
-import type * as React from "react"
+import * as React from "react"
import { cn } from "@/lib/utils"
import { Glass } from "../glass"
import { Button } from "./button"
-function Card({ className, size = "default", ...props }: React.ComponentProps<"div"> & { size?: "default" | "sm" }) {
+function Card({
+ className,
+ size = "default",
+ ...props
+}: React.ComponentProps & { size?: "default" | "sm" }) {
return (
) {
return (
)
@@ -46,13 +53,23 @@ function CardDescription({ className, ...props }: React.ComponentProps<"div">) {
}
function CardAction({ className, icon: Icon, ...props }: React.ComponentProps<"div"> & { icon: LucideIcon }) {
+ const gradientId = React.useId()
+
return (
-
+
+
+
)
}
@@ -62,13 +79,7 @@ function CardContent({ className, ...props }: React.ComponentProps<"div">) {
}
function CardBottomButton({ className, ...props }: React.ComponentProps) {
- return (
-
- )
+ return
}
export { Card, CardHeader, CardBottomButton, CardTitle, CardAction, CardDescription, CardContent }
From 2e3f23d302dcee1a12eb953729c994d5798646f0 Mon Sep 17 00:00:00 2001
From: diubi
Date: Thu, 12 Mar 2026 00:13:34 +0100
Subject: [PATCH 03/20] Used figma classes
---
src/components/ui/card.tsx | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/components/ui/card.tsx b/src/components/ui/card.tsx
index 82cfe0e..516f553 100644
--- a/src/components/ui/card.tsx
+++ b/src/components/ui/card.tsx
@@ -40,7 +40,7 @@ function CardTitle({ className, ...props }: React.ComponentProps<"div">) {
Icon gradient helper
-
-
+
+
From d4975c01da5387e829d5062149dd19940353f286 Mon Sep 17 00:00:00 2001
From: diubi
Date: Tue, 17 Mar 2026 23:01:11 +0100
Subject: [PATCH 04/20] Moved card.tsx to components/ui/cards
---
src/app/page.tsx | 17 +----------------
src/components/ui/{ => cards}/card.tsx | 4 ++--
2 files changed, 3 insertions(+), 18 deletions(-)
rename src/components/ui/{ => cards}/card.tsx (97%)
diff --git a/src/app/page.tsx b/src/app/page.tsx
index f3feec5..ecc1240 100644
--- a/src/app/page.tsx
+++ b/src/app/page.tsx
@@ -1,7 +1,6 @@
-import { CropIcon, Users } from "lucide-react"
+import { Users } from "lucide-react"
import { Button } from "@/components/ui/button"
import { ButtonWithIcon } from "@/components/ui/buttonWithIcon"
-import { Card, CardAction, CardBottomButton, CardContent, CardHeader, CardTitle } from "@/components/ui/card"
export default function Home() {
return (
@@ -18,20 +17,6 @@ export default function Home() {
-
-
-
- Title
-
-
-
-
- description: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incidunt ut
- labore et dolore magna aliqua.
-
-
- Label
-
)
}
diff --git a/src/components/ui/card.tsx b/src/components/ui/cards/card.tsx
similarity index 97%
rename from src/components/ui/card.tsx
rename to src/components/ui/cards/card.tsx
index 516f553..212585d 100644
--- a/src/components/ui/card.tsx
+++ b/src/components/ui/cards/card.tsx
@@ -1,8 +1,8 @@
import type { LucideIcon } from "lucide-react"
import * as React from "react"
import { cn } from "@/lib/utils"
-import { Glass } from "../glass"
-import { Button } from "./button"
+import { Glass } from "../../glass"
+import { Button } from "../button"
function Card({
className,
From 4b4056a44b31e0a882ee922cf62624638d129783 Mon Sep 17 00:00:00 2001
From: diubi
Date: Thu, 2 Apr 2026 14:17:39 +0200
Subject: [PATCH 05/20] refactor: move card.tsx into ui
---
src/components/ui/{cards => }/card.tsx | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename src/components/ui/{cards => }/card.tsx (100%)
diff --git a/src/components/ui/cards/card.tsx b/src/components/ui/card.tsx
similarity index 100%
rename from src/components/ui/cards/card.tsx
rename to src/components/ui/card.tsx
From f34b6305739b3a12c45b0ba7abc6a65d095d8d6c Mon Sep 17 00:00:00 2001
From: diubi
Date: Wed, 11 Mar 2026 22:41:52 +0100
Subject: [PATCH 06/20] Card initial commit
---
src/app/page.tsx | 44 +++++++++++++++++++++--
src/components/ui/card.tsx | 74 ++++++++++++++++++++++++++++++++++++++
2 files changed, 116 insertions(+), 2 deletions(-)
create mode 100644 src/components/ui/card.tsx
diff --git a/src/app/page.tsx b/src/app/page.tsx
index 7422510..365e080 100644
--- a/src/app/page.tsx
+++ b/src/app/page.tsx
@@ -1,5 +1,45 @@
-import { Hero } from "@/components/home/hero"
+import { CropIcon, Users } from "lucide-react"
+import { Button } from "@/components/ui/button"
+import { ButtonWithIcon } from "@/components/ui/buttonWithIcon"
+import {
+ Card,
+ CardAction,
+ CardBottomButton,
+ CardContent,
+ CardDescription,
+ CardHeader,
+ CardTitle,
+} from "@/components/ui/card"
export default function Home() {
- return
+ return (
+
+ Welcome to PoliNetwork
+
+ PoliNetwork is a student association dedicated to connecting and supporting students at Politecnico.
+
+
+
Test with figma variables
+
+
+
+
+
+
+
+
+
+ Card Title
+
+
+
+
+ description: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incidunt ut
+ labore et dolore magna aliqua.
+
+
+ Button
+
+
+ )
}
diff --git a/src/components/ui/card.tsx b/src/components/ui/card.tsx
new file mode 100644
index 0000000..630278a
--- /dev/null
+++ b/src/components/ui/card.tsx
@@ -0,0 +1,74 @@
+import type { LucideIcon } from "lucide-react"
+import type * as React from "react"
+import { cn } from "@/lib/utils"
+import { Glass } from "../glass"
+import { Button } from "./button"
+
+function Card({ className, size = "default", ...props }: React.ComponentProps<"div"> & { size?: "default" | "sm" }) {
+ return (
+ img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl group/card flex flex-col",
+ className
+ )}
+ {...props}
+ />
+ )
+}
+
+function CardHeader({ className, ...props }: React.ComponentProps<"div">) {
+ return (
+
+ )
+}
+
+function CardTitle({ className, ...props }: React.ComponentProps<"div">) {
+ return (
+
+ )
+}
+
+function CardDescription({ className, ...props }: React.ComponentProps<"div">) {
+ return
+}
+
+function CardAction({ className, icon: Icon, ...props }: React.ComponentProps<"div"> & { icon: LucideIcon }) {
+ return (
+
+
+
+ )
+}
+
+function CardContent({ className, ...props }: React.ComponentProps<"div">) {
+ return
+}
+
+function CardBottomButton({ className, ...props }: React.ComponentProps) {
+ return (
+
+ )
+}
+
+export { Card, CardHeader, CardBottomButton, CardTitle, CardAction, CardDescription, CardContent }
From 260de21ac5cca902725d17085811522385b42a31 Mon Sep 17 00:00:00 2001
From: diubi
Date: Wed, 11 Mar 2026 23:57:19 +0100
Subject: [PATCH 07/20] Text and icon gradients
---
src/app/page.tsx | 14 +++-----------
src/components/ui/card.tsx | 35 +++++++++++++++++++++++------------
2 files changed, 26 insertions(+), 23 deletions(-)
diff --git a/src/app/page.tsx b/src/app/page.tsx
index 365e080..f3feec5 100644
--- a/src/app/page.tsx
+++ b/src/app/page.tsx
@@ -1,15 +1,7 @@
import { CropIcon, Users } from "lucide-react"
import { Button } from "@/components/ui/button"
import { ButtonWithIcon } from "@/components/ui/buttonWithIcon"
-import {
- Card,
- CardAction,
- CardBottomButton,
- CardContent,
- CardDescription,
- CardHeader,
- CardTitle,
-} from "@/components/ui/card"
+import { Card, CardAction, CardBottomButton, CardContent, CardHeader, CardTitle } from "@/components/ui/card"
export default function Home() {
return (
@@ -29,7 +21,7 @@ export default function Home() {
- Card Title
+ Title
@@ -38,7 +30,7 @@ export default function Home() {
labore et dolore magna aliqua.
- Button
+ Label
)
diff --git a/src/components/ui/card.tsx b/src/components/ui/card.tsx
index 630278a..82cfe0e 100644
--- a/src/components/ui/card.tsx
+++ b/src/components/ui/card.tsx
@@ -1,10 +1,14 @@
import type { LucideIcon } from "lucide-react"
-import type * as React from "react"
+import * as React from "react"
import { cn } from "@/lib/utils"
import { Glass } from "../glass"
import { Button } from "./button"
-function Card({ className, size = "default", ...props }: React.ComponentProps<"div"> & { size?: "default" | "sm" }) {
+function Card({
+ className,
+ size = "default",
+ ...props
+}: React.ComponentProps & { size?: "default" | "sm" }) {
return (
) {
return (
)
@@ -46,13 +53,23 @@ function CardDescription({ className, ...props }: React.ComponentProps<"div">) {
}
function CardAction({ className, icon: Icon, ...props }: React.ComponentProps<"div"> & { icon: LucideIcon }) {
+ const gradientId = React.useId()
+
return (
-
+
+
+
)
}
@@ -62,13 +79,7 @@ function CardContent({ className, ...props }: React.ComponentProps<"div">) {
}
function CardBottomButton({ className, ...props }: React.ComponentProps) {
- return (
-
- )
+ return
}
export { Card, CardHeader, CardBottomButton, CardTitle, CardAction, CardDescription, CardContent }
From 714bf5a45afe33a8a8512b2172cd64b8e0dc379d Mon Sep 17 00:00:00 2001
From: diubi
Date: Thu, 12 Mar 2026 00:13:34 +0100
Subject: [PATCH 08/20] Used figma classes
---
src/components/ui/card.tsx | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/components/ui/card.tsx b/src/components/ui/card.tsx
index 82cfe0e..516f553 100644
--- a/src/components/ui/card.tsx
+++ b/src/components/ui/card.tsx
@@ -40,7 +40,7 @@ function CardTitle({ className, ...props }: React.ComponentProps<"div">) {
Icon gradient helper
-
-
+
+
From 9d80222ef9dbb9442d206e82c6da08ec47fcdd52 Mon Sep 17 00:00:00 2001
From: diubi
Date: Tue, 17 Mar 2026 23:01:11 +0100
Subject: [PATCH 09/20] Moved card.tsx to components/ui/cards
---
src/app/page.tsx | 17 +----------------
src/components/ui/{ => cards}/card.tsx | 4 ++--
2 files changed, 3 insertions(+), 18 deletions(-)
rename src/components/ui/{ => cards}/card.tsx (97%)
diff --git a/src/app/page.tsx b/src/app/page.tsx
index f3feec5..ecc1240 100644
--- a/src/app/page.tsx
+++ b/src/app/page.tsx
@@ -1,7 +1,6 @@
-import { CropIcon, Users } from "lucide-react"
+import { Users } from "lucide-react"
import { Button } from "@/components/ui/button"
import { ButtonWithIcon } from "@/components/ui/buttonWithIcon"
-import { Card, CardAction, CardBottomButton, CardContent, CardHeader, CardTitle } from "@/components/ui/card"
export default function Home() {
return (
@@ -18,20 +17,6 @@ export default function Home() {
-
-
-
- Title
-
-
-
-
- description: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incidunt ut
- labore et dolore magna aliqua.
-
-
- Label
-
)
}
diff --git a/src/components/ui/card.tsx b/src/components/ui/cards/card.tsx
similarity index 97%
rename from src/components/ui/card.tsx
rename to src/components/ui/cards/card.tsx
index 516f553..212585d 100644
--- a/src/components/ui/card.tsx
+++ b/src/components/ui/cards/card.tsx
@@ -1,8 +1,8 @@
import type { LucideIcon } from "lucide-react"
import * as React from "react"
import { cn } from "@/lib/utils"
-import { Glass } from "../glass"
-import { Button } from "./button"
+import { Glass } from "../../glass"
+import { Button } from "../button"
function Card({
className,
From 74b88855d8a58a58fc0bd31e437c4ab127b06a3f Mon Sep 17 00:00:00 2001
From: diubi
Date: Thu, 2 Apr 2026 14:17:39 +0200
Subject: [PATCH 10/20] refactor: move card.tsx into ui
---
src/components/ui/{cards => }/card.tsx | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename src/components/ui/{cards => }/card.tsx (100%)
diff --git a/src/components/ui/cards/card.tsx b/src/components/ui/card.tsx
similarity index 100%
rename from src/components/ui/cards/card.tsx
rename to src/components/ui/card.tsx
From 95497acd889a640e54979d789ae888c312b7e7e3 Mon Sep 17 00:00:00 2001
From: diubi
Date: Thu, 2 Apr 2026 16:14:49 +0200
Subject: [PATCH 11/20] chore: biome; fix: imports
---
src/app/page.tsx | 8 ++++----
src/components/ui/card.tsx | 12 ++++++------
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/src/app/page.tsx b/src/app/page.tsx
index ecc1240..9e2bb5a 100644
--- a/src/app/page.tsx
+++ b/src/app/page.tsx
@@ -5,13 +5,13 @@ import { ButtonWithIcon } from "@/components/ui/buttonWithIcon"
export default function Home() {
return (
- Welcome to PoliNetwork
+ Welcome to PoliNetwork
PoliNetwork is a student association dedicated to connecting and supporting students at Politecnico.
-
-
Test with figma variables
-
+
+
Test with figma variables
+
diff --git a/src/components/ui/card.tsx b/src/components/ui/card.tsx
index 212585d..dd0d35e 100644
--- a/src/components/ui/card.tsx
+++ b/src/components/ui/card.tsx
@@ -1,8 +1,8 @@
import type { LucideIcon } from "lucide-react"
import * as React from "react"
import { cn } from "@/lib/utils"
-import { Glass } from "../../glass"
-import { Button } from "../button"
+import { Glass } from "../glass"
+import { Button } from "./button"
function Card({
className,
@@ -14,7 +14,7 @@ function Card({
data-slot="card"
data-size={size}
className={cn(
- "ring-foreground/10 bg-card text-card-foreground gap-4 overflow-hidden rounded-xl text-sm has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl group/card flex flex-col",
+ "group/card flex flex-col gap-4 overflow-hidden rounded-xl bg-card text-card-foreground text-sm ring-foreground/10 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",
className
)}
{...props}
@@ -27,7 +27,7 @@ function CardHeader({ className, ...props }: React.ComponentProps<"div">) {
) {
-
+
+
+
+ {caption}
+
+
+ //TODO: add hover effect
+ )
+}
From 97a3005ebe12b90e06307e81c3953d4434470db0 Mon Sep 17 00:00:00 2001
From: Alessandro Giuseppe Gioia
Date: Thu, 9 Apr 2026 21:30:57 +0200
Subject: [PATCH 18/20] feat: add card-course (#63)
* feat: card-groups initial commit
* fix: spacing between elements
* chore: biome
* fix: homepage layout for cards
* remove: bg-background-blur
* chore: biome
---
src/app/page.tsx | 7 +++++++
src/components/card-course.tsx | 36 ++++++++++++++++++++++++++++++++++
2 files changed, 43 insertions(+)
create mode 100644 src/components/card-course.tsx
diff --git a/src/app/page.tsx b/src/app/page.tsx
index 3dde0ef..19367f1 100644
--- a/src/app/page.tsx
+++ b/src/app/page.tsx
@@ -1,6 +1,7 @@
import { FaBookBookmark } from "react-icons/fa6"
import { FiBook, FiBookOpen, FiClipboard, FiFileText, FiPenTool, FiTriangle, FiUploadCloud } from "react-icons/fi"
import { CardCaption } from "@/components/card-caption"
+import { CardCourse } from "@/components/card-course"
import { CardIcon } from "@/components/card-icon"
import { CardPathSelection } from "@/components/card-path-selection"
import { Hero } from "@/components/home/hero"
@@ -58,6 +59,12 @@ export default function Home() {
))}
+
diff --git a/src/components/card-course.tsx b/src/components/card-course.tsx
new file mode 100644
index 0000000..52c1fd8
--- /dev/null
+++ b/src/components/card-course.tsx
@@ -0,0 +1,36 @@
+import type { IconType } from "react-icons"
+import { CiGlobe } from "react-icons/ci"
+import { FaAngleRight } from "react-icons/fa6"
+import { IoLocationOutline } from "react-icons/io5"
+import { Card, CardAction, CardContent } from "./ui/card"
+
+export function CardCourse({
+ courseName,
+ iconLocation: IconLocation = IoLocationOutline,
+ location = "Milano Leonardo",
+ iconLanguage: IconLanguage = CiGlobe,
+ language = "ITA",
+ iconSelect: IconSelect = FaAngleRight,
+}: {
+ courseName: string
+ iconLocation?: IconType
+ location?: "Milano Leonardo" | "Milano Bovisa" | "Cremona" | "Lecco" | "Mantova" | "Piacenza" | "Xi'an" //Magari poi si mette solo string come tipo nel caso si pullino da un DB
+ iconLanguage?: IconType
+ language?: "ITA" | "ENG" //Idem
+ iconSelect?: IconType
+}) {
+ return (
+
+ {courseName}
+
+ {location}
+
+
+ {language}
+
+
+
+
+
+ )
+}
From c7bd2bda392cbc7312e6dd14b710f71d583423c4 Mon Sep 17 00:00:00 2001
From: Alessandro Giuseppe Gioia
Date: Thu, 9 Apr 2026 21:39:44 +0200
Subject: [PATCH 19/20] feat: add card-course-group (#67)
* feat: card-course-group initial commit
* chore: biome
* fix: make text and icons black
* feat: added cards to homepage; feat: added bg-background-blur to the card
* remove: bg-background-blur
* remove: truncate class
* feat: secondary variant
* chore: biome
* chore: biome
---
src/app/page.tsx | 7 ++++
src/components/card-course-group.tsx | 60 ++++++++++++++++++++++++++++
2 files changed, 67 insertions(+)
create mode 100644 src/components/card-course-group.tsx
diff --git a/src/app/page.tsx b/src/app/page.tsx
index 19367f1..e6ff587 100644
--- a/src/app/page.tsx
+++ b/src/app/page.tsx
@@ -2,6 +2,7 @@ import { FaBookBookmark } from "react-icons/fa6"
import { FiBook, FiBookOpen, FiClipboard, FiFileText, FiPenTool, FiTriangle, FiUploadCloud } from "react-icons/fi"
import { CardCaption } from "@/components/card-caption"
import { CardCourse } from "@/components/card-course"
+import { CardCourseGroup } from "@/components/card-course-group"
import { CardIcon } from "@/components/card-icon"
import { CardPathSelection } from "@/components/card-path-selection"
import { Hero } from "@/components/home/hero"
@@ -60,6 +61,12 @@ export default function Home() {
+
diff --git a/src/components/card-course-group.tsx b/src/components/card-course-group.tsx
new file mode 100644
index 0000000..17a4934
--- /dev/null
+++ b/src/components/card-course-group.tsx
@@ -0,0 +1,60 @@
+import { cva, type VariantProps } from "class-variance-authority"
+import type { IconType } from "react-icons"
+import { FaWhatsapp } from "react-icons/fa"
+import { LiaTelegramPlane } from "react-icons/lia"
+import { cn } from "@/lib/utils"
+import { Card, CardAction, CardTitle } from "./ui/card"
+
+export const cardCourseGroupVariants = cva(
+ "flex h-fit w-full flex-row items-center gap-5 px-7.5 py-6.25 font-normal leading-6 tracking-[0.03125rem]",
+ {
+ variants: {
+ secondary: {
+ true: "bg-[rgba(148,192,237,0.40)]",
+ false: "",
+ },
+ },
+ defaultVariants: {
+ secondary: false,
+ },
+ }
+)
+
+export function CardCourseGroup({
+ groupName,
+ hasWhatsapp = true,
+ iconWhatsApp: IconWhatsApp = FaWhatsapp,
+ hasTelegram = true,
+ iconTelegram: IconTelegram = LiaTelegramPlane,
+ secondary = false,
+}: {
+ groupName: string
+ hasWhatsapp?: boolean
+ iconWhatsApp?: IconType
+ hasTelegram?: boolean
+ iconTelegram?: IconType
+} & VariantProps) {
+ return (
+
+
+ {groupName}
+
+ {hasWhatsapp && (
+
+ )}
+ {hasTelegram && (
+
+ )}
+
+ )
+}
From 1fbb83668f7356582ce54d0a70dcf017b08574bd Mon Sep 17 00:00:00 2001
From: diubi
Date: Thu, 9 Apr 2026 21:56:18 +0200
Subject: [PATCH 20/20] fix: some of CodeRabbit's proposed fixes
---
src/components/card-course-group.tsx | 19 +++----------------
src/components/ui/card.tsx | 4 ++--
2 files changed, 5 insertions(+), 18 deletions(-)
diff --git a/src/components/card-course-group.tsx b/src/components/card-course-group.tsx
index 17a4934..2dba99a 100644
--- a/src/components/card-course-group.tsx
+++ b/src/components/card-course-group.tsx
@@ -34,27 +34,14 @@ export function CardCourseGroup({
hasTelegram?: boolean
iconTelegram?: IconType
} & VariantProps) {
+ const actionClassName = cn("rounded-full p-3.75", secondary ? "bg-[#51A2FF]" : "bg-[#74D4FF]")
return (
{groupName}
- {hasWhatsapp && (
-
- )}
- {hasTelegram && (
-
- )}
+ {hasWhatsapp && }
+ {hasTelegram && }
)
}
diff --git a/src/components/ui/card.tsx b/src/components/ui/card.tsx
index 9f9323b..33a30e8 100644
--- a/src/components/ui/card.tsx
+++ b/src/components/ui/card.tsx
@@ -58,7 +58,7 @@ function CardAction({
iconSize = "normal",
gradient = true,
...props
-}: React.ComponentProps<"div"> & { icon: IconType; iconSize: "small" | "normal" | "large"; gradient?: boolean }) {
+}: React.ComponentProps<"div"> & { icon: IconType; iconSize?: "small" | "normal" | "large"; gradient?: boolean }) {
const gradientId = React.useId()
return (
@@ -68,7 +68,7 @@ function CardAction({
{...props}
>
{gradient && (
-
+
Icon gradient helper