-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5c4f627
commit fd04dc3
Showing
6 changed files
with
77 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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<ClassCardProps> = ({ image }) => { | ||
export const ClassCard: FC<ClassCardProps> = ({ image, collection, name, link }) => { | ||
return ( | ||
<Link href={link}> | ||
<div className="w-44 h-64 relative overflow-hidden inline-block"> | ||
<Image | ||
priority | ||
src={image} | ||
className="object-center object-cover" | ||
alt="Immagine di sfondo" | ||
alt={`${name} ${collection}`} | ||
quality={50} | ||
loading="lazy" | ||
fill | ||
></Image> | ||
<div className="absolute flex flex-col justify-end items-start inset-0 bg-gradient-to-t from-[#000000] from-5% to-60% px-1 py-4 gap-y-1"> | ||
<h5 className="font-bold text-sm">{name}</h5> | ||
<p className="text-xs">{collection}</p> | ||
</div> | ||
</div> | ||
</Link> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
web/src/components/home-page-components/home-page-homebrew.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 ( | ||
<HomePageSection> | ||
<h3 className="text-xl sm:2xl md:text-3xl font-bold text-dw uppercase"> | ||
Homebrew | ||
</h3> | ||
<p> | ||
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! | ||
</p> | ||
|
||
<p className="font-bold">Ecco alcune delle classi che potrai trovare:</p> | ||
<div className="flex overflow-x-scroll pt-2 hide-scroll-bar w-full"> | ||
<div className="flex flex-nowrap"> | ||
{firstClasses.map((clazz) => ( | ||
<div className="inline-block px-3"> | ||
<ClassCard | ||
collection={clazz.collection} | ||
image={clazz.showcase.imageUrl} | ||
key={clazz.name + clazz.collection} | ||
name={clazz.name} | ||
link={`/homebrew/classi/${clazz.slug}`} | ||
/> | ||
</div> | ||
))} | ||
<div className="inline-block px-3"> | ||
<Link href="/homebrew/classi"> | ||
<div className="w-44 h-64 flex flex-col items-center justify-center gap-y-1"> | ||
<FontAwesomeIcon icon={faArrowRight} className="w-12 h-12" /> | ||
<p>Lista completa</p> | ||
</div> | ||
</Link> | ||
</div> | ||
</div> | ||
</div> | ||
<Link href={"/homebrew"}> | ||
<button className="bg-dw drop-shadow-[0_1px_1px_rgba(0,0,0,0.8)] hover:bg-dw-700 text-white font-bold py-2 px-4 mt-5 rounded-full text-sm uppercase"> | ||
Scopri la sezione homebrew | ||
</button> | ||
</Link> | ||
</HomePageSection> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
export * from './home-page-cover'; | ||
export * from './home-page-section'; | ||
export * from './home-page-about'; | ||
export * from './home-page-traduction'; | ||
export * from './home-page-traduction'; | ||
export * from './home-page-homebrew'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters