feat: 新增本地背景功能与民谣歌单,重构背景切换逻辑
1. 新增两个后台接口获取本地背景文件列表和随机背景 2. 重构页面背景切换系统,增加本地默认背景模式并支持本地存储配置 3. 调整背景切换按钮样式为纯图标风格,新增本地模式开关 4. 新增民谣精选歌单文件 5. 优化主题轮播逻辑,支持本地背景自动轮换
This commit is contained in:
+47
-17
@@ -12,28 +12,39 @@
|
||||
--card-text-color: #f8fafc;
|
||||
}
|
||||
|
||||
/* 顶部右侧滑块(打开方式) */
|
||||
/* 顶部右侧滑块(打开方式 + 本地背景) */
|
||||
.top-right-controls {
|
||||
position: fixed;
|
||||
top: 16px;
|
||||
right: 16px;
|
||||
z-index: 1000;
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
align-items: center;
|
||||
}
|
||||
.ios-switch {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
display: inline-flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 2px;
|
||||
width: 52px;
|
||||
height: 28px;
|
||||
height: 46px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.ios-switch input {
|
||||
opacity: 0;
|
||||
width: 0;
|
||||
height: 0;
|
||||
position: absolute;
|
||||
top: 16px;
|
||||
}
|
||||
.ios-switch .slider {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: 28px;
|
||||
background: linear-gradient(135deg, #334155, #0f172a);
|
||||
border: 1px solid rgba(255,255,255,0.15);
|
||||
border-radius: 999px;
|
||||
@@ -283,26 +294,45 @@ body {
|
||||
|
||||
|
||||
|
||||
/* 换背景按钮 */
|
||||
.change-background-btn {
|
||||
/* 换背景按钮容器(按钮 + 本地模式开关) */
|
||||
.bg-btn-wrapper {
|
||||
position: fixed;
|
||||
bottom: 2rem;
|
||||
right: 2rem;
|
||||
background: rgba(255, 255, 255, 0.2);
|
||||
border: 1px solid rgba(255, 255, 255, 0.3);
|
||||
border-radius: 50px;
|
||||
padding: 0.75rem 1.5rem;
|
||||
color: var(--text-light);
|
||||
font-size: 0.9rem;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
backdrop-filter: blur(10px);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
/* 换背景按钮(仅图标) */
|
||||
.change-background-btn {
|
||||
background: transparent;
|
||||
border: none;
|
||||
border-radius: 50%;
|
||||
width: auto;
|
||||
height: auto;
|
||||
padding: 2px;
|
||||
color: var(--text-light);
|
||||
font-size: 1.6rem;
|
||||
line-height: 1;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s ease;
|
||||
backdrop-filter: none;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.change-background-btn:hover {
|
||||
background: rgba(255, 255, 255, 0.3);
|
||||
transform: translateY(-2px);
|
||||
background: rgba(255, 255, 255, 0.2);
|
||||
outline: 1px solid rgba(255, 255, 255, 0.3);
|
||||
backdrop-filter: blur(10px);
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
.change-background-btn::after {
|
||||
content: '🎨';
|
||||
}
|
||||
|
||||
/* 响应式设计 */
|
||||
|
||||
Reference in New Issue
Block a user