From b606e15951dc34ef9057018bfa84b27e4d5055f4 Mon Sep 17 00:00:00 2001 From: Mahdi Date: Sun, 30 Aug 2026 10:28:38 +0330 Subject: [PATCH] Pin sidebar to full viewport height with sticky layout. Keep logout at the foot while the page content scrolls independently. Co-authored-by: Cursor --- apps/web/src/layouts/AppLayout.vue | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/apps/web/src/layouts/AppLayout.vue b/apps/web/src/layouts/AppLayout.vue index 07ce95b..08956f7 100644 --- a/apps/web/src/layouts/AppLayout.vue +++ b/apps/web/src/layouts/AppLayout.vue @@ -415,17 +415,19 @@ onUnmounted(() => { } .sidebar { + position: sticky; + top: 0; + align-self: start; background: #13201b; color: #edf5f1; padding: 1.4rem; display: flex; flex-direction: column; gap: 1.1rem; - min-height: 100vh; - min-height: 100dvh; - max-height: 100vh; - max-height: 100dvh; + height: 100vh; + height: 100dvh; overflow: hidden; + box-sizing: border-box; } .brand-row { @@ -643,6 +645,12 @@ nav a.router-link-active { margin-top: auto; display: grid; gap: 0.65rem; + flex-shrink: 0; +} + +.brand-row, +.drawer-head { + flex-shrink: 0; } .user-line { @@ -917,13 +925,15 @@ nav a.router-link-active { bottom: 0; inset-inline-start: 0; width: min(300px, 86vw); + height: 100vh; + height: 100dvh; z-index: 35; /* پنل RTL است؛ منو از سمت راست می‌آید */ transform: translateX(110%); transition: transform 0.2s ease; box-shadow: none; padding-top: max(1rem, env(safe-area-inset-top)); - overflow-y: auto; + overflow: hidden; } .sidebar.open {