diff --git a/01-frontend/src/helper/NavBar.css b/01-frontend/src/helper/NavBar.css deleted file mode 100644 index e236ac4..0000000 --- a/01-frontend/src/helper/NavBar.css +++ /dev/null @@ -1,70 +0,0 @@ -/* Navbar styles */ -.navbar { - background-color: #1976d2; /* Material-UI Primary Color */ - box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1); - position: fixed; - top: 0; - height: 3rem; -} - -/* Logo styles */ -.navbar-logo { - font-family: 'Roboto', sans-serif; - font-weight: bold; - color: white; - text-decoration: none; - margin-right: auto; -} - -/* Menu styles */ -.navbar-menu { - display: flex; - align-items: center; - margin-left: auto; -} - -/* Search styles */ -.search { - position: relative; - border-radius: 4px; - background-color: rgba(255, 255, 255, 0.15); -} -.search:hover { - background-color: rgba(255, 255, 255, 0.25); -} -.search-icon-wrapper { - padding: 8px; - height: 100%; - position: absolute; - pointer-events: none; - display: flex; - align-items: center; - justify-content: center; -} -.search-input { - color: inherit; - width: 100%; - padding: 8px 8px 8px 40px; - font-size: 1rem; -} - -/* User avatar styles */ -.navbar-user { - margin-left: 16px; -} - -/* Typography styles */ -.navbar-typography { - font-family: 'monospace'; - font-weight: 700; - letter-spacing: .3rem; - color: inherit; - text-decoration: none; -} - -/* Button styles */ -.navbar-button { - margin: 2; - color: white; - display: block; -} \ No newline at end of file diff --git a/01-frontend/src/helper/NavBar.tsx b/01-frontend/src/helper/NavBar.tsx deleted file mode 100644 index 8678f59..0000000 --- a/01-frontend/src/helper/NavBar.tsx +++ /dev/null @@ -1,205 +0,0 @@ -import * as React from 'react'; -import { - AppBar, Box, Toolbar, IconButton, Typography, Menu, - Container, Avatar, Button, Tooltip, MenuItem, InputBase, alpha, styled -} from '@mui/material'; -import MenuIcon from '@mui/icons-material/Menu'; -import AdbIcon from '@mui/icons-material/Adb'; -import SearchIcon from '@mui/icons-material/Search'; -import { useNavigate } from 'react-router-dom'; -import { useTheme } from '@mui/material/styles'; - -const pages = ['Categories', 'Checkout', 'Contact']; -const settings = ['Account', 'Orders', 'Logout']; - -const Search = styled('div')(({ theme }) => ({ - position: 'relative', - borderRadius: theme.shape.borderRadius, - backgroundColor: alpha(theme.palette.common.white, 0.15), - border: '1px solid black', // ✅ immer schwarz - boxShadow: '0 0 4px rgba(0,0,0,0.2)', - marginLeft: 0, - width: '100%', - [theme.breakpoints.up('sm')]: { - marginLeft: theme.spacing(1), - width: 'auto', - }, - '&:hover': { - backgroundColor: alpha(theme.palette.common.white, 0.25), - borderColor: 'black', // ✅ auch beim Hover - }, -})); - -const SearchIconWrapper = styled('div')(({ theme }) => ({ - padding: theme.spacing(0, 2), - height: '100%', - position: 'absolute', - pointerEvents: 'none', - display: 'flex', - alignItems: 'center', - justifyContent: 'center', -})); - -const StyledInputBase = styled(InputBase)(({ theme }) => ({ - color: theme.palette.text.primary, - width: '100%', - '& .MuiInputBase-input': { - padding: theme.spacing(1, 1, 1, 0), - paddingLeft: `calc(1em + ${theme.spacing(4)})`, - transition: theme.transitions.create('width'), - color: theme.palette.text.primary, - '&::placeholder': { - color: theme.palette.text.primary, - opacity: 0.7, - }, - [theme.breakpoints.up('sm')]: { - width: '12ch', - '&:focus': { - width: '20ch', - }, - }, - }, -})); - -export default function NavBar() { - const theme = useTheme(); - const navigate = useNavigate(); - const [anchorElNav, setAnchorElNav] = React.useState(null); - const [anchorElUser, setAnchorElUser] = React.useState(null); - - const handleOpenNavMenu = (event: React.MouseEvent) => { - setAnchorElNav(event.currentTarget); - }; - const handleOpenUserMenu = (event: React.MouseEvent) => { - setAnchorElUser(event.currentTarget); - }; - const handleCloseNavMenu = (link: string) => { - setAnchorElNav(null); - navigate(`/${link.toLowerCase()}`); - }; - const handleCloseUserMenu = () => { - setAnchorElUser(null); - }; - - return ( - - - - - - Digitaler Produktionsshop - - - - - - - - - - - - - - setAnchorElNav(null)} - sx={{ display: { xs: 'block', md: 'none' } }} - > - {pages.map((page) => ( - handleCloseNavMenu(page)}> - {page} - - ))} - - - - - - DPS - - - - {pages.map((page) => ( - - ))} - - - - - - - - - - {settings.map((setting) => ( - - {setting} - - ))} - - - - - - ); -}