diff --git a/.gitignore b/.gitignore index 194e728..4a50304 100644 --- a/.gitignore +++ b/.gitignore @@ -150,3 +150,4 @@ dist # Built Visual Studio Code Extensions *.vsix +package-lock.json diff --git a/package.json b/package.json index 2b2e91d..e0d4772 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,9 @@ "framer-motion": "^12.11.0", "html2canvas": "^1.4.1", "react": "^18.3.1", - "react-dom": "^18.3.1" + "react-bootstrap": "^2.10.10", + "react-dom": "^18.3.1", + "react-router-dom": "^7.9.6" }, "devDependencies": { "@eslint/js": "^9.17.0", diff --git a/src/components/Card.jsx b/src/components/Card.jsx index da56161..f1ef49c 100644 --- a/src/components/Card.jsx +++ b/src/components/Card.jsx @@ -5,6 +5,7 @@ import { useState, useEffect } from "react"; export default function Card({ title, link }) { const [image, setImage] = useState(""); + const [buttonContent, setButtonContent] = useState(<>{title}); useEffect(() => { const getImage = async () => { @@ -18,28 +19,37 @@ export default function Card({ title, link }) { return (
-
-
-
{title}
-
+ +
{title}
-
- - - Link - + +
+
window.open(link, "_blank")} + onMouseEnter={() => setButtonContent( + <> + + Link + + )} + onMouseLeave={() => setButtonContent( + <> + {title} + + )} + > + {buttonContent} +
+
) } Card.propTypes = { title: PropTypes.string.isRequired, - description: PropTypes.string.isRequired, - link: PropTypes.string.isRequired, - onHoverStart: PropTypes.func, - onHoverEnd: PropTypes.func, + link: PropTypes.string.isRequired } \ No newline at end of file diff --git a/src/css/Card.css b/src/css/Card.css index 0a92c7d..9954851 100644 --- a/src/css/Card.css +++ b/src/css/Card.css @@ -24,6 +24,7 @@ padding: 10px 20px; color: var(--text-light); font-weight: bold; + font-size: large; border: none; z-index: 1; }