Pour tout problème contactez-nous par mail : support@froggit.fr | La FAQ :grey_question: | Rejoignez-nous sur le Chat :speech_balloon:

Skip to content
Snippets Groups Projects
Commit e1ff1c67 authored by Christophe Chaudier's avatar Christophe Chaudier :rocket:
Browse files

Merge branch '3-feat-add-menu' into 'main'

Resolve "feat: add menu"

Closes #3

See merge request !3
parents 884c2ca0 88355494
No related branches found
No related tags found
1 merge request!3Resolve "feat: add menu"
Pipeline #11672 passed
import React from 'react';
import clsx from 'clsx';
import {useThemeConfig} from '@docusaurus/theme-common';
import {
useHideableNavbar,
useNavbarMobileSidebar,
} from '@docusaurus/theme-common/internal';
import NavbarMobileSidebar from '@theme/Navbar/MobileSidebar';
import styles from './styles.module.css';
function NavbarBackdrop(props) {
return (
<div
role="presentation"
{...props}
className={clsx('navbar-sidebar__backdrop', props.className)}
/>
);
}
export default function NavbarLayout({children}) {
const {
navbar: {hideOnScroll, style},
} = useThemeConfig();
const mobileSidebar = useNavbarMobileSidebar();
const {navbarRef, isNavbarVisible} = useHideableNavbar(hideOnScroll);
return (
<nav
ref={navbarRef}
className={clsx(
'navbar',
'navbar--fixed-top',
hideOnScroll && [
styles.navbarHideable,
!isNavbarVisible && styles.navbarHidden,
],
{
'navbar--dark': style === 'dark',
'navbar--primary': style === 'primary',
'navbar-sidebar--show': mobileSidebar.shown,
},
)}>
{children}
<NavbarBackdrop onClick={mobileSidebar.toggle} />
<NavbarMobileSidebar />
</nav>
);
}
.navbarHideable {
transition: var(--ifm-transition-fast) ease;
}
.navbarHidden {
background-color: var(--ifm-background-surface-color);
box-shadow: var(--ifm-navbar-shadow)
}
static/img/artisanBackground.jpg

110 KiB

static/img/collaborate.png

31.2 KiB

static/img/favicon.png

23.4 KiB

This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment