-
-
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
319f867
commit 3f0e4f0
Showing
19 changed files
with
71 additions
and
55 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
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
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
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
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
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
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
Binary file not shown.
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,11 +1,33 @@ | ||
import Link, { LinkProps } from "next/link"; | ||
import { FC, HTMLAttributeAnchorTarget, PropsWithChildren, RefAttributes } from "react"; | ||
import Link from "next/link"; | ||
import { | ||
FC, | ||
HTMLAttributeAnchorTarget, | ||
PropsWithChildren, | ||
RefAttributes, | ||
} from "react"; | ||
import { UrlObject } from "url"; | ||
|
||
export type ButtonLinkProps = PropsWithChildren<{ | ||
target?: HTMLAttributeAnchorTarget | undefined; | ||
rel?: string | undefined; | ||
href: string | UrlObject | ||
target?: HTMLAttributeAnchorTarget | undefined; | ||
rel?: string | undefined; | ||
href: string | UrlObject; | ||
}>; | ||
|
||
export const ButtonLink: FC<ButtonLinkProps> = ({children, href, target, rel}) => <Link href={href} target={target} rel={rel} className="px-6 py-2 bg-dw rounded-full w-fit h-fit text-center flex items-center justify-center font-semibold text-base gap-x-2">{children}</Link>; | ||
export const ButtonLink: FC<ButtonLinkProps> = ({ | ||
children, | ||
href, | ||
target, | ||
rel, | ||
}) => ( | ||
<Link | ||
href={href} | ||
target={target} | ||
rel={rel} | ||
className="px-6 py-2 border-white text-white border-[1px] | ||
rounded-lg w-fit h-fit text-center flex items-center | ||
justify-center font-semibold text-base gap-x-2 | ||
hover:bg-dw hover:border-dw transition-colors duration-300" | ||
> | ||
{children} | ||
</Link> | ||
); |
54 changes: 27 additions & 27 deletions
54
web/src/components/home-page-components/home-page-downloads.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 |
---|---|---|
@@ -1,42 +1,42 @@ | ||
import { dungeonWorldData } from "@/data/dungeon-world"; | ||
import { HomePageSection } from "./home-page-section"; | ||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; | ||
import { faArrowRight } from "@fortawesome/free-solid-svg-icons"; | ||
import { Asset } from "../asset"; | ||
import { FC } from "react"; | ||
import Image from "next/image"; | ||
import materiali from "../../../public/images/pages/homepage/materiali.webp"; | ||
import { ButtonLink } from "../button-link"; | ||
|
||
export const HomePageDownloads = () => { | ||
const assets = [ | ||
dungeonWorldData.standard.frontsSummary, | ||
dungeonWorldData.standard.gameMasterSummary, | ||
dungeonWorldData.standard.movesSummary, | ||
...dungeonWorldData.standard.classes.flatMap((c) => c.assets), | ||
]; | ||
|
||
export const HomePageDownloads: FC = () => { | ||
return ( | ||
<HomePageSection> | ||
<div className="flex flex-col"> | ||
<h3 className="text-2xl font-bold text-dw uppercase mb-5"> | ||
Materiali Scaricabili | ||
</h3> | ||
<p> | ||
<div className="flex flex-col-reverse xl:flex-row gap-24 items-center"> | ||
<div className="flex flex-col flex-2"> | ||
<h3 className="text-2xl font-bold text-dw uppercase mb-5"> | ||
Materiali Scaricabili | ||
</h3> | ||
<p> | ||
Sfrutta la sezione <strong>Materiali Scaricabili</strong>, il luogo | ||
dove puoi recuperare tutte le risorse disponibili per Dungeon World, | ||
sia standard che homebrew. Questa sezione è stata creata per offrire | ||
ai giocatori un accesso facile e immediato ai materiali contenuti nel | ||
sito. | ||
</p> | ||
</div> | ||
<div className="flex overflow-x-scroll pt-2 scrollbar-hide w-full pb-10"> | ||
<div className="flex flex-nowrap"> | ||
{assets.map((asset) => ( | ||
<Asset key={asset.url} asset={asset} /> | ||
))} | ||
</div> | ||
|
||
<p className="pb-10"> | ||
Vai e inizia la tua epica avventura! | ||
</p> | ||
|
||
<ButtonLink href={"/materiali"}> | ||
Vai ai Materiali | ||
</ButtonLink> | ||
</div> | ||
<ButtonLink href={"/materiali"}> | ||
Vai ai materiali <FontAwesomeIcon icon={faArrowRight} width={12} /> | ||
</ButtonLink> | ||
<Image | ||
className="mx-auto xl:mx-0" | ||
src={materiali} | ||
alt="" | ||
loading="lazy" | ||
width={383.5} | ||
height={575} | ||
/> | ||
</div> | ||
</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
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