Fix: Prevent main content shift when desktop navbar is not persistent

This commit addresses an issue where the main content area would shift
to the right on desktop when the sidebar was opened, regardless of the
`desktopNavbarPersistent` setting.

The layout logic in `App.vue` has been updated so that the `md:pl-60`
class (which adds left padding to the main content area) is now
applied only when both `ui.sidebarOpen` and `ui.desktopNavbarPersistent`
are true.

This ensures that:
- If `desktopNavbarPersistent` is true, the sidebar will take up
  dedicated space, and the content will correctly shift.
- If `desktopNavbarPersistent` is false, the sidebar will overlay the
  content on desktop, and the main content will no longer shift.
This commit is contained in:
google-labs-jules[bot]
2025-06-10 06:18:54 +00:00
parent 20ee3fc76f
commit 405265435d
2 changed files with 2 additions and 2 deletions

View File

@@ -64,7 +64,7 @@ const transitionDurationStyle = computed(() => {
<!-- wrapper: deja espacio para TopBar (pt-14 = 56px) y, en desktop, para NavBar (pl-60) -->
<div :class="[
'pt-14 min-h-screen transition-[padding-left] duration-200',
ui.sidebarOpen ? 'md:pl-60' : '',
(ui.sidebarOpen && ui.desktopNavbarPersistent) ? 'md:pl-60' : '',
// The global style.css will handle base background and text color via body styling
// but we can keep specific overrides here if needed or theme classes.
// ui.theme === 'dark' ? 'bg-gray-800 text-gray-100' : 'bg-gray-100 text-gray-900'