From 88afb7b4536569b33cb963601eaa6c107b8050a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Henrique?= Date: Sat, 31 May 2025 14:42:47 -0300 Subject: [PATCH] add animated background --- package-lock.json | 18 ++ package.json | 1 + src/App.css | 14 +- src/App.tsx | 18 +- src/components/Footer.tsx | 2 +- src/components/MatrixBackground.tsx | 334 +++++++++++++++++++++++++++ src/components/StatisticsSection.tsx | 9 +- 7 files changed, 379 insertions(+), 17 deletions(-) create mode 100644 src/components/MatrixBackground.tsx diff --git a/package-lock.json b/package-lock.json index c2e2f8e..adce7d2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,6 +18,7 @@ "devDependencies": { "@eslint/js": "^9.25.0", "@heroicons/react": "^2.2.0", + "@types/node": "^22.15.29", "@types/react": "^19.1.2", "@types/react-dom": "^19.1.2", "@types/react-router-dom": "^5.3.3", @@ -1675,6 +1676,16 @@ "dev": true, "license": "MIT" }, + "node_modules/@types/node": { + "version": "22.15.29", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.29.tgz", + "integrity": "sha512-LNdjOkUDlU1RZb8e1kOIUpN1qQUlzGkEtbVNo53vbrwDg5om6oduhm4SiUaPW5ASTXhAiP0jInWG8Qx9fVlOeQ==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "undici-types": "~6.21.0" + } + }, "node_modules/@types/react": { "version": "19.1.6", "resolved": "https://registry.npmjs.org/@types/react/-/react-19.1.6.tgz", @@ -3952,6 +3963,13 @@ "typescript": ">=4.8.4 <5.9.0" } }, + "node_modules/undici-types": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", + "devOptional": true, + "license": "MIT" + }, "node_modules/update-browserslist-db": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.3.tgz", diff --git a/package.json b/package.json index fe22320..94f2e05 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,7 @@ "devDependencies": { "@eslint/js": "^9.25.0", "@heroicons/react": "^2.2.0", + "@types/node": "^22.15.29", "@types/react": "^19.1.2", "@types/react-dom": "^19.1.2", "@types/react-router-dom": "^5.3.3", diff --git a/src/App.css b/src/App.css index aacc42b..ffa6e24 100644 --- a/src/App.css +++ b/src/App.css @@ -1,5 +1,17 @@ #root { margin: 0 auto; - padding: 2rem; + padding: 0; text-align: center; + position: relative; + min-height: 100vh; + width: 100%; +} + +/* Ensure body and html have no margins/padding for full screen background */ +body, html { + margin: 0; + padding: 0; + width: 100%; + height: 100%; + overflow-x: hidden; } \ No newline at end of file diff --git a/src/App.tsx b/src/App.tsx index 0fe60bc..1cf4c21 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -6,6 +6,7 @@ import StatisticsSection from './components/StatisticsSection'; import FeaturesSection from './components/FeaturesSection'; import Footer from './components/Footer'; import CandidatePage from './components/CandidatePage/CandidatePage'; +import MatrixBackground from './components/MatrixBackground'; import './App.css'; // HomePage component @@ -19,13 +20,16 @@ const HomePage: React.FC = () => ( function App() { return ( -
- - - } /> - } /> - -