Skip to content

Commit

Permalink
Merge pull request #263 from TreasureProject/update/landing-page
Browse files Browse the repository at this point in the history
Added bag platform section
  • Loading branch information
BasVanDeGroep authored Jan 18, 2024
2 parents fa2b71c + d447558 commit d230b9f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
19 changes: 17 additions & 2 deletions app/components/new-landing/sections/Games.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import TOE_BACKGROUND from "~/../public/img/new-landing/game-backgrounds/The_ToE

import { twMerge } from "tailwind-merge";
import { ChevronRightIcon } from "../misc/Icons";
import { set } from "nprogress";

const games = [
{
Expand Down Expand Up @@ -92,11 +93,25 @@ const Games = () => {
/>

{/* Carousel container */}
<div className="relative z-10 mb-20 flex cursor-pointer gap-12">
<div className="relative z-10 mb-20 flex h-[600px] cursor-pointer gap-12 transition-all">
{games.map((game) => (
<div
className="h-[600px] w-[416px] min-w-[416px] overflow-hidden rounded-2xl border border-night-100/40"
className={twMerge(
"absolute h-[600px] w-[416px] min-w-[416px] overflow-hidden rounded-2xl border border-night-100/40",
activeGame === games.indexOf(game) && "scale-110"
)}
style={{
left: `${
(games.indexOf(game) - activeGame) * 416 +
games.indexOf(game) * 32
}px`,
}}
key={game.name}
onClick={() => {
if (!(activeGame === games.indexOf(game))) {
setActiveGame(games.indexOf(game));
}
}}
>
<img
src={game.cover}
Expand Down
3 changes: 2 additions & 1 deletion app/routes/_index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import Games from "~/components/new-landing/sections/Games";
import Ctas from "~/components/new-landing/sections/Ctas";
import Bridgeworld from "~/components/new-landing/sections/Bridgeworld";
import Chain from "~/components/new-landing/sections/Chain";
import Platform from "~/components/new-landing/sections/Platform";

export const headers: HeadersFunction = commonHeaders;

Expand All @@ -30,7 +31,7 @@ export default function Home() {
<Intro />
<Partners />
<Games />
{/* <Platform /> */}
<Platform />
<Chain />
<Bridgeworld />
<Ctas />
Expand Down

0 comments on commit d230b9f

Please sign in to comment.