invokerx commited on
Commit
fb2fd29
·
verified ·
1 Parent(s): 7ef9d6c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -71
app.py CHANGED
@@ -275,77 +275,7 @@ img{
275
  color: rgba(80, 10, 30, .78) !important;
276
  }
277
  """
278
- css += """
279
- /* ===== 年份 Accordion:去黑条,改成奶油粉温馨交互 ===== */
280
- .year-acc{
281
- border-radius: 18px !important;
282
- border: 1px solid rgba(214,51,132,.16) !important;
283
- background: rgba(255,255,255,.65) !important;
284
- box-shadow: 0 8px 20px rgba(214,51,132,.08) !important;
285
- overflow: hidden;
286
- position: relative;
287
- }
288
-
289
- /* ✅ 左侧“那一列/竖条”:用粉色渐变替代黑色 */
290
- .year-acc::before{
291
- content: "";
292
- position: absolute;
293
- left: 0; top: 0; bottom: 0;
294
- width: 8px;
295
- background: linear-gradient(180deg, rgba(255, 90, 168, .65), rgba(255, 180, 210, .55));
296
- }
297
-
298
- /* 标题行(收起/展开那条) */
299
- .year-acc .label-wrap{
300
- background: linear-gradient(135deg, rgba(255, 223, 238, .75), rgba(255,255,255,.75)) !important;
301
- border-bottom: 1px solid rgba(214,51,132,.12) !important;
302
- padding-left: 10px !important; /* 给左侧粉条留空间 */
303
- }
304
-
305
- /* 标题文字:温柔莓果色 */
306
- .year-acc .label,
307
- .year-acc .label span,
308
- .year-acc .label-wrap span{
309
- color: rgba(176, 42, 91, .92) !important;
310
- font-weight: 800 !important;
311
- }
312
 
313
- /* 箭头/图标:别用黑色 */
314
- .year-acc svg{
315
- color: rgba(176, 42, 91, .75) !important;
316
- fill: rgba(176, 42, 91, .75) !important;
317
- }
318
-
319
- /* 内容区背景 */
320
- .year-acc .wrap,
321
- .year-acc .panel,
322
- .year-acc .content{
323
- background: rgba(255,255,255,.55) !important;
324
- }
325
-
326
- /* hover:轻轻抬起、粉条更亮 */
327
- .year-acc:hover{
328
- transform: translateY(-1px);
329
- box-shadow: 0 12px 28px rgba(214,51,132,.14) !important;
330
- }
331
- .year-acc:hover::before{
332
- background: linear-gradient(180deg, rgba(255, 90, 168, .85), rgba(255, 180, 210, .75));
333
- }
334
-
335
- /* 展开态:标题更亮一点(不同 gradio 版本 class 不同,写多个兜底) */
336
- .year-acc[open] .label-wrap,
337
- .year-acc.open .label-wrap,
338
- .year-acc:has(.wrap) .label-wrap{
339
- background: linear-gradient(135deg, rgba(255, 210, 232, .9), rgba(255,255,255,.85)) !important;
340
- }
341
-
342
- /* Markdown 文本颜色更柔 */
343
- .year-acc .md,
344
- .year-acc p,
345
- .year-acc em{
346
- color: rgba(80, 10, 30, .78) !important;
347
- }
348
- """
349
 
350
 
351
 
@@ -361,7 +291,7 @@ with gr.Blocks(title="💕 9周年纪念", theme=gr.themes.Soft(primary_hue="pin
361
  with gr.Tab("🎵 九年歌曲集"):
362
  gr.Markdown("## 🎵 九年,唱不尽的爱")
363
  for song in SONGS_CONFIG:
364
- with gr.Accordion(f"💗 {song['year']} 年", open=False):
365
  gr.Markdown(f"*{song['message']}*")
366
  with gr.Row():
367
  cloned = get_audio_path(song, "cloned")
 
275
  color: rgba(80, 10, 30, .78) !important;
276
  }
277
  """
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
278
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
279
 
280
 
281
 
 
291
  with gr.Tab("🎵 九年歌曲集"):
292
  gr.Markdown("## 🎵 九年,唱不尽的爱")
293
  for song in SONGS_CONFIG:
294
+ with gr.Accordion(f"💗 {song['year']} 年", open=False, elem_classes=["year-acc"]):
295
  gr.Markdown(f"*{song['message']}*")
296
  with gr.Row():
297
  cloned = get_audio_path(song, "cloned")