diff --git a/src/app/layout.tsx b/src/app/layout.tsx index f54fb2d..807d4aa 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -1,3 +1,4 @@ +import { Footer } from "@/components/footer" import { Header } from "@/components/header/header" import { Shape } from "@/components/shapes" import { ThemeProvider } from "@/components/theme-provider" @@ -83,6 +84,7 @@ export default function RootLayout({ children }: Readonly<{ children: React.Reac
{children} +
diff --git a/src/app/page.tsx b/src/app/page.tsx index 861fa4b..0296908 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -1,15 +1,7 @@ -import Image from "next/image" -import { FiFacebook, FiGithub, FiInstagram, FiLinkedin } from "react-icons/fi" -import discord from "@/assets/icons/discord.svg" -import telegram from "@/assets/icons/telegram.svg" -import { DropdownButton } from "@/components/button-dropdown" -import { CardMultipleIcons } from "@/components/card-multiple-icons" -import { CardSplit } from "@/components/card-split" import { AboutUs } from "@/components/home/about-us" import { Hero } from "@/components/home/hero" import { Materials } from "@/components/home/materials" import { Projects } from "@/components/home/projects" -import { CallToAction } from "@/components/ui/call-to-action" export default function Home() { return ( @@ -18,27 +10,6 @@ export default function Home() { - -
- - , - , - , - , - Discord, - , - ]} - /> - -
) } diff --git a/src/components/button-icon.tsx b/src/components/button-icon.tsx index f2d3325..2cf0939 100644 --- a/src/components/button-icon.tsx +++ b/src/components/button-icon.tsx @@ -1,21 +1,25 @@ +import type { ReactNode } from "react" import type { IconType } from "react-icons" -import { Button } from "./ui/button" +import { Button, type ButtonSizes } from "./ui/button" export function ButtonIcon({ variant = "primary", icon: Icon, - text, + children, iconPosition = "left", + size, }: { variant?: "primary" | "tertiary" | "tertiaryBlur" icon: IconType - text: string + children: ReactNode iconPosition?: "left" | "right" + size: ButtonSizes + className?: string }) { return ( - ) diff --git a/src/components/card-split/index.tsx b/src/components/card-split/index.tsx index a5c3831..5fa411d 100644 --- a/src/components/card-split/index.tsx +++ b/src/components/card-split/index.tsx @@ -11,11 +11,11 @@ export function CardSplit({ textPrimary, textSecondary, textSecondarySmall, clas return ( -
+
{textPrimary ? : null} {hasSecondaryContent && ( diff --git a/src/components/card-split/primary-content.tsx b/src/components/card-split/primary-content.tsx index 22079f6..e2c7383 100644 --- a/src/components/card-split/primary-content.tsx +++ b/src/components/card-split/primary-content.tsx @@ -1,6 +1,6 @@ export function CardSplitPrimaryContent({ text }: { text: string }) { return ( -

+

{text}

) diff --git a/src/components/card-split/secondary-content.tsx b/src/components/card-split/secondary-content.tsx index f1b44a4..785deaf 100644 --- a/src/components/card-split/secondary-content.tsx +++ b/src/components/card-split/secondary-content.tsx @@ -13,8 +13,10 @@ export function CardSplitSecondaryContent({ }: CardSplitSecondaryContentProps) { return (
- {textSecondary &&

{textSecondary}

} - {textSecondarySmall &&

{textSecondarySmall}

} + {textSecondary &&

{textSecondary}

} + {textSecondarySmall && ( +

{textSecondarySmall}

+ )}
) } diff --git a/src/components/footer.tsx b/src/components/footer.tsx new file mode 100644 index 0000000..ddfea9d --- /dev/null +++ b/src/components/footer.tsx @@ -0,0 +1,171 @@ +import Image from "next/image" +import { FaGithub } from "react-icons/fa" +import { FiChevronDown, FiFacebook, FiGithub, FiInstagram, FiLinkedin } from "react-icons/fi" +import discord from "@/assets/icons/discord.svg" +import telegram from "@/assets/icons/telegram.svg" +import { ButtonIcon } from "./button-icon" +import { CardMultipleIcons } from "./card-multiple-icons" +import { CardSplit } from "./card-split" +import { Button } from "./ui/button" + +interface FooterLinkProps { + href: string + children: React.ReactNode +} + +function FooterLink({ href, children }: FooterLinkProps) { + return ( + + {children} + + ) +} + +interface FooterAccordionProps { + title: string + links: { label: string; href: string }[] +} + +function FooterAccordion({ title, links }: FooterAccordionProps) { + return ( +
+ + {title} + + +
+ {links.map((link) => ( + + {link.label} + + ))} +
+
+ ) +} + +const sitemapSections = [ + { + type: "accordion" as const, + title: "Resources", + links: [ + { label: "Materials", href: "/" }, + { label: "Guides", href: "/" }, + { label: "Computer recs", href: "/" }, + { label: "FAQs", href: "/" }, + ], + }, + { type: "text" as const, label: "Privacy Policy", href: "/" }, + { + type: "accordion" as const, + title: "Community", + links: [ + { label: "Groups", href: "/" }, + { label: "Projects", href: "/" }, + { label: "Freshmen", href: "/" }, + { label: "Associations", href: "/" }, + ], + }, + { type: "text" as const, label: "Terms & Conditions", href: "/" }, + { + type: "accordion" as const, + title: "About", + links: [ + { label: "About us", href: "/" }, + { label: "Join us", href: "/" }, + { label: "Contact us", href: "/" }, + ], + }, + { type: "text" as const, label: "Cookie policy", href: "/" }, +] + +export function Footer() { + return ( + + ) +} diff --git a/src/components/ui/button.tsx b/src/components/ui/button.tsx index 644312d..eebe973 100644 --- a/src/components/ui/button.tsx +++ b/src/components/ui/button.tsx @@ -4,6 +4,18 @@ import type * as React from "react" import { cn } from "@/lib/utils" +const buttonSizes = { + default: "h-9 px-4 py-2 has-[>svg]:px-3", + sm: "h-8 gap-1.5 px-3 has-[>svg]:px-2.5 text-xs", + lg: "h-10 px-6 has-[>svg]:px-4", + "lg-wide": "h-10 px-10 has-[>svg]:px-7.5", + // icon: "size-9", + //"icon-sm": "size-8", + //"icon-lg": "size-10", +} + +export type ButtonSizes = keyof typeof buttonSizes + //TODO: Varianti const buttonVariants = cva( "inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-slate-950 focus-visible:ring-slate-950/50 focus-visible:ring-[3px] aria-invalid:ring-red-500/20 dark:aria-invalid:ring-red-500/40 aria-invalid:border-red-500 dark:focus-visible:border-slate-300 dark:focus-visible:ring-slate-300/50 dark:aria-invalid:ring-red-900/20 dark:dark:aria-invalid:ring-red-900/40 dark:aria-invalid:border-red-900", @@ -20,14 +32,7 @@ const buttonVariants = cva( "border bg-white shadow-xs hover:bg-slate-100 hover:text-slate-900 dark:bg-slate-200/30 dark:border-slate-200 dark:hover:bg-slate-200/50 dark:bg-slate-950 dark:hover:bg-slate-800 dark:hover:text-slate-50 dark:dark:bg-slate-800/30 dark:dark:border-slate-800 dark:dark:hover:bg-slate-800/50", link: "text-slate-900 underline-offset-4 underline dark:text-slate-50", }, - size: { - default: "h-9 px-4 py-2 has-[>svg]:px-3", - sm: "h-8 gap-1.5 px-3 has-[>svg]:px-2.5 text-xs", - lg: "h-10 px-6 has-[>svg]:px-4", - icon: "size-9", - "icon-sm": "size-8", - "icon-lg": "size-10", - }, + size: buttonSizes, }, defaultVariants: { variant: "primary",