Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
cb465dc
feat: add GuidePage and CardText component for guide display
BIA3IA May 20, 2026
197ee15
feat: implement GuideContent and GuideHero components for guide display
BIA3IA May 20, 2026
af078c6
refactor: biome check
BIA3IA May 20, 2026
9842073
feat: add Hero component and integrate it into Associations, Communit…
BIA3IA May 22, 2026
f2f6ea3
feat: remove unused CarouselMock component from Home page
BIA3IA May 22, 2026
c77ef1d
style: format Hero component for improved readability
BIA3IA May 22, 2026
184b538
Merge commit '68e769ee4f948e11bfc8ab150bbe06f693bf8490' into bianca/g…
BIA3IA May 22, 2026
78c28e0
Merge commit 'c77ef1d8fdf746a62799180d09261fac9b3af2ad' into bianca/g…
BIA3IA May 22, 2026
609632f
feat: replace GuideHero component with Hero component in GuidePage
BIA3IA May 22, 2026
f260477
feat: add CardResource component and enhance GuideContent with classN…
BIA3IA May 22, 2026
4a6c438
feat: add GuideContentMobile component and update GuidePage to use it
BIA3IA May 22, 2026
a6cc210
feat: enhance CardResource component to support Pill tags and add Pil…
BIA3IA May 22, 2026
069cacf
fix: correct formatting in guidesInfoMobile and add className prop to…
BIA3IA May 22, 2026
c1e619e
chore: biome
BIA3IA May 22, 2026
6ffa8e2
chore: rabbit
BIA3IA May 22, 2026
04d20f6
Merge commit '10801992368bbac02215d04851374c48e6dd5241' into bianca/g…
BIA3IA May 28, 2026
9375b18
fix: update Guides link to point to the correct path
BIA3IA May 28, 2026
e72ef2f
Merge remote-tracking branch 'origin/HEAD' into bianca/guides
BIA3IA Jun 18, 2026
57fe70a
feat: refactor guides structure and layout
itasimo Jun 18, 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
65 changes: 65 additions & 0 deletions src/app/guides/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
import type { Metadata } from "next"
import type { CardResourceProps } from "@/components/card-resource/types"
import GuideFind from "@/components/guides/guide-find"
import GuideContent from "@/components/guides/guide-general"
import { Hero } from "@/components/ui/hero"

export const metadata: Metadata = {
title: "Guide",
description: "Una raccolta di guide realizzate dai membri del Network",
}


const guidesInfo: CardResourceProps[] = [
{
title: "Chimica Generale",
description: "È un esame che tratta tutti argomenti già visti in qualsiasi liceo scientifico...",
tag: {
text: "Teorico",
variant: "primary",
},
author: "Giulia M.",
date: "Ott 24",
href: "/guides",
},
{
title: "Chimica",
description: "È un esame che tratta tutti argomenti già visti in qualsiasi liceo scientifico...",
tag: [
{
text: "Teorico",
variant: "primary",
},
{
text: "2 Anno",
variant: "secondary",
},
],
author: "Giulia M.",
date: "Ott 24",
href: "/guides",
},
{
title: "Generale",
description: "È un esame che tratta tutti argomenti già visti in qualsiasi liceo scientifico...",
tag: {
text: "Teorico",
variant: "primary",
},
author: "Giulia M.",
date: "Ott 24",
href: "/guides",
},
]

export default function GuidePage() {
return (
<section className="flex min-h-screen w-full max-w-350 flex-col gap-32 px-12 pt-58 pb-18 sm:gap-48">
<Hero title="Guide" description="Una raccolta di guide realizzate dai membri del Network" />

<GuideFind />
<GuideContent title="Guide Generali" guides={guidesInfo} />

</section>
)
}
44 changes: 44 additions & 0 deletions src/components/card-resource/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
"use client"

import Link from "next/link"
import { Card, CardContent, CardTitle } from "@/components/ui/card"
import { Pill } from "@/components/ui/pill"
import { cn } from "@/lib/utils"
import type { CardResourceProps } from "./types"

