wip(dev): Refactoring navigation
This commit is contained in:
parent
264e7a0b9d
commit
244f4524c4
20 changed files with 362 additions and 265 deletions
|
@ -1,26 +1,26 @@
|
|||
import { MainSections, ActiveSection } from './primary.mjs'
|
||||
import Link from 'next/link'
|
||||
|
||||
export const AsideNavigation = ({ app, slug, mobileOnly = false, before = [], after = [] }) => (
|
||||
export const AsideNavigation = ({ app, mobileOnly = false, before = [], after = [] }) => (
|
||||
<aside
|
||||
className={`
|
||||
fixed top-0 right-0 h-screen
|
||||
overflow-y-auto z-20
|
||||
bg-base-100 text-base-content
|
||||
${app.primaryMenu ? '' : 'translate-x-[-120%]'} transition-transform
|
||||
px-6 pb-20 pt-8 shrink-0
|
||||
${app.state.primaryMenu ? '' : 'translate-x-[-120%]'} transition-transform
|
||||
px-0 pb-20 pt-8 shrink-0
|
||||
|
||||
lg:w-auto
|
||||
lg:sticky lg:relative lg:transform-none
|
||||
lg:justify-center
|
||||
lg:border-r-2 lg:border-base-200 lg:bg-base-200 lg:bg-opacity-50
|
||||
lg:mt-16
|
||||
${mobileOnly ? 'block lg:hidden w-full ' : ''}
|
||||
`}
|
||||
>
|
||||
<div>
|
||||
{before}
|
||||
<MainSections app={app} active={slug} />
|
||||
<ActiveSection app={app} active={slug} />
|
||||
{after}
|
||||
</div>
|
||||
{before}
|
||||
<MainSections app={app} />
|
||||
<ActiveSection app={app} />
|
||||
{after}
|
||||
</aside>
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue