From fd04dc3227b8ed79bf2daed766cb119de0b588ae Mon Sep 17 00:00:00 2001 From: Iacopo Ciao Date: Wed, 12 Jun 2024 00:08:02 +0200 Subject: [PATCH] feat: homepage --- web/src/components/class-card.tsx | 15 ++++- .../home-page-components/home-page-about.tsx | 3 +- .../home-page-homebrew.tsx | 55 +++++++++++++++++++ .../home-page-section.tsx | 2 +- .../components/home-page-components/index.ts | 3 +- web/src/components/home-page.tsx | 7 ++- 6 files changed, 77 insertions(+), 8 deletions(-) create mode 100644 web/src/components/home-page-components/home-page-homebrew.tsx diff --git a/web/src/components/class-card.tsx b/web/src/components/class-card.tsx index a9ebd66..3d0b28b 100644 --- a/web/src/components/class-card.tsx +++ b/web/src/components/class-card.tsx @@ -1,22 +1,31 @@ import { FC } from "react"; import Image from "next/image"; +import Link from "next/link"; export interface ClassCardProps { name: string; collection: string; image: string; + link: string; } -export const ClassCard: FC = ({ image }) => { +export const ClassCard: FC = ({ image, collection, name, link }) => { return ( +
Immagine di sfondo +
+
{name}
+

{collection}

+
+ ); }; diff --git a/web/src/components/home-page-components/home-page-about.tsx b/web/src/components/home-page-components/home-page-about.tsx index 90a2014..fbae205 100644 --- a/web/src/components/home-page-components/home-page-about.tsx +++ b/web/src/components/home-page-components/home-page-about.tsx @@ -3,7 +3,6 @@ import { HomePageSection } from "./home-page-section"; import { faDragon, faToolbox, - faShield, faComments, faRotate, faTrophy, @@ -25,7 +24,7 @@ export const HomePageAboutItem: FC = ({ }) => { return (
- +

{title}

{description}

diff --git a/web/src/components/home-page-components/home-page-homebrew.tsx b/web/src/components/home-page-components/home-page-homebrew.tsx new file mode 100644 index 0000000..682f0dc --- /dev/null +++ b/web/src/components/home-page-components/home-page-homebrew.tsx @@ -0,0 +1,55 @@ +import { dungeonWorldData } from "@/data/dungeon-world"; +import { HomePageSection } from "./home-page-section"; +import { ClassCard } from "../class-card"; +import Link from "next/link"; +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; +import { faArrowRight } from "@fortawesome/free-solid-svg-icons"; + +export const HomePageHomebrew = () => { + const firstClasses = dungeonWorldData.homebrew.classes.slice(7, 16); + + return ( + +

+ Homebrew +

+

+ Dungeon World Italia è arricchita con materiale homebrew della + community. Accedi a traduzioni italiane di libretti famosi di Dungeon + World, espandendo le tue opzioni di gioco con nuove classi e abilità. + Visita le nostre sezioni dedicate per scoprire tutto il materiale + disponibile e inizia la tua avventura con Dungeon World! +

+ +

Ecco alcune delle classi che potrai trovare:

+
+
+ {firstClasses.map((clazz) => ( +
+ +
+ ))} +
+ +
+ +

Lista completa

+
+ +
+
+
+ + + +
+ ); +}; diff --git a/web/src/components/home-page-components/home-page-section.tsx b/web/src/components/home-page-components/home-page-section.tsx index cbe0b60..ee2f09a 100644 --- a/web/src/components/home-page-components/home-page-section.tsx +++ b/web/src/components/home-page-components/home-page-section.tsx @@ -7,7 +7,7 @@ export const HomePageSection: FC< return (
diff --git a/web/src/components/home-page-components/index.ts b/web/src/components/home-page-components/index.ts index b3661ff..cf95597 100644 --- a/web/src/components/home-page-components/index.ts +++ b/web/src/components/home-page-components/index.ts @@ -1,4 +1,5 @@ export * from './home-page-cover'; export * from './home-page-section'; export * from './home-page-about'; -export * from './home-page-traduction'; \ No newline at end of file +export * from './home-page-traduction'; +export * from './home-page-homebrew'; diff --git a/web/src/components/home-page.tsx b/web/src/components/home-page.tsx index c8b6448..6196d06 100644 --- a/web/src/components/home-page.tsx +++ b/web/src/components/home-page.tsx @@ -1,5 +1,9 @@ import { FC } from "react"; -import { Cover, HomePageTraduction } from "./home-page-components"; +import { + Cover, + HomePageHomebrew, + HomePageTraduction, +} from "./home-page-components"; import { HomePageAbout } from "./home-page-components/home-page-about"; export const HomePage: FC = () => { @@ -7,6 +11,7 @@ export const HomePage: FC = () => {
+
);