Added initial focus trap during exercises/exams

This commit is contained in:
Joao Ramos
2023-08-16 00:08:20 +01:00
parent dd0acbea61
commit 93a5bcf40f
10 changed files with 2940 additions and 3359 deletions

View File

@@ -9,19 +9,20 @@ interface Props {
children: React.ReactNode;
className?: string;
navDisabled?: boolean;
focusMode?: boolean
}
export default function Layout({user, children, className, navDisabled = false}: Props) {
export default function Layout({user, children, className, navDisabled = false, focusMode = false}: Props) {
const router = useRouter();
return (
<main className="w-full min-h-full h-screen flex flex-col bg-mti-gray-smoke">
<Navbar user={user} navDisabled={navDisabled} />
<div className="h-full w-full flex py-4 pb-8 gap-2">
<Sidebar path={router.pathname} navDisabled={navDisabled} />
<Navbar user={user} navDisabled={navDisabled} focusMode={focusMode} />
<div className="h-full w-full flex gap-2">
<Sidebar path={router.pathname} navDisabled={navDisabled} focusMode={focusMode} />
<div
className={clsx(
"w-5/6 min-h-full h-fit mr-8 bg-white shadow-md rounded-2xl p-12 pb-8 flex flex-col gap-12 relative overflow-hidden",
"w-5/6 min-h-full h-fit mr-8 bg-white shadow-md rounded-2xl p-12 pb-8 flex flex-col gap-12 relative overflow-hidden mt-2",
className,
)}>
{children}