Skip to content

Commit

Permalink
barra de navegación y pie de página
Browse files Browse the repository at this point in the history
  • Loading branch information
uo288574 committed Mar 11, 2024
1 parent 67d4aad commit cac634d
Show file tree
Hide file tree
Showing 3 changed files with 89 additions and 0 deletions.
14 changes: 14 additions & 0 deletions webapp/src/components/Footer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { AppBar, Toolbar, Typography } from '@mui/material';

const Footer = () => {
return (
<AppBar component="footer" position="static"
sx={{ backgroundColor: "primary", color: "white", bottom: 0, left: 0, width: '100%', zIndex: 1000 }}>
<Toolbar>
<Typography sx={{ margin: 'auto' }}>© WIQ_ES6C</Typography>
</Toolbar>
</AppBar>
);
};

export default Footer;
46 changes: 46 additions & 0 deletions webapp/src/components/NavBar.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
nav {
background-color: #1c57c4;
color: #fff;
display: flex;
justify-content: space-between;
align-items: center;
padding: 10px 20px;
}

.logo img {
max-width: 100px;
}

.nav-links {
list-style: none;
display: flex;
align-items: center;
}

.nav-links li {
margin-right: 5%;
}

.nav-links li:last-child {
margin-right: 0%;
}

.nav-links a {
text-decoration: none;
color: #fff;
}

.nav-links button {
background-color: transparent;
border: none;
color: #fff;
cursor: pointer;
}

.nav-links button:hover {
text-decoration: underline;
}

.nav-links {
margin-left: auto;
}
29 changes: 29 additions & 0 deletions webapp/src/components/NavBar.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import React from 'react';
import './NavBar.css';
import { Link } from 'react-router-dom';

const Navbar = ({ loggedIn, handleLogout }) => {
return (
<nav>
<div className="logo">
<img src=" " alt="Logo de la aplicación" />
</div>
<ul className="nav-links">
{loggedIn ? (
<div>
<li>
<Link to=" ">Perfil</Link>
</li>
<li>
<button onClick={handleLogout}>Cerrar sesión</button>
</li>
</div>
):
<div> </div>
}
</ul>
</nav>
);
};

export default Navbar;

0 comments on commit cac634d

Please sign in to comment.