mirror of
https://github.com/zoriya/v10.git
synced 2026-08-16 02:45:09 +00:00
feat(website): init dark mode
This commit is contained in:
@@ -33,7 +33,7 @@ export function TableOfContentsDesktop({ headings, activeId, onNavigate, classNa
|
||||
<a
|
||||
href={`#${heading.slug}`}
|
||||
onClick={e => handleClick(e, heading.slug)}
|
||||
className={clsx('text-sm block', activeId === heading.slug ? 'text-dark-100' : 'text-dark-40 intent:text-dark-100',
|
||||
className={clsx('text-sm block', activeId === heading.slug ? 'text-dark-100 dark:text-light-100' : 'text-dark-40 dark:text-light-40 intent:text-dark-100 dark:intent:text-light-100',
|
||||
)}
|
||||
style={{ paddingLeft: `calc(${(heading.depth - 2)} * var(--spacing) * 4)` }}
|
||||
>
|
||||
|
||||
@@ -24,7 +24,7 @@ export function TableOfContentsMobile({ headings, activeId, onNavigate, classNam
|
||||
|
||||
return (
|
||||
<div
|
||||
className={clsx('border-b border-light-40 bg-light-80 px-6 lg:px-12 h-(--h) flex items-center', className)}
|
||||
className={clsx('border-b border-light-40 dark:border-dark-80 bg-light-80 dark:bg-dark-100 px-6 lg:px-12 h-(--h) flex items-center', className)}
|
||||
style={{ '--h': 'var(--mobile-toc-h)' } as React.CSSProperties}
|
||||
>
|
||||
<div className="w-full max-w-3xl mx-auto">
|
||||
|
||||
Reference in New Issue
Block a user