feat: Implement sidebar collapse and expand functionality
- Add CSS for collapsed sidebar state and transitions - Introduce SidebarToggle class for managing collapse/expand logic - Integrate SidebarToggle initialization in main script - Add toggle button to navbar and make mini sidebar clickable - Store sidebar collapsed state in localStorage - Filter image files and directories in view mode via FileTree - Make navbar brand clickable to navigate to collection root or home
This commit is contained in:
		| @@ -30,10 +30,18 @@ | ||||
|     <!-- Navbar --> | ||||
|     <nav class="navbar navbar-expand-lg"> | ||||
|         <div class="container-fluid"> | ||||
|             <!-- Left: Logo and Title --> | ||||
|             <span class="navbar-brand mb-0"> | ||||
|                 <i class="bi bi-markdown"></i> Markdown Editor | ||||
|             </span> | ||||
|             <!-- Left: Sidebar Toggle + Logo and Title --> | ||||
|             <div class="d-flex align-items-center gap-2"> | ||||
|                 <!-- Sidebar Toggle Button --> | ||||
|                 <button id="sidebarToggleBtn" class="btn-flat btn-flat-secondary" title="Toggle Sidebar"> | ||||
|                     <i class="bi bi-layout-sidebar"></i> | ||||
|                 </button> | ||||
|  | ||||
|                 <!-- Logo and Title (Clickable) --> | ||||
|                 <a href="/" class="navbar-brand mb-0" id="navbarBrand" style="cursor: pointer; text-decoration: none;"> | ||||
|                     <i class="bi bi-markdown"></i> Markdown Editor | ||||
|                 </a> | ||||
|             </div> | ||||
|  | ||||
|             <!-- Right: All Buttons --> | ||||
|             <div class="ms-auto d-flex gap-2 align-items-center"> | ||||
| @@ -227,6 +235,7 @@ | ||||
|     <script src="/static/js/context-menu.js" defer></script> | ||||
|     <script src="/static/js/file-upload.js" defer></script> | ||||
|     <script src="/static/js/dark-mode.js" defer></script> | ||||
|     <script src="/static/js/sidebar-toggle.js" defer></script> | ||||
|     <script src="/static/js/collection-selector.js" defer></script> | ||||
|     <script src="/static/js/editor-drop-handler.js" defer></script> | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user