Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
a7f088f
Card initial commit
Diubii Mar 11, 2026
cb61f09
Text and icon gradients
Diubii Mar 11, 2026
2e3f23d
Used figma classes
Diubii Mar 11, 2026
d4975c0
Moved card.tsx to components/ui/cards
Diubii Mar 17, 2026
4b4056a
refactor: move card.tsx into ui
Diubii Apr 2, 2026
f34b630
Card initial commit
Diubii Mar 11, 2026
260de21
Text and icon gradients
Diubii Mar 11, 2026
714bf5a
Used figma classes
Diubii Mar 11, 2026
9d80222
Moved card.tsx to components/ui/cards
Diubii Mar 17, 2026
74b8885
refactor: move card.tsx into ui
Diubii Apr 2, 2026
fb70a85
Merge branch 'Diubii/card' of github.com:PoliNetworkOrg/web into Diub…
Diubii Apr 2, 2026
95497ac
chore: biome; fix: imports
Diubii Apr 2, 2026
8d16fc7
aligned card.tsx between all cards
Diubii Apr 9, 2026
e40ed5c
Merge branch 'main' into Diubii/card
Diubii Apr 9, 2026
6a72e27
feat: optional gradient
Diubii Apr 9, 2026
6c2c5cd
fix: text transparency to see gradient
Diubii Apr 9, 2026
cef8d1d
feat: added bg-background-blur to all cards
Diubii Apr 9, 2026
f4d4bcf
feat: add card-caption (#48)
Diubii Apr 9, 2026
7124c21
feat: add card-path-selection (#56)
Diubii Apr 9, 2026
97a3005
feat: add card-course (#63)
Diubii Apr 9, 2026
c7bd2bd
feat: add card-course-group (#67)
Diubii Apr 9, 2026
cd4e805
Merge branch 'main' into Diubii/card
Diubii Apr 9, 2026
1fbb836
fix: some of CodeRabbit's proposed fixes
Diubii Apr 9, 2026
155b62d
Merge branch 'main' into Diubii/card
toto04 Apr 9, 2026
75a1458
Merge branch 'main' into Diubii/card
lorenzocorallo Apr 9, 2026
3b6aa56
required changes by @toto04 and CodeRabbit
Diubii Apr 14, 2026
0661f54
feat: implemented @BIA3IA's card hover background
Diubii Apr 16, 2026
86ba6ee
feat: added class to Card
Diubii Apr 16, 2026
8c03a32
feat: CardTitle is now
Diubii Apr 16, 2026
ec0c1a9
feat: CTA first commit
Diubii Apr 22, 2026
eff6814
fix: removed text sizes from the base card components
Diubii Apr 22, 2026
2911444
feat: CTA first commit
Diubii Apr 22, 2026
19bc90d
Merge branch 'Diubii/cta-opt-description' of github.com:PoliNetworkOr…
Diubii Apr 22, 2026
e1ed119
fix: CardTitle props type
Diubii Apr 22, 2026
30899fc
feat: CTA first commit
Diubii Apr 22, 2026
5e74316
Merge branch 'Diubii/cta-opt-description' of github.com:PoliNetworkOr…
Diubii Apr 22, 2026
7f27177
feat: add new size to CardAction icon to accomodate the CTA icon size…
Diubii Apr 22, 2026
0f738a2
Merge branch 'main' into Diubii/cta-opt-description
Diubii Apr 22, 2026
5b90c64
remove: test CTAs in homepage
Diubii Apr 22, 2026
7fe0e20
Merge branch 'Diubii/cta-opt-description' of github.com:PoliNetworkOr…
Diubii Apr 22, 2026
5018195
fix: wrap CTA in a Link tag; fix: mandatory icon
Diubii Apr 22, 2026
d8a963a
feat: hover effect
Diubii Apr 22, 2026
929b777
Merge branch 'main' into Diubii/cta-opt-description
Diubii Apr 22, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/card-caption.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export function CardCaption({
className={`typo-headline-medium flex ${iconPosition === "right" ? "justify-between" : "flex-col-reverse"}`}
>
<CardTitle className="typo-headline-medium">{title}</CardTitle>
{icon && <CardAction icon={icon} iconSize={iconPosition === "right" ? "normal" : "large"}></CardAction>}
{icon && <CardAction icon={icon} iconSize={iconPosition === "right" ? "md" : "lg"}></CardAction>}
</CardHeader>
<CardContent className="typo-body-medium">
<p>{caption}</p>
Expand Down
4 changes: 2 additions & 2 deletions src/components/card-course-group.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ export function CardCourseGroup({
<CardTitle gradient={false} className="typo-headline-small grow">
{groupName}
</CardTitle>
{hasWhatsapp && <CardAction gradient={false} className={actionClassName} icon={IconWhatsApp} iconSize="normal" />}
{hasTelegram && <CardAction gradient={false} className={actionClassName} icon={IconTelegram} iconSize="normal" />}
{hasWhatsapp && <CardAction gradient={false} className={actionClassName} icon={IconWhatsApp} iconSize="md" />}
{hasTelegram && <CardAction gradient={false} className={actionClassName} icon={IconTelegram} iconSize="md" />}
</Card>
)
}
6 changes: 3 additions & 3 deletions src/components/card-course.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ export function CardCourse({
<Card className="typo-body-large flex h-fit w-full flex-row px-5 py-3.75 font-normal leading-6 tracking-[0.03125rem]">
<CardContent className="basis-1/3 truncate">{courseName}</CardContent>
<CardContent className="flex basis-1/3 items-center gap-1.25">
<CardAction icon={IconLocation} iconSize="small" /> {location}
<CardAction icon={IconLocation} iconSize="xs" /> {location}
</CardContent>
<CardContent className="flex basis-1/3 items-center gap-1.25">
<CardAction icon={IconLanguage} iconSize="small" /> {language}
<CardAction icon={IconLanguage} iconSize="xs" /> {language}
</CardContent>
<CardContent className="flex items-center">
<CardAction icon={IconSelect} iconSize="small" />
<CardAction icon={IconSelect} iconSize="xs" />
</CardContent>
</Card>
)
Expand Down
2 changes: 1 addition & 1 deletion src/components/card-path-selection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export function CardPathSelection({ caption, icon: Icon = BsBook }: { caption: s
return (
<Card className="h-fit w-136 px-10 py-7.5" hoverBackground>
<CardContent className="typo-body-large flex flex-row items-center justify-center gap-1.25 whitespace-nowrap font-normal leading-6 tracking-[0.03125rem]">
<CardAction icon={Icon} iconSize="small" /> {caption}
<CardAction icon={Icon} iconSize="xs" /> {caption}
</CardContent>
</Card>
)
Expand Down
33 changes: 33 additions & 0 deletions src/components/ui/call-to-action.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import Link from "next/link"
import type { IconType } from "react-icons"
import { Card, CardAction, CardContent, CardHeader, CardTitle } from "./card"

export function CallToAction({
title,
caption,
icon,
href,
}: {
title: string
caption?: string
icon: IconType
href: string
}) {
return (
<Link href={href}>
<Card className="h-fit w-80.75 px-8 py-5.25">
<CardHeader className={`flex items-center ${caption ? "gap-2" : "gap-10"}`}>
<div className="rounded-[0.625rem] bg-blue-tertiary p-2.5 transition-all duration-500 group-hover/card:p-3">
<CardAction icon={icon} gradient={false} iconSize="sm" />
</div>
<CardTitle className="typo-title-large">{title}</CardTitle>
</CardHeader>
{caption && (
<CardContent className="typo-body-large">
<p>{caption}</p>
</CardContent>
)}
</Card>
</Link>
)
}
23 changes: 18 additions & 5 deletions src/components/ui/card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,14 @@ function CardDescription({ className, ...props }: React.ComponentProps<"div">) {
function CardAction({
className,
icon: Icon,
iconSize = "normal",
iconSize = "md",
gradient = true,
...props
}: React.ComponentProps<"div"> & { icon: IconType; iconSize?: "small" | "normal" | "large"; gradient?: boolean }) {
}: React.ComponentProps<"div"> & {
icon: IconType
iconSize?: "xs" | "sm" | "md" | "lg"
gradient?: boolean
}) {
const gradientId = React.useId()

return (
Expand All @@ -83,9 +87,18 @@ function CardAction({
)}

<Icon
size={iconSize === "small" ? "1.125rem" : iconSize === "normal" ? "2rem" : "3.5rem"}
fill={gradient ? `url(#${gradientId})` : "currentColor"}
stroke={gradient ? `url(#${gradientId})` : "currentColor"}
size={
iconSize === "xs"
? "1.125rem"
: iconSize === "sm"
? "1.5rem"
: iconSize === "md"
? "2rem"
: iconSize === "lg"
? "3.5rem"
: iconSize
}
{...(gradient ? { fill: `url(#${gradientId})`, stroke: `url(#${gradientId})` } : { stroke: "currentColor" })}
/>
</div>
)
Expand Down
Loading