mirror of
https://github.com/zoriya/v10.git
synced 2026-08-16 02:45:09 +00:00
chore(ci): eslint + prettier → biome (#325)
This commit is contained in:
@@ -23,7 +23,12 @@ export default function MobileNav({ navLinks, currentPath, dark = false, childre
|
||||
<Dialog.Root modal>
|
||||
{/* Trigger button - hamburger menu */}
|
||||
<Dialog.Trigger
|
||||
className={clsx('sm:hidden flex items-center justify-center p-3 h-full aspect-square', dark ? 'bg-light-80 text-dark-100 intent:bg-light-40' : 'bg-dark-100 dark:bg-light-80 text-light-80 dark:text-dark-100 intent:bg-dark-80 dark:intent:bg-light-40')}
|
||||
className={clsx(
|
||||
'sm:hidden flex items-center justify-center p-3 h-full aspect-square',
|
||||
dark
|
||||
? 'bg-light-80 text-dark-100 intent:bg-light-40'
|
||||
: 'bg-dark-100 dark:bg-light-80 text-light-80 dark:text-dark-100 intent:bg-dark-80 dark:intent:bg-light-40'
|
||||
)}
|
||||
aria-label="Open navigation menu"
|
||||
>
|
||||
<Menu size={24} />
|
||||
@@ -32,19 +37,32 @@ export default function MobileNav({ navLinks, currentPath, dark = false, childre
|
||||
{/* Portal renders outside DOM hierarchy */}
|
||||
<Dialog.Portal>
|
||||
{/* Popup container */}
|
||||
<Dialog.Popup className={clsx('fixed inset-0 z-50 flex flex-col', dark ? 'bg-dark-100 text-light-100' : 'bg-light-80 dark:bg-dark-100 text-dark-100 dark:text-light-100')}>
|
||||
<Dialog.Popup
|
||||
className={clsx(
|
||||
'fixed inset-0 z-50 flex flex-col',
|
||||
dark ? 'bg-dark-100 text-light-100' : 'bg-light-80 dark:bg-dark-100 text-dark-100 dark:text-light-100'
|
||||
)}
|
||||
>
|
||||
<FilmGrain currentPath={currentPath} />
|
||||
{/* Header with close button */}
|
||||
<div
|
||||
className={clsx(
|
||||
'flex justify-between items-center pl-3 border-b',
|
||||
dark ? 'border-dark-80' : 'border-light-40 dark:border-dark-80',
|
||||
dark ? 'border-dark-80' : 'border-light-40 dark:border-dark-80'
|
||||
)}
|
||||
style={{ height: 'var(--nav-h)' }}
|
||||
>
|
||||
<Dialog.Title className="sr-only">Navigation</Dialog.Title>
|
||||
<p className="text-h5 px-3">Video.js v10</p>
|
||||
<Dialog.Close className={clsx('flex items-center justify-center p-3 h-full aspect-square', dark ? 'bg-light-80 text-dark-100 intent:bg-light-40' : 'bg-dark-100 text-light-80 intent:bg-dark-80 dark:bg-light-80 dark:text-dark-100 dark:intent:bg-light-40')} aria-label="Close navigation menu">
|
||||
<Dialog.Close
|
||||
className={clsx(
|
||||
'flex items-center justify-center p-3 h-full aspect-square',
|
||||
dark
|
||||
? 'bg-light-80 text-dark-100 intent:bg-light-40'
|
||||
: 'bg-dark-100 text-light-80 intent:bg-dark-80 dark:bg-light-80 dark:text-dark-100 dark:intent:bg-light-40'
|
||||
)}
|
||||
aria-label="Close navigation menu"
|
||||
>
|
||||
<X size={24} />
|
||||
</Dialog.Close>
|
||||
</div>
|
||||
@@ -56,33 +74,24 @@ export default function MobileNav({ navLinks, currentPath, dark = false, childre
|
||||
|
||||
{/* Navigation links */}
|
||||
<nav className="flex flex-col py-3">
|
||||
{navLinks.map(link => (
|
||||
{navLinks.map((link) => (
|
||||
<a
|
||||
key={link.href}
|
||||
href={link.href}
|
||||
className={clsx('text-lg px-6 py-3', link.matchPath && currentPath.startsWith(link.matchPath) ? 'underline' : 'intent:underline')}
|
||||
className={clsx(
|
||||
'text-lg px-6 py-3',
|
||||
link.matchPath && currentPath.startsWith(link.matchPath) ? 'underline' : 'intent:underline'
|
||||
)}
|
||||
aria-current={link.matchPath && currentPath.startsWith(link.matchPath) ? 'page' : undefined}
|
||||
>
|
||||
{link.label}
|
||||
{' '}
|
||||
{link.external ? <ArrowUpRight size="1em" /> : null}
|
||||
{link.label} {link.external ? <ArrowUpRight size="1em" /> : null}
|
||||
</a>
|
||||
))}
|
||||
<a
|
||||
href={GITHUB_REPO_URL}
|
||||
className="text-lg px-6 py-3 inline-flex items-center gap-1 intent:underline"
|
||||
>
|
||||
GitHub
|
||||
{' '}
|
||||
<ArrowUpRight size="1em" />
|
||||
<a href={GITHUB_REPO_URL} className="text-lg px-6 py-3 inline-flex items-center gap-1 intent:underline">
|
||||
GitHub <ArrowUpRight size="1em" />
|
||||
</a>
|
||||
<a
|
||||
href={DISCORD_INVITE_URL}
|
||||
className="text-lg px-6 py-3 inline-flex items-center gap-1 intent:underline"
|
||||
>
|
||||
Discord
|
||||
{' '}
|
||||
<ArrowUpRight size="1em" />
|
||||
<a href={DISCORD_INVITE_URL} className="text-lg px-6 py-3 inline-flex items-center gap-1 intent:underline">
|
||||
Discord <ArrowUpRight size="1em" />
|
||||
</a>
|
||||
</nav>
|
||||
</Dialog.Popup>
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
---
|
||||
import { DISCORD_INVITE_URL, GITHUB_REPO_URL } from '@/consts';
|
||||
import MobileNav from './MobileNav';
|
||||
|
||||
import { ArrowUpRight } from 'lucide-react';
|
||||
import Discord from '@/components/icons/Discord';
|
||||
import GitHub from '@/components/icons/GitHub';
|
||||
import FilmGrain from '../FilmGrain';
|
||||
import Search from '@/components/Search';
|
||||
import { DISCORD_INVITE_URL, GITHUB_REPO_URL } from '@/consts';
|
||||
import FilmGrain from '../FilmGrain';
|
||||
import MobileNav from './MobileNav';
|
||||
|
||||
export interface Props {
|
||||
dark?: boolean;
|
||||
|
||||
Reference in New Issue
Block a user