From 19ad8deb6fa1b25863e1723296aa32c5990a980f Mon Sep 17 00:00:00 2001 From: Marco Santos Date: Mon, 6 Oct 2025 23:08:28 +0100 Subject: [PATCH] Paginas --- geradoresfe/.env | 2 +- geradoresfe/src/App.tsx | 9 ++++++--- geradoresfe/src/layout/Footer.tsx | 2 +- geradoresfe/src/layout/Header.tsx | 5 +++-- geradoresfe/src/pages/CC.tsx | 31 +++++++++++++++++++++++++++++++ geradoresfe/src/pages/Home.tsx | 6 +++--- geradoresfe/src/pages/NIF.tsx | 31 +++++++++++++++++++++++++++++++ geradoresfe/src/pages/NISS.tsx | 31 +++++++++++++++++++++++++++++++ 8 files changed, 107 insertions(+), 10 deletions(-) create mode 100644 geradoresfe/src/pages/CC.tsx create mode 100644 geradoresfe/src/pages/NIF.tsx create mode 100644 geradoresfe/src/pages/NISS.tsx diff --git a/geradoresfe/.env b/geradoresfe/.env index e88a86e..e3c6e8c 100644 --- a/geradoresfe/.env +++ b/geradoresfe/.env @@ -1 +1 @@ -VITE_API_URL=https://localhost:44329/ \ No newline at end of file +VITE_API_URL=https://localhost:7266/ \ No newline at end of file diff --git a/geradoresfe/src/App.tsx b/geradoresfe/src/App.tsx index efa6731..72b5633 100644 --- a/geradoresfe/src/App.tsx +++ b/geradoresfe/src/App.tsx @@ -3,6 +3,9 @@ import { Toaster } from 'react-hot-toast'; import Home from './pages/Home'; import { Layout } from './layout/Layout'; import { useTheme } from './context/ThemeContext'; +import NIF from './pages/NIF'; +import CC from './pages/CC'; +import NISS from './pages/NISS'; function App() { const { theme } = useTheme(); @@ -12,9 +15,9 @@ function App() { } /> - - - + } /> + } /> + } />
  • - + Geradores
  • diff --git a/geradoresfe/src/layout/Header.tsx b/geradoresfe/src/layout/Header.tsx index ca418ff..2aeb0d9 100644 --- a/geradoresfe/src/layout/Header.tsx +++ b/geradoresfe/src/layout/Header.tsx @@ -10,8 +10,9 @@ const navItems = [ { name: "Geradores", subItems: [ - { name: "Gerador de Senhas", path: "/geradores/senhas" }, - { name: "Gerador de Nomes", path: "/geradores/nomes" }, + { name: "Gerador de NIFs", path: "/NIF", }, + { name: "Gerador de NISS", path: "/NISS" }, + { name: "Gerador de CC", path: "/CC" }, ], }, { name: "Contacto", path: "/contacto" }, diff --git a/geradoresfe/src/pages/CC.tsx b/geradoresfe/src/pages/CC.tsx new file mode 100644 index 0000000..a5ece76 --- /dev/null +++ b/geradoresfe/src/pages/CC.tsx @@ -0,0 +1,31 @@ +import { useEffect } from "react"; +import { useLocation } from "react-router"; +import GenerateCC from "../components/Geradores/Tipos/GenerateCC"; + +export default function CC() { + const location = useLocation(); + + // Efeito para rolar até a seção correspondente ao path + useEffect(() => { + const featuresSection = document.getElementById(location.hash.substring(1)); + if (featuresSection) { + featuresSection.scrollIntoView({ behavior: "smooth" }); + } + + }, [location]); + + return ( +
    +
    + {/* Seção de Funcionalidades */} +
    +
    +
    + +
    +
    +
    +
    +
    + ); +} diff --git a/geradoresfe/src/pages/Home.tsx b/geradoresfe/src/pages/Home.tsx index 69c1a22..da07126 100644 --- a/geradoresfe/src/pages/Home.tsx +++ b/geradoresfe/src/pages/Home.tsx @@ -28,9 +28,9 @@ export default function Home() {
    -
    - -
    +
    + +
    diff --git a/geradoresfe/src/pages/NIF.tsx b/geradoresfe/src/pages/NIF.tsx new file mode 100644 index 0000000..122fcb5 --- /dev/null +++ b/geradoresfe/src/pages/NIF.tsx @@ -0,0 +1,31 @@ +import { useEffect } from "react"; +import { useLocation } from "react-router"; +import GenerateNIF from "../components/Geradores/Tipos/GenerateNIF"; + +export default function NIF() { + const location = useLocation(); + + // Efeito para rolar até a seção correspondente ao path + useEffect(() => { + const featuresSection = document.getElementById(location.hash.substring(1)); + if (featuresSection) { + featuresSection.scrollIntoView({ behavior: "smooth" }); + } + + }, [location]); + + return ( +
    +
    + {/* Seção de Funcionalidades */} +
    +
    +
    + +
    +
    +
    +
    +
    + ); +} diff --git a/geradoresfe/src/pages/NISS.tsx b/geradoresfe/src/pages/NISS.tsx new file mode 100644 index 0000000..8f28f8d --- /dev/null +++ b/geradoresfe/src/pages/NISS.tsx @@ -0,0 +1,31 @@ +import { useEffect } from "react"; +import { useLocation } from "react-router"; +import GenerateNISS from "../components/Geradores/Tipos/GenerateNISS"; + +export default function NISS() { + const location = useLocation(); + + // Efeito para rolar até a seção correspondente ao path + useEffect(() => { + const featuresSection = document.getElementById(location.hash.substring(1)); + if (featuresSection) { + featuresSection.scrollIntoView({ behavior: "smooth" }); + } + + }, [location]); + + return ( +
    +
    + {/* Seção de Funcionalidades */} +
    +
    +
    + +
    +
    +
    +
    +
    + ); +}