export function CardResource({
tag,
title,
description,
author,
date,
href,
className,
}: CardResourceProps) {

return (
<Card className={cn("h-fit w-full p-6", className)}>
<Link href={href} className="flex h-full flex-col">
<div className="flex items-center justify-between">
<div className="flex gap-2">
{(Array.isArray(tag) ? tag : [tag]).map((t) => (
<Pill key={t.text} variant={t.variant}>
{t.text}
</Pill>
))}
Comment thread
BIA3IA marked this conversation as resolved.
</div>
</div>

<div className="mt-5 flex flex-1 flex-col gap-2">
<CardTitle className="typo-title-large">{title}</CardTitle>
<CardContent className="typo-body-large line-clamp-3 px-0 text-text-primary">{description}</CardContent>
</div>

<div className="typo-body-large mt-12 flex items-center justify-between text-text-secondary">
<span>{author}</span>
<span>{date}</span>
</div>
</Link>
</Card>
)
}
17 changes: 17 additions & 0 deletions src/components/card-resource/types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import type { PillVariant } from "@/components/ui/pill"

export type PillTag = {
text: string
variant: PillVariant
}

export type CardResourceProps = {
tag: PillTag | PillTag[]
title: string
description: string
author: string
date: string
bookmarked?: boolean
href: string
className?: string
}
11 changes: 11 additions & 0 deletions src/components/card-text.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { Card, CardContent } from "./ui/card"

export default function CardText({ text, className }: { text: string; className?: string }) {
return (
<Card className={`h-fit w-full rounded-3xl border-white/50 p-4 ${className || ""}`}>
<CardContent className="typo-headline-small bg-linear-to-b from-blue-secondary to-blue-primary bg-clip-text px-0 text-center font-normal text-transparent">
{text}
</CardContent>
</Card>
)
}
26 changes: 26 additions & 0 deletions src/components/guides/guide-find.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { FiLogIn } from "react-icons/fi"
import { CardCaption } from "@/components/card-caption"


const guidesMobile = {
title: "Trova le guide del tuo corso",
caption: "Una raccolta di guide scritte dagli studenti del tuo corso",
icon: FiLogIn,
}

export default function GuideFind() {
return (
<>

{/* Mobile */}
<div className="flex w-full flex-col items-center gap-32 sm:hidden">
<CardCaption {...guidesMobile} className="p-6" />
</div>

{/* Desktop */}
<div className="hidden w-full flex-col gap-2 sm:flex">
<CardCaption {...guidesMobile} className="w-full max-w-4xl self-center p-6" />
</div>
</>
);
}
33 changes: 33 additions & 0 deletions src/components/guides/guide-general.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import { CardResource } from "../card-resource"
import type { GuideContentMobileProps } from "./types"

export default function GuideContent({ title, guides }: GuideContentMobileProps) {
return (
<section className="mx-auto flex min-h-screen max-w-400 flex-col items-center justify-center gap-48 px-4 py-49">
<div className="mx-auto flex w-full flex-col gap-14 sm:w-fit">

{/* Desktop Grid */}
<div className="hidden sm:flex w-full flex-col gap-5">
<div className="flex flex-col items-center gap-2 ">
<h3 className="text-start sm:typo-display-medium typo-headline-medium w-full">{title}</h3>
</div>
<div className="lg:grid-cols-3 justify-items-center gap-5 grid grid-cols-2">
{guides.map((guide) => (
<CardResource key={guide.title} {...guide} />
))}
</div>
</div>

{/* Mobile Carousel */}
<div className="sm:hidden">
<div className="flex w-full flex-col gap-5 text-start">
<p className="typo-title-large">{title}</p>
{guides.map((guide) => (
<CardResource key={guide.title} {...guide} />
))}
</div>
</div>
</div>
</section>
)
}
14 changes: 14 additions & 0 deletions src/components/guides/types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import type { CardResourceProps } from "../card-resource/types"

export type GuideContentProps = {
title: string
description: string
guides: { text: string }[]
className?: string
}

export type GuideContentMobileProps = {
title: string
guides: CardResourceProps[]
className?: string
}
31 changes: 31 additions & 0 deletions src/components/ui/pill.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import { cn } from "@/lib/utils"

export type PillVariant = "primary" | "secondary" | "tertiary"

const variantClasses: Record<PillVariant, string> = {
primary: "bg-blue-tertiary text-text-accent-lightbg",
secondary: "bg-blue-secondary text-text-accent-darkbg",
tertiary: "bg-blue-primary text-primary",
}

export function Pill({
children,
variant = "tertiary",
className,
}: {
children: React.ReactNode
variant?: PillVariant
className?: string
}) {
return (
<span
className={cn(
"typo-body-small inline-flex items-center rounded-buttonsM px-3 py-1",
variantClasses[variant],
className
)}
>
{children}
</span>
)
}
Loading