diff options
Diffstat (limited to 'frontend/src/components/GameEntry.tsx')
| -rw-r--r-- | frontend/src/components/GameEntry.tsx | 38 |
1 files changed, 24 insertions, 14 deletions
diff --git a/frontend/src/components/GameEntry.tsx b/frontend/src/components/GameEntry.tsx index 3bd2842..f8fd179 100644 --- a/frontend/src/components/GameEntry.tsx +++ b/frontend/src/components/GameEntry.tsx | |||
| @@ -1,10 +1,9 @@ | |||
| 1 | import React from 'react'; | 1 | import React from "react"; |
| 2 | import { Link } from "react-router-dom"; | 2 | import { Link } from "react-router-dom"; |
| 3 | 3 | ||
| 4 | import { Game, GameCategoryPortals } from '@customTypes/Game'; | 4 | import { Game, GameCategoryPortals } from "@customTypes/Game"; |
| 5 | import "@css/Games.css" | ||
| 6 | 5 | ||
| 7 | import GameCategory from '@components/GameCategory'; | 6 | import GameCategory from "@components/GameCategory"; |
| 8 | 7 | ||
| 9 | interface GameEntryProps { | 8 | interface GameEntryProps { |
| 10 | game: Game; | 9 | game: Game; |
| @@ -18,17 +17,28 @@ const GameEntry: React.FC<GameEntryProps> = ({ game }) => { | |||
| 18 | }, [game.category_portals]); | 17 | }, [game.category_portals]); |
| 19 | 18 | ||
| 20 | return ( | 19 | return ( |
| 21 | <Link to={"/games/" + game.id}><div className='games-page-item'> | 20 | <Link to={"/games/" + game.id} className="w-full"> |
| 22 | <div className='games-page-item-header'> | 21 | <div className="w-full h-64 bg-mantle rounded-3xl overflow-hidden my-6"> |
| 23 | <div style={{ backgroundImage: `url(${game.image})` }} className='games-page-item-header-img'></div> | 22 | <div className="w-full h-1/2 bg-cover overflow-hidden relative"> |
| 24 | <span><b>{game.name}</b></span> | 23 | <div |
| 24 | style={{ backgroundImage: `url(${game.image})` }} | ||
| 25 | className="w-full h-full backdrop-blur-sm blur-sm bg-cover" | ||
| 26 | ></div> | ||
| 27 | <span className="absolute inset-0 flex justify-center items-center"> | ||
| 28 | <b className="text-[56px] font-[--font-barlow-condensed-bold] text-white">{game.name}</b> | ||
| 29 | </span> | ||
| 30 | </div> | ||
| 31 | <div className="flex justify-center items-center h-1/2"> | ||
| 32 | <div className="flex flex-row justify-between w-full"> | ||
| 33 | {catInfo.map((cat, index) => { | ||
| 34 | return ( | ||
| 35 | <GameCategory key={index} cat={cat} game={game} /> | ||
| 36 | ); | ||
| 37 | })} | ||
| 38 | </div> | ||
| 39 | </div> | ||
| 25 | </div> | 40 | </div> |
| 26 | <div id={game.id as any as string} className='games-page-item-body'> | 41 | </Link> |
| 27 | {catInfo.map((cat, index) => { | ||
| 28 | return <GameCategory cat={cat} game={game} key={index}></GameCategory> | ||
| 29 | })} | ||
| 30 | </div> | ||
| 31 | </div></Link> | ||
| 32 | ); | 42 | ); |
| 33 | }; | 43 | }; |
| 34 | 44 | ||