fix: 修复侧边栏布局——sidebar与main-content并排显示

This commit is contained in:
thzxx
2026-05-21 11:59:56 +08:00
parent f6f1c4f717
commit 9ac07d376b
2 changed files with 25 additions and 13 deletions
+16 -13
View File
@@ -91,21 +91,23 @@
<button id="btn-dismiss" class="banner-btn">忽略</button> <button id="btn-dismiss" class="banner-btn">忽略</button>
</div> </div>
<!-- Sidebar --> <!-- Workspace: Sidebar + Main Content -->
<div id="sidebar"> <div id="workspace">
<div id="sidebar-header"> <!-- Sidebar -->
<span id="sidebar-title">资源管理器</span> <div id="sidebar">
<button id="btn-open-folder" class="sidebar-header-btn" title="打开文件夹"> <div id="sidebar-header">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <span id="sidebar-title">资源管理器</span>
<path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"></path> <button id="btn-open-folder" class="sidebar-header-btn" title="打开文件夹">
</svg> <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
</button> <path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"></path>
</svg>
</button>
</div>
<div id="sidebar-tree"></div>
</div> </div>
<div id="sidebar-tree"></div>
</div>
<!-- Main content area --> <!-- Main content area -->
<div id="main-content"> <div id="main-content">
<!-- Editor panel --> <!-- Editor panel -->
<div id="editor-panel"> <div id="editor-panel">
<!-- Search & Replace Bar --> <!-- Search & Replace Bar -->
@@ -143,6 +145,7 @@
<div id="preview" class="markdown-body"></div> <div id="preview" class="markdown-body"></div>
</div> </div>
</div> </div>
</div>
<!-- Status bar --> <!-- Status bar -->
<div id="statusbar"> <div id="statusbar">
+9
View File
@@ -66,6 +66,7 @@ html, body {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
height: 100vh; height: 100vh;
position: relative;
} }
/* ===== Toolbar ===== */ /* ===== Toolbar ===== */
@@ -297,6 +298,14 @@ html, body {
} }
/* ===== Main Content ===== */ /* ===== Main Content ===== */
#workspace {
flex: 1;
display: flex;
flex-direction: row;
overflow: hidden;
min-height: 0;
}
#main-content { #main-content {
flex: 1; flex: 1;
display: flex; display: flex;