diff --git a/frontend/src/Navbar.tsx b/frontend/src/Navbar.tsx index 753ba46..8cb541b 100644 --- a/frontend/src/Navbar.tsx +++ b/frontend/src/Navbar.tsx @@ -1,7 +1,113 @@ +import React, { useState } from 'react'; +import Button from './library/button'; import './index.css'; -function Navbar() { - return
Navbar
; -} +type NavbarProps = { + isLoggedIn?: boolean; + username?: string; + onLogin?: () => void; + onLogout?: () => void; +}; + +const Navbar: React.FC = ({ + isLoggedIn, + username = 'unknown', + onLogin, + onLogout, +}) => { + const [isOpen, setIsOpen] = useState(false); + + const toggleMenu = () => { + setIsOpen(!isOpen); + }; + + return ( +
+
+
+ +
+
+
+
+ {isOpen && ( +
+
+ + {isLoggedIn ? ( + <> +
+ {username} +
+
+
+
+
+
+
+ )} + + ); +}; export default Navbar; diff --git a/frontend/src/assets/Uno-Logo.png b/frontend/src/assets/Uno-Logo.png new file mode 100644 index 0000000..b339761 Binary files /dev/null and b/frontend/src/assets/Uno-Logo.png differ diff --git a/frontend/src/assets/bg.jpg b/frontend/src/assets/bg.jpg new file mode 100644 index 0000000..f160cef Binary files /dev/null and b/frontend/src/assets/bg.jpg differ diff --git a/frontend/src/assets/close.png b/frontend/src/assets/close.png new file mode 100644 index 0000000..e20797b Binary files /dev/null and b/frontend/src/assets/close.png differ diff --git a/frontend/src/assets/hamburger.png b/frontend/src/assets/hamburger.png new file mode 100644 index 0000000..eac7a2e Binary files /dev/null and b/frontend/src/assets/hamburger.png differ diff --git a/frontend/src/index.css b/frontend/src/index.css index 72e2f4c..7bf2ebd 100644 --- a/frontend/src/index.css +++ b/frontend/src/index.css @@ -11,3 +11,17 @@ body::-webkit-scrollbar { .font-kavoon { font-family: 'Kavoon', 'serif'; } + +.text-stroke { + -webkit-text-stroke-width: 1px; + -webkit-text-stroke-color: black; + text-stroke-width: 1px; + text-stroke-color: black; +} + +.text-stroke-2 { + -webkit-text-stroke-width: 1.5px; + -webkit-text-stroke-color: black; + text-stroke-width: 1.5px; + text-stroke-color: black; +} diff --git a/frontend/src/library/button.tsx b/frontend/src/library/button.tsx index e7f5cb3..c9ba58a 100644 --- a/frontend/src/library/button.tsx +++ b/frontend/src/library/button.tsx @@ -15,12 +15,12 @@ type ButtonProps = { fontSize?: string; rounded?: string; buttonSize?: string; - textStroke?: string; borderColor?: string; hoverColor?: string; hoverScale?: boolean; px?: string; py?: string; + className?: string; onClick?: () => void; }; @@ -29,21 +29,20 @@ const Button: React.FC = ({ textColor = 'text-white', backgroundColor = 'bg-lime-500', fontSize = 'text-lg', - rounded = 'rounded-xl', + rounded = 'rounded-2xl', buttonSize = 'w-36 h-11', px = 'px-3', py = 'py-1', - textStroke, borderColor = 'border-black', hoverColor = 'hover:bg-lime-600', hoverScale = true, onClick, + className = '', }) => { return ( diff --git a/frontend/src/pages/AppLayout.tsx b/frontend/src/pages/AppLayout.tsx index 26aaa2e..cfecbf5 100644 --- a/frontend/src/pages/AppLayout.tsx +++ b/frontend/src/pages/AppLayout.tsx @@ -1,10 +1,8 @@ import { Outlet } from 'react-router-dom'; -import Navbar from '../Navbar'; function AppLayout() { return (
- {/* todo: Add a footer component */}
diff --git a/frontend/src/pages/Home.tsx b/frontend/src/pages/Home.tsx index 033bdd9..d594d15 100644 --- a/frontend/src/pages/Home.tsx +++ b/frontend/src/pages/Home.tsx @@ -1,11 +1,10 @@ import React, { useState } from 'react'; import { useNavigate } from 'react-router-dom'; import Button from '../library/button'; -import Heading from '../library/heading'; +import Navbar from '../Navbar'; import '../index.css'; const Home: React.FC = () => { - const [gameCode, setGameCode] = useState(''); const navigate = useNavigate(); const CreateGame = () => { // Logic to create a game @@ -15,73 +14,56 @@ const Home: React.FC = () => { const JoinGame = () => { // Logic to join a game - console.log('Join Game with code:', gameCode); + console.log('Join Game with code'); + }; + + const [isLoggedIn, setIsLoggedIn] = useState(false); + const [username, setUsername] = useState(''); + + const handleLogin = () => { + setUsername('Username_7'); + setIsLoggedIn(true); + }; + + const handleLogout = () => { + setUsername(''); + setIsLoggedIn(false); }; return ( -
-
-
+
+ +
+
UNO Logo -
-
-
-
- -
-
-
-
- -
-
- setGameCode(e.target.value)} - className="border-2 border-red-600 rounded-lg p-1 mb-4 text-md w-full bg-black text-white" - /> -
-
-
+
); diff --git a/frontend/tailwind.config.js b/frontend/tailwind.config.js index 5ec8494..b605050 100644 --- a/frontend/tailwind.config.js +++ b/frontend/tailwind.config.js @@ -12,7 +12,12 @@ export default { }, extend: { borderWidth: { - '3': '3px', + '3': "3px", + }, + }, + extend: { + backgroundImage: { + 'uno-bg': "url('/src/assets/bg.jpg')", }, }, },