summaryrefslogtreecommitdiffhomepage
path: root/src/components/GameCard.jsx
diff options
context:
space:
mode:
authorrealtradam <[email protected]>2024-05-21 23:32:53 -0400
committerrealtradam <[email protected]>2024-05-21 23:32:53 -0400
commit80d64e04441ced7caecd238ae232e749d8e0dddf (patch)
treec41d7803a15aa99b51703bbecc56ec2ed2233431 /src/components/GameCard.jsx
downloadmalcz.com-80d64e04441ced7caecd238ae232e749d8e0dddf.tar.gz
malcz.com-80d64e04441ced7caecd238ae232e749d8e0dddf.zip
initial setup of seperating frontend
Diffstat (limited to 'src/components/GameCard.jsx')
-rw-r--r--src/components/GameCard.jsx26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/components/GameCard.jsx b/src/components/GameCard.jsx
new file mode 100644
index 0000000..9cd815d
--- /dev/null
+++ b/src/components/GameCard.jsx
@@ -0,0 +1,26 @@
+import React from "react";
+//import { Link } from "react-router-dom";
+
+//game = {
+// card_img: "",
+// char_img: "",
+// title_img: ""
+//}
+
+export default function GameCard ({ link = "./", width = "72", game = { card_img: "https://ggayane.github.io/css-experiments/cards/dark_rider-cover.jpg", char_img: "https://ggayane.github.io/css-experiments/cards/dark_rider-character.png", title_img: "https://ggayane.github.io/css-experiments/cards/dark_rider-title.png" } })
+{
+
+ return (
+ <>
+ <a href={ link } className="block w-min pt-10 px-1" target="_blank">
+ <div className="gameCard">
+ <div className="gameCardWrapper">
+ <img src={`/api/v1/games_img/realtradam/${game.titleSlug}.png?type=card`} className="gameCardCoverImg" />
+ </div>
+ <img src={`/api/v1/games_img/realtradam/${game.titleSlug}.png?type=title`} className="gameTitleImg p-5%" />
+ <img src={`/api/v1/games_img/realtradam/${game.titleSlug}.png?type=char`} className="gameCharacterImg" />
+ </div>
+ </a>
+ </>
+ )
+};