From 47b429e8b1c8ae99a945ee0795d98311bc2aba42 Mon Sep 17 00:00:00 2001 From: Parker Date: Tue, 12 Nov 2024 23:34:45 -0600 Subject: [PATCH] basic navbar --- app/src/components/Navbar.tsx | 19 ++++++- app/src/components/Signup.tsx | 94 +++++++++++++++++--------------- app/src/styles/Navbar.module.css | 47 ++++++++++++---- 3 files changed, 100 insertions(+), 60 deletions(-) diff --git a/app/src/components/Navbar.tsx b/app/src/components/Navbar.tsx index 7ffb514..5107bf4 100644 --- a/app/src/components/Navbar.tsx +++ b/app/src/components/Navbar.tsx @@ -1,10 +1,23 @@ import styles from '../styles/Navbar.module.css'; +import { Link } from 'react-router-dom'; function Navbar() { return ( - +
+
+ + Login + + + Signup + +
+
+ + API Status + +
+
); } diff --git a/app/src/components/Signup.tsx b/app/src/components/Signup.tsx index 388396c..5ec2e17 100644 --- a/app/src/components/Signup.tsx +++ b/app/src/components/Signup.tsx @@ -3,6 +3,7 @@ import styles from '../styles/Login.module.css'; import { Link } from 'react-router-dom'; import { useNavigate } from 'react-router-dom'; import axios from 'axios'; +import Navbar from './Navbar'; function Signup() { document.title = 'LinkLogger | Signup'; @@ -61,52 +62,55 @@ function Signup() { }; return ( -
-

Sign up

-

- {error} -

-
-
-
-
- setUsername(e.target.value)} - required - /> - setPassword(e.target.value)} - required - /> - setPasswordConfirm(e.target.value)} - required - /> - -
-
-

- Already have an account?{' '} - - Log in here. - -

-
+ <> + +
+

Sign up

+

+ {error} +

+
+
+
+
+ setUsername(e.target.value)} + required + /> + setPassword(e.target.value)} + required + /> + setPasswordConfirm(e.target.value)} + required + /> + +
+
+

+ Already have an account?{' '} + + Log in here. + +

+
+
-
+ ); } diff --git a/app/src/styles/Navbar.module.css b/app/src/styles/Navbar.module.css index 217e4b1..d8c3f72 100644 --- a/app/src/styles/Navbar.module.css +++ b/app/src/styles/Navbar.module.css @@ -1,18 +1,41 @@ -/* Create the nav and center the span */ +/* Create the navbar and set the colors */ .navbar { display: flex; - justify-content: center; - align-items: center; - height: 60px; - background-color: #f8f9fa; + justify-content: space-between; + background-color: #3b4148; + color: white; + padding: 15px; } -/* Create the nav links */ +.navbarLink { + margin: 0 20px; + position: relative; + display: inline-block; + text-decoration: none; + color: #ccc; + font-size: 20px; + font-weight: 600; +} -span { - font-size: 35px; - font-weight: 600; - color: #333; - text-decoration: none; - margin-right: 10px; +.navbarLink::after { + content: ""; + position: absolute; + bottom: 0; + left: 0; + width: 0%; + height: 2px; + background-color: #ccc; + transition: width 0.3s ease; +} + +.navbarLink:hover::after { + width: 100%; +} + +.navbarLeft { + margin-left: 50px; +} + +.navbarRight { + margin-right: 50px; } \ No newline at end of file