Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion apps/site/components/Containers/NavBar/index.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,18 @@
dark:border-neutral-900;
}

.sidebarItemToggler {
@apply absolute right-4 -z-10 appearance-none opacity-0;
Comment thread
aduh95 marked this conversation as resolved.
Outdated
transform: translateY(-200%);
Comment thread
aduh95 marked this conversation as resolved.
Outdated
}

.nodeIconWrapper {
@apply h-[30px]
flex-1;
}

.navInteractionIcon {
.navInteractionIcon,
.sidebarItemToggler {
@apply size-6;
}

Expand Down
10 changes: 8 additions & 2 deletions apps/site/components/Containers/NavBar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import Hamburger from '@heroicons/react/24/solid/Bars3Icon';
import XMark from '@heroicons/react/24/solid/XMarkIcon';
import * as Label from '@radix-ui/react-label';
import classNames from 'classnames';
import dynamic from 'next/dynamic';
import { useState } from 'react';
import type { FC, ComponentProps, HTMLAttributeAnchorTarget } from 'react';
Expand Down Expand Up @@ -55,15 +56,20 @@ const NavBar: FC<NavbarProps> = ({
</Link>

<Label.Root
onClick={() => setIsMenuOpen(prev => !prev)}
className={style.sidebarItemTogglerLabel}
htmlFor="sidebarItemToggler"
>
{navInteractionIcons[isMenuOpen ? 'close' : 'show']}
</Label.Root>
</div>

<input className="peer hidden" id="sidebarItemToggler" type="checkbox" />
<input
Comment thread
ovflowd marked this conversation as resolved.
className={classNames(['peer', style.sidebarItemToggler])}
id="sidebarItemToggler"
Comment thread
ovflowd marked this conversation as resolved.
type="checkbox"
onChange={e => setIsMenuOpen(() => e.target.checked)}
aria-label={`${isMenuOpen ? 'Close' : 'Show'} navigation menu`}
Comment thread
aduh95 marked this conversation as resolved.
Outdated
/>

<div className={`${style.main} peer-checked:flex`}>
<div className={style.navItems}>
Expand Down
1 change: 1 addition & 0 deletions apps/site/components/Icons/Logos/Nodejs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const Nodejs: FC<NodeJsLogoProps> = ({
height="80"
viewBox="0 0 267 80"
fill="none"
aria-label="Node.js logo"
Comment thread
aduh95 marked this conversation as resolved.
Outdated
xmlns="http://www.w3.org/2000/svg"
className={classNames('fill-[#333333] dark:fill-white', className)}
{...props}
Expand Down
4 changes: 3 additions & 1 deletion packages/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
},
"navBar": {
"links": {
"open": "Show navigation menu",
"close": "Close navigation menu",
"about": "About",
"download": "Download",
"docs": "Docs",
Expand Down Expand Up @@ -285,4 +287,4 @@
}
}
}
}
}
Comment thread
aduh95 marked this conversation as resolved.
Outdated