update footer
This commit is contained in:
@@ -1,52 +1,31 @@
|
|||||||
import styles from "./Footer.module.css"
|
import styles from "./Footer.module.css"
|
||||||
import {Link, NavLink} from "react-router";
|
import {Link} from "react-router";
|
||||||
import Button from "../ui/button/button.jsx"
|
|
||||||
import {useContext} from "react";
|
|
||||||
import {AuthContext} from "../../contexts/auth/AuthContext.js";
|
|
||||||
|
|
||||||
function Footer(){
|
function Footer(){
|
||||||
const { user } = useContext(AuthContext);
|
const currentYear = new Date().getFullYear();
|
||||||
|
const scrollToTop = () => {
|
||||||
|
window.scrollTo({ top: 0, left: 0, behavior: 'smooth' });
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<footer className={`${styles.footer} ${"glassCard"}`} >
|
<footer className={`${styles.footer} glassCard`}>
|
||||||
<div className={styles.footerContent}>
|
<div className={styles.footerContent}>
|
||||||
<div className={styles.footerElement}>
|
<div className={styles.copyright}>
|
||||||
{/* TODO: les mettre dans un fichier de configuration */}
|
© {currentYear} Beaup'hub. Tous droits réservés.
|
||||||
<p>contact@example.com</p>
|
|
||||||
<p>06 68 98 10 56</p>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className={styles.footerElement}>
|
<nav className={styles.footerNav}>
|
||||||
{/* TODO : mettre le nom du fichier dans un fichier de configuration aussi ou pas comme tu veux */}
|
<Link to="/rgpd.pdf" target="_blank" className={styles.link}>Fiche RGPD</Link>
|
||||||
<Button variant={"transparent"}
|
<span className={styles.separator}></span>
|
||||||
onClick={() => window.open("/rgpd.pdf", "_blank")}>
|
<Link to="/legalNotices" className={styles.link}>Mentions légales</Link>
|
||||||
Fiche RGPD
|
<span className={styles.separator}></span>
|
||||||
</Button>
|
<Link to="/contact" className={styles.link}>Contact</Link>
|
||||||
<Button variant={"transparent"}
|
<span className={styles.separator}></span>
|
||||||
onClick={() => window.open("/legalNotices", "_blank")}>
|
<Link to="/" className={styles.link} onClick={scrollToTop}>Accueil</Link>
|
||||||
Mentions légales
|
</nav>
|
||||||
</Button>
|
|
||||||
<Link to="" className={styles.link}></Link>
|
|
||||||
</div>
|
|
||||||
<div className={styles.footerElement}>
|
|
||||||
<NavLink to="/">
|
|
||||||
Accueil
|
|
||||||
</NavLink>
|
|
||||||
<NavLink to="/events">
|
|
||||||
Evènements
|
|
||||||
</NavLink>
|
|
||||||
<NavLink to="/volunteers">
|
|
||||||
Bénévoles
|
|
||||||
</NavLink>
|
|
||||||
{user?.isAdmin && (
|
|
||||||
<NavLink to="/admin">
|
|
||||||
Administration
|
|
||||||
</NavLink>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Footer;
|
export default Footer;
|
||||||
@@ -1,33 +1,63 @@
|
|||||||
.footer{
|
.footer {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
padding: 1.5rem 2rem;
|
||||||
align-items: center;
|
margin-top: auto;
|
||||||
height: fit-content;
|
|
||||||
padding: 2rem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.footerContent {
|
.footerContent {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
max-width: 1200px;
|
||||||
|
margin: 0 auto;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
justify-content: center;
|
|
||||||
gap: 2rem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.footerElement{
|
.footerNav {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.link {
|
||||||
|
color: black;
|
||||||
|
text-decoration: none;
|
||||||
|
font-size: 0.95rem;
|
||||||
|
transition: color 0.2s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.link:hover {
|
||||||
|
color: #019AFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
.separator {
|
||||||
|
width: 1px;
|
||||||
|
height: 16px;
|
||||||
|
background-color: black;
|
||||||
|
margin: 0 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.copyright {
|
||||||
|
color: black;
|
||||||
|
font-size: 0.9rem;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@media screen and (max-width: 768px) {
|
||||||
@media screen and (max-width: 480px) {
|
.footerContent {
|
||||||
.footer{
|
flex-direction: column-reverse;
|
||||||
padding: 1rem;
|
gap: 1rem;
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.footerContent{
|
.footerNav {
|
||||||
flex-direction: column;
|
flex-wrap: wrap;
|
||||||
align-items: center;
|
justify-content: center;
|
||||||
gap: 0.5rem;
|
}
|
||||||
|
|
||||||
|
.link {
|
||||||
|
margin: 0.5rem 1rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user