1
0
Fork 0

fix(dev): Add theme picker to mobile menu

This commit is contained in:
joostdecock 2022-11-25 20:22:54 +01:00
parent 4f0a4062ce
commit de89826a07
2 changed files with 35 additions and 1 deletions

View file

@ -1,8 +1,11 @@
import { useRouter } from 'next/router'
// Shared components
import Aside from 'site/components/navigation/aside.js'
import ThemePicker from 'shared/components/theme-picker.js'
import Breadcrumbs from 'shared/components/breadcrumbs.js'
import { getCrumbs } from 'shared/utils'
import HomeIcon from 'shared/components/icons/home.js'
import Link from 'next/link'
const DefaultLayout = ({ app, title = false, crumbs = false, children = [] }) => {
const router = useRouter()
@ -11,7 +14,20 @@ const DefaultLayout = ({ app, title = false, crumbs = false, children = [] }) =>
return (
<div className="grid grid-cols-4 m-auto justify-center place-items-stretch">
<Aside app={app} slug={slug} />
<Aside
app={app}
slug={slug}
before={[
<div className="flex flex-row items-center justify-between border-b mb-4">
<Link href="/">
<a>
<HomeIcon />
</a>
</Link>
<ThemePicker app={app} />
</div>,
]}
/>
<section className="col-span-4 lg:col-span-3 py-24 px-4 lg:pl-8 bg-base-50">
{title && (
<div className="xl:pl-4">