1
0

changes in frontend

This commit is contained in:
Jose
2025-03-17 02:34:54 +01:00
parent c766ab68a1
commit a4fe915c2a
2 changed files with 38 additions and 1 deletions

View File

@@ -1,7 +1,7 @@
import "../css/SideMenu.css";
import PropTypes from 'prop-types';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faTimes } from '@fortawesome/free-solid-svg-icons';
import { faTimes, faHome } from '@fortawesome/free-solid-svg-icons';
import { DataProvider } from '../contexts/DataContext';
import { useData } from '../contexts/DataContext';
@@ -63,9 +63,13 @@ const SideMenuContent = ({ isOpen, onClose }) => {
return (
<div className={`side-menu ${isOpen ? 'open' : ''} ${theme}`}>
<button className="home-btn" onClick={() => window.location.href = '/'}>
<FontAwesomeIcon icon={faHome} />
</button>
<button className="close-btn" onClick={onClose}>
<FontAwesomeIcon icon={faTimes} />
</button>
<hr className="separation w-100"></hr>
<div className="d-flex flex-column gap-3 mt-5">
{data.map(device => {
return (

View File

@@ -54,4 +54,37 @@
.side-menu .close-btn:hover {
color: var(--primary-color);
}
.side-menu .home-btn {
position: absolute;
top: 20px;
left: 20px;
background: none;
border: none;
font-size: 30px;
cursor: pointer;
}
.side-menu .home-btn .fa-home {
width: 30px;
height: 30px;
}
.side-menu .home-btn.light {
color: black;
}
.side-menu .home-btn.dark {
color: white;
}
.side-menu .home-btn:hover {
color: var(--primary-color);
}
hr.separation {
margin: 60px 0;
border: none;
border-top: 1px solid #ccc;
}