feat: 新增'分类展开/收起'按钮

This commit is contained in:
rbetree
2025-10-27 14:52:32 +08:00
parent 153dee9dbc
commit 886bc464d1
3 changed files with 107 additions and 8 deletions

View File

@@ -626,6 +626,42 @@ body .content.expanded {
z-index: 10;
}
/* 分类切换按钮 */
.category-toggle {
position: fixed;
bottom: 5rem;
right: 2rem;
width: 40px;
height: 40px;
border-radius: 10px;
background: linear-gradient(145deg, var(--site-card-bg-gradient-1), var(--site-card-bg-gradient-2));
color: var(--text-bright);
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
z-index: 100;
box-shadow: 0 4px 16px var(--shadow-color);
border: 1px solid var(--border-color);
}
.category-toggle:hover {
transform: translateY(-2px);
background: linear-gradient(145deg, var(--secondary-bg), var(--site-card-bg-gradient-1));
box-shadow: 0 6px 20px var(--shadow-color);
color: var(--accent-color);
}
.category-toggle:active {
transform: translateY(0);
box-shadow: 0 2px 8px var(--shadow-color);
}
.category-toggle i {
font-size: 18px;
}
/* 搜索框 */
.search-box {
position: relative;
@@ -1730,6 +1766,12 @@ body .content.expanded {
animation: glow 3s ease-in-out infinite alternate;
}
/* 移动端分类切换按钮 */
.category-toggle {
bottom: 4rem;
right: 1rem;
}
/* 分类样式优化 */
.category {
margin: 0 0.15rem 1.5rem 0.15rem;
@@ -1792,6 +1834,7 @@ body .content.expanded {
}
@media (max-width: 480px) {
.welcome-section {
padding: 0 1rem;
margin-bottom: 2rem;