Nav Bar correction

This commit is contained in:
Alma 2025-04-08 18:24:36 +02:00
parent af23cc7c10
commit 9822ae1a92
2 changed files with 38 additions and 24 deletions

View File

@ -2,12 +2,13 @@
export function FlowFrame() {
return (
<div className="w-full h-[calc(100vh-8rem)]">
<iframe
src="https://agilite.slm-lab.net/oidc/login"
className="w-full h-full border-none"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
allowFullScreen
<div className="h-full w-full">
<iframe
src="https://lab.slm-lab.net/flow"
className="w-full h-full border-0"
allow="fullscreen"
title="Flow Dashboard"
style={{ display: 'block' }}
/>
</div>
);

View File

@ -12,28 +12,41 @@ interface LayoutWrapperProps {
isAuthenticated: boolean;
}
export function LayoutWrapper({ children, isSignInPage, isAuthenticated }: LayoutWrapperProps) {
export function LayoutWrapper({
children,
isSignInPage,
isAuthenticated,
}: LayoutWrapperProps) {
const { currentBackground, changeBackground } = useBackgroundImage();
if (isSignInPage) {
return <>{children}</>;
}
return (
<AuthCheck>
{!isSignInPage && isAuthenticated && <MainNav />}
<div
className={isSignInPage ? "" : "min-h-screen"}
style={
!isSignInPage ? {
backgroundImage: `url('${currentBackground}')`,
backgroundSize: 'cover',
backgroundPosition: 'center',
backgroundRepeat: 'no-repeat',
backgroundAttachment: 'fixed',
cursor: 'pointer',
transition: 'background-image 0.5s ease-in-out'
} : {}
}
onClick={!isSignInPage ? changeBackground : undefined}
>
<main>{children}</main>
<div className="min-h-screen bg-black">
<nav className="h-20 bg-black/20 px-4">
{!isSignInPage && isAuthenticated && <MainNav />}
</nav>
<main className="h-[calc(100vh-5rem)]">
<div
style={
{
backgroundImage: `url('${currentBackground}')`,
backgroundSize: 'cover',
backgroundPosition: 'center',
backgroundRepeat: 'no-repeat',
backgroundAttachment: 'fixed',
cursor: 'pointer',
transition: 'background-image 0.5s ease-in-out'
}
}
onClick={!isSignInPage ? changeBackground : undefined}
>
{children}
</div>
</main>
</div>
{!isSignInPage && isAuthenticated && <Footer />}
<Toaster />