fix: Sidebar stick to left. Fit content for different desktop viewports

This commit is contained in:
Hafid Nur
2025-03-27 23:15:11 +07:00
parent a4ca53004f
commit c374c97e66
5 changed files with 8 additions and 8 deletions
+2 -2
View File
@@ -5,9 +5,9 @@ import { BackofficeSidebar } from '@imphnen-frontend-service/ui/organisms';
export const AppLayout: FC = (): ReactElement => {
return (
<div className="bg-primary-50 min-h-screen flex justify-center">
<div className="bg-primary-50 min-h-screen max-w-[1280px] w-full flex">
<div className="bg-primary-50 min-h-screen w-full flex">
<BackofficeSidebar />
<div className="flex-1 overflow-auto">
<div className="flex-1 overflow-auto lg:max-w-[1000px] mr-auto">
<Outlet />
</div>
</div>
+2 -2
View File
@@ -5,9 +5,9 @@ import { BackofficeSidebar } from '@imphnen-frontend-service/ui/organisms';
export const AppLayout: FC = (): ReactElement => {
return (
<div className="bg-primary-50 min-h-screen flex justify-center">
<div className="bg-primary-50 min-h-screen max-w-[1280px] w-full flex">
<div className="bg-primary-50 min-h-screen w-full flex">
<BackofficeSidebar />
<div className="flex-1 overflow-auto">
<div className="flex-1 overflow-auto lg:max-w-[1000px] mr-auto">
<Outlet />
</div>
</div>
+1 -1
View File
@@ -101,7 +101,7 @@ export const Components: FC = (): ReactElement => {
<img
src="gacha.png"
alt=""
className="rounded-lg min-w-[436px] h-auto object-cover"
className="rounded-lg hidden xl:block xl:min-w-[436px] h-auto object-cover"
/>
</div>
</main>
@@ -5,9 +5,9 @@ import { BackofficeSidebar } from '@imphnen-frontend-service/ui/organisms';
export const AppLayout: FC = (): ReactElement => {
return (
<div className="bg-primary-50 min-h-screen flex justify-center">
<div className="bg-primary-50 min-h-screen max-w-[1280px] w-full flex">
<div className="bg-primary-50 min-h-screen w-full flex">
<BackofficeSidebar />
<div className="flex-1 overflow-auto">
<div className="flex-1 overflow-auto lg:max-w-[1000px] mr-auto">
<Outlet />
</div>
</div>
@@ -14,7 +14,7 @@ export const BackofficeSidebar: FC = (): ReactElement => {
const isActive = (path: string) => location.pathname.includes(path);
return (
<aside className="w-[280px] bg-white min-h-screen py-[60px] px-[28px] shadow-xl flex flex-col justify-between">
<aside className="sticky top-0 left-0 w-[280px] bg-white min-h-screen py-[60px] px-[28px] shadow-xl flex flex-col justify-between">
<div className="flex flex-col gap-20 justify-between items-center">
{/* Logo */}
<img src="/logos/simple.svg" alt="IMPHNEN Logo" className="w-[150px]" />