refactor: implement scroll container context and flex layout
Switch from fixed positioning to a flexbox-based layout for the main application structure. This introduces a `ScrollContainerCtx` to provide access to the main scrollable element, allowing child components like `FileTree` and `RevealManager` to perform accurate scrolling and positioning relative to the container instead of the window. refactor: set JournalPanel height to full
This commit is contained in:
@@ -158,7 +158,7 @@ export const MobileSidebar: Component<SidebarProps> = (props) => {
|
||||
};
|
||||
|
||||
/**
|
||||
* 桌面端固定侧边栏
|
||||
* 桌面端侧边栏 — flex child, no fixed positioning
|
||||
*/
|
||||
export const DesktopSidebar: Component<{
|
||||
fileTree?: FileNode[];
|
||||
@@ -182,7 +182,7 @@ export const DesktopSidebar: Component<{
|
||||
});
|
||||
|
||||
return (
|
||||
<aside class="hidden md:block fixed top-0 left-0 h-full w-64 bg-white shadow-lg z-30 overflow-hidden pt-16">
|
||||
<aside class="hidden md:flex flex-col w-64 shrink-0 bg-white shadow-lg overflow-hidden">
|
||||
<SidebarContent
|
||||
fileTree={fileTree()}
|
||||
pathHeadings={pathHeadings()}
|
||||
|
||||
Reference in New Issue
Block a user