diff --git a/xian_favor/api.py b/xian_favor/api.py index 634e739..e34f675 100644 --- a/xian_favor/api.py +++ b/xian_favor/api.py @@ -929,12 +929,49 @@ INDEX_TEMPLATE = ''' opacity: 0.8; } - /* 文件夹列表样式 */ - .sidebar-section .section-header { font-weight: 500; } + /* 文件夹列表样式 - 折叠式 */ + .sidebar-section { margin-bottom: 2px; } + .sidebar-section .section-header { + font-weight: 500; + display: flex; + justify-content: space-between; + align-items: center; + padding-right: 10px; + } + .sidebar-section .section-header .header-left { + display: flex; + align-items: center; + flex: 1; + } + .sidebar-section .section-header .toggle-arrow { + font-size: 10px; + margin-right: 8px; + transition: transform 0.2s; + } + .sidebar-section.expanded .section-header .toggle-arrow { + transform: rotate(90deg); + } + .sidebar-section .section-header .new-folder-btn { + font-size: 14px; + color: #adb5bd; + cursor: pointer; + padding: 2px 6px; + border-radius: 4px; + transition: all 0.2s; + background: rgba(255,255,255,0.1); + } + .sidebar-section .section-header .new-folder-btn:hover { + color: #fff; + background: #28a745; + } .folder-list { padding-left: 10px; - max-height: 150px; + max-height: 200px; overflow-y: auto; + display: none; /* 默认隐藏 */ + } + .sidebar-section.expanded .folder-list { + display: block; /* 展开时显示 */ } .folder-list a { padding: 6px 20px; @@ -1041,31 +1078,59 @@ INDEX_TEMPLATE = ''' 重点关注 -