DawnC commited on
Commit
2b02e90
·
1 Parent(s): d9630de

Delete styles.py

Browse files
Files changed (1) hide show
  1. styles.py +0 -785
styles.py DELETED
@@ -1,785 +0,0 @@
1
-
2
- def get_css_styles():
3
- return """
4
- .dog-info-card {
5
- border: 1px solid #e1e4e8;
6
- margin: 40px 0;
7
- padding: 0;
8
- border-radius: 12px;
9
- box-shadow: 0 2px 12px rgba(0,0,0,0.08);
10
- overflow: hidden;
11
- transition: all 0.3s ease;
12
- background: white;
13
- }
14
-
15
- .dog-info-card:hover {
16
- box-shadow: 0 4px 16px rgba(0,0,0,0.12);
17
- }
18
-
19
- .dog-info-header {
20
- padding: 24px 28px; /* 增加內距 */
21
- margin: 0;
22
- font-size: 22px;
23
- font-weight: bold;
24
- border-bottom: 1px solid #e1e4e8;
25
- }
26
-
27
- .breed-info {
28
- padding: 28px; /* 增加整體內距 */
29
- line-height: 1.6;
30
- }
31
-
32
- .section-title {
33
- font-size: 1.3em;
34
- font-weight: 700;
35
- color: #2c3e50;
36
- margin: 32px 0 20px 0;
37
- padding: 12px 0;
38
- border-bottom: 2px solid #e1e4e8;
39
- text-transform: uppercase;
40
- letter-spacing: 0.5px;
41
- display: flex;
42
- align-items: center;
43
- gap: 8px;
44
- position: relative;
45
- }
46
-
47
- .icon {
48
- font-size: 1.2em;
49
- display: inline-flex;
50
- align-items: center;
51
- justify-content: center;
52
- }
53
-
54
- .info-section, .care-section, .family-section {
55
- display: flex;
56
- flex-wrap: wrap;
57
- gap: 16px;
58
- margin-bottom: 28px; /* 增加底部間距 */
59
- padding: 20px; /* 增加內距 */
60
- background: #f8f9fa;
61
- border-radius: 12px;
62
- border: 1px solid #e1e4e8; /* 添加邊框 */
63
- }
64
-
65
- .info-item {
66
- background: white; /* 改為白色背景 */
67
- padding: 14px 18px; /* 增加內距 */
68
- border-radius: 8px;
69
- display: flex;
70
- align-items: center;
71
- gap: 10px;
72
- box-shadow: 0 2px 4px rgba(0,0,0,0.05);
73
- border: 1px solid #e1e4e8;
74
- flex: 1 1 auto;
75
- min-width: 200px;
76
- }
77
-
78
- .label {
79
- color: #666;
80
- font-weight: 600;
81
- font-size: 1.1rem;
82
- }
83
-
84
- .value {
85
- color: #2c3e50;
86
- font-weight: 500;
87
- font-size: 1.1rem;
88
- }
89
-
90
- .temperament-section {
91
- background: #f8f9fa;
92
- padding: 20px; /* 增加內距 */
93
- border-radius: 12px;
94
- margin-bottom: 28px; /* 增加間距 */
95
- color: #444;
96
- border: 1px solid #e1e4e8; /* 添加邊框 */
97
- }
98
-
99
- .description-section {
100
- background: #f8f9fa;
101
- padding: 24px; /* 增加內距 */
102
- border-radius: 12px;
103
- margin: 28px 0; /* 增加上下間距 */
104
- line-height: 1.8;
105
- color: #444;
106
- border: 1px solid #e1e4e8; /* 添加邊框 */
107
- fontsize: 1.1rem;
108
- }
109
- .description-section p {
110
- margin: 0;
111
- padding: 0;
112
- text-align: justify; /* 文字兩端對齊 */
113
- word-wrap: break-word; /* 確保長單字會換行 */
114
- white-space: pre-line; /* 保留換行但合併空白 */
115
- max-width: 100%; /* 確保不會超出容器 */
116
- }
117
-
118
- .action-section {
119
- margin-top: 24px;
120
- text-align: center;
121
- }
122
-
123
- .akc-button,
124
- .breed-section .akc-link,
125
- .breed-option .akc-link {
126
- display: inline-flex;
127
- align-items: center;
128
- padding: 14px 28px;
129
- background: linear-gradient(145deg, #00509E, #003F7F);
130
- color: white;
131
- border-radius: 12px; /* 增加圓角 */
132
- text-decoration: none;
133
- gap: 12px; /* 增加圖標和文字間距 */
134
- transition: all 0.3s ease;
135
- font-weight: 600;
136
- font-size: 1.1em;
137
- box-shadow:
138
- 0 2px 4px rgba(0,0,0,0.1),
139
- inset 0 1px 1px rgba(255,255,255,0.1);
140
- border: 1px solid rgba(255,255,255,0.1);
141
- }
142
-
143
- .akc-button:hover,
144
- .breed-section .akc-link:hover,
145
- .breed-option .akc-link:hover {
146
- background: linear-gradient(145deg, #003F7F, #00509E);
147
- transform: translateY(-2px);
148
- color: white;
149
- box-shadow:
150
- 0 6px 12px rgba(0,0,0,0.2),
151
- inset 0 1px 1px rgba(255,255,255,0.2);
152
- border: 1px solid rgba(255,255,255,0.2);
153
- }
154
- .icon {
155
- font-size: 1.3em;
156
- filter: drop-shadow(0 1px 1px rgba(0,0,0,0.2));
157
- }
158
-
159
- .warning-message {
160
- display: flex;
161
- align-items: center;
162
- gap: 8px;
163
- color: #ff3b30;
164
- font-weight: 500;
165
- margin: 0;
166
- padding: 16px;
167
- background: #fff5f5;
168
- border-radius: 8px;
169
- }
170
-
171
- .model-uncertainty-note {
172
- display: flex;
173
- align-items: center;
174
- gap: 12px;
175
- padding: 16px;
176
- background-color: #f8f9fa;
177
- border-left: 4px solid #6c757d;
178
- margin-bottom: 20px;
179
- color: #495057;
180
- border-radius: 4px;
181
- }
182
-
183
- .breeds-list {
184
- display: flex;
185
- flex-direction: column;
186
- gap: 20px;
187
- }
188
-
189
- .breed-option {
190
- background: white;
191
- border: 1px solid #e1e4e8;
192
- border-radius: 8px;
193
- overflow: hidden;
194
- }
195
-
196
- .breed-header {
197
- display: flex;
198
- align-items: center;
199
- padding: 16px;
200
- background: #f8f9fa;
201
- gap: 12px;
202
- border-bottom: 1px solid #e1e4e8;
203
- }
204
-
205
- .option-number {
206
- font-weight: 600;
207
- color: #666;
208
- padding: 4px 8px;
209
- background: #e1e4e8;
210
- border-radius: 4px;
211
- }
212
-
213
- .breed-name {
214
- font-size: 1.5em;
215
- font-weight: bold;
216
- color: #2c3e50;
217
- flex-grow: 1;
218
- }
219
-
220
- .confidence-badge {
221
- padding: 4px 12px;
222
- border-radius: 20px;
223
- font-size: 0.9em;
224
- font-weight: 500;
225
- }
226
-
227
- .breed-content {
228
- padding: 20px;
229
- }
230
- .breed-content li {
231
- margin-bottom: 8px;
232
- display: flex;
233
- align-items: flex-start; /* 改為頂部對齊 */
234
- gap: 8px;
235
- flex-wrap: wrap; /* 允許內容換行 */
236
- }
237
- .breed-content li strong {
238
- flex: 0 0 auto; /* 不讓標題縮放 */
239
- min-width: 100px; /* 給標題一個固定最小寬度 */
240
- }
241
-
242
- ul {
243
- padding-left: 0;
244
- margin: 0;
245
- list-style-type: none;
246
- }
247
-
248
- li {
249
- margin-bottom: 8px;
250
- display: flex;
251
- align-items: center;
252
- gap: 8px;
253
- }
254
- .akc-link {
255
- color: white;
256
- text-decoration: none;
257
- font-weight: 600;
258
- font-size: 1.1em;
259
- transition: all 0.3s ease;
260
- }
261
-
262
- .akc-link:hover {
263
- text-decoration: underline;
264
- color: #D3E3F0;
265
- }
266
- .tooltip {
267
- position: relative;
268
- display: inline-flex;
269
- align-items: center;
270
- gap: 4px;
271
- cursor: help;
272
- }
273
- .tooltip .tooltip-icon {
274
- font-size: 14px;
275
- color: #666;
276
- }
277
- .tooltip .tooltip-text {
278
- visibility: hidden;
279
- width: 250px;
280
- background-color: rgba(44, 62, 80, 0.95);
281
- color: white;
282
- text-align: left;
283
- border-radius: 8px;
284
- padding: 8px 10px;
285
- position: absolute;
286
- z-index: 100;
287
- bottom: 150%;
288
- left: 50%;
289
- transform: translateX(-50%);
290
- opacity: 0;
291
- transition: all 0.3s ease;
292
- font-size: 14px;
293
- line-height: 1.3;
294
- box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
295
- border: 1px solid rgba(255, 255, 255, 0.1)
296
- margin-bottom: 10px;
297
- }
298
- .tooltip.tooltip-left .tooltip-text {
299
- left: 0;
300
- transform: translateX(0);
301
- }
302
- .tooltip.tooltip-right .tooltip-text {
303
- left: auto;
304
- right: 0;
305
- transform: translateX(0);
306
- }
307
- .tooltip-text strong {
308
- color: white !important;
309
- background-color: transparent !important;
310
- display: block; /* 讓標題獨立一行 */
311
- margin-bottom: 2px; /* 增加標題下方間距 */
312
- padding-bottom: 2px; /* 加入小間距 */
313
- border-bottom: 1px solid rgba(255,255,255,0.2);
314
- }
315
- .tooltip-text {
316
- font-size: 13px; /* 稍微縮小字體 */
317
- }
318
-
319
- /* 調整列表符號和文字的間距 */
320
- .tooltip-text ul {
321
- margin: 0;
322
- padding-left: 15px; /* 減少列表符號的縮進 */
323
- }
324
-
325
- .tooltip-text li {
326
- margin-bottom: 1px; /* 減少列表項目間的間距 */
327
- }
328
- .tooltip-text br {
329
- line-height: 1.2; /* 減少行距 */
330
- }
331
-
332
- .tooltip .tooltip-text::after {
333
- content: "";
334
- position: absolute;
335
- top: 100%;
336
- left: 20%; /* 調整箭頭位置 */
337
- margin-left: -5px;
338
- border-width: 5px;
339
- border-style: solid;
340
- border-color: rgba(44, 62, 80, 0.95) transparent transparent transparent;
341
- }
342
- .tooltip-left .tooltip-text::after {
343
- left: 20%;
344
- }
345
-
346
- /* 右側箭��� */
347
- .tooltip-right .tooltip-text::after {
348
- left: 80%;
349
- }
350
- .tooltip:hover .tooltip-text {
351
- visibility: visible;
352
- opacity: 1;
353
- }
354
- .tooltip .tooltip-text::after {
355
- content: "";
356
- position: absolute;
357
- top: 100%;
358
- left: 50%;
359
- transform: translateX(-50%);
360
- border-width: 8px;
361
- border-style: solid;
362
- border-color: rgba(44, 62, 80, 0.95) transparent transparent transparent;
363
- }
364
- .uncertainty-mode .tooltip .tooltip-text {
365
- position: absolute;
366
- left: 100%;
367
- bottom: auto;
368
- top: 50%;
369
- transform: translateY(-50%);
370
- margin-left: 10px;
371
- z-index: 1000; /* 確保提示框在最上層 */
372
- }
373
-
374
- .uncertainty-mode .tooltip .tooltip-text::after {
375
- content: "";
376
- position: absolute;
377
- top: 50%;
378
- right: 100%;
379
- transform: translateY(-50%);
380
- border-width: 5px;
381
- border-style: solid;
382
- border-color: transparent rgba(44, 62, 80, 0.95) transparent transparent;
383
- }
384
- .uncertainty-mode .breed-content {
385
- font-size: 1.1rem; /* 增加字體大小 */
386
- }
387
- .description-section,
388
- .description-section p,
389
- .temperament-section,
390
- .temperament-section .value,
391
- .info-item,
392
- .info-item .value,
393
- .breed-content {
394
- font-size: 1.1rem !important; /* 使用 !important 確保覆蓋其他樣式 */
395
- }
396
-
397
- .recommendation-card {
398
- margin-bottom: 40px;
399
- }
400
-
401
- .compatibility-scores {
402
- background: #f8f9fa;
403
- padding: 24px;
404
- border-radius: 12px;
405
- margin: 20px 0;
406
- }
407
-
408
- .score-item {
409
- margin: 15px 0;
410
- }
411
-
412
- .progress-bar {
413
- height: 12px;
414
- background-color: #e9ecef;
415
- border-radius: 6px;
416
- overflow: hidden;
417
- margin: 8px 0;
418
- }
419
-
420
- .progress {
421
- height: 100%;
422
- background: linear-gradient(90deg, #34C759, #30B350);
423
- border-radius: 6px;
424
- transition: width 0.6s ease;
425
- }
426
-
427
- .percentage {
428
- float: right;
429
- color: #34C759;
430
- font-weight: 600;
431
- }
432
-
433
- .breed-details-section {
434
- margin: 30px 0;
435
- }
436
-
437
- .subsection-title {
438
- font-size: 1.2em;
439
- color: #2c3e50;
440
- margin-bottom: 20px;
441
- display: flex;
442
- align-items: center;
443
- gap: 8px;
444
- }
445
-
446
- .details-grid {
447
- display: grid;
448
- grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
449
- gap: 20px;
450
- background: #f8f9fa;
451
- padding: 20px;
452
- border-radius: 12px;
453
- border: 1px solid #e1e4e8;
454
- }
455
-
456
- .detail-item {
457
- background: white;
458
- padding: 15px;
459
- border-radius: 8px;
460
- border: 1px solid #e1e4e8;
461
- }
462
-
463
- .description-text {
464
- line-height: 1.8;
465
- color: #444;
466
- margin: 0;
467
- padding: 24px 30px; /* 調整內部間距,從 20px 改為 24px 30px */
468
- background: #f8f9fa;
469
- border-radius: 12px;
470
- border: 1px solid #e1e4e8;
471
- text-align: justify; /* 添加文字對齊 */
472
- word-wrap: break-word; /* 確保長文字會換行 */
473
- word-spacing: 1px; /* 加入字間距 */
474
- }
475
-
476
- /* 工具提示改進 */
477
- .tooltip {
478
- position: relative;
479
- display: inline-flex;
480
- align-items: center;
481
- gap: 4px;
482
- cursor: help;
483
- padding: 5px 0;
484
- }
485
-
486
- .tooltip .tooltip-text {
487
- visibility: hidden;
488
- width: 280px;
489
- background-color: rgba(44, 62, 80, 0.95);
490
- color: white;
491
- text-align: left;
492
- border-radius: 8px;
493
- padding: 12px 15px;
494
- position: absolute;
495
- z-index: 1000;
496
- bottom: calc(100% + 15px);
497
- left: 50%;
498
- transform: translateX(-50%);
499
- opacity: 0;
500
- transition: all 0.3s ease;
501
- font-size: 14px;
502
- line-height: 1.4;
503
- box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
504
- white-space: normal;
505
- }
506
-
507
- .tooltip:hover .tooltip-text {
508
- visibility: visible;
509
- opacity: 1;
510
- }
511
-
512
- .score-badge {
513
- background-color: #34C759;
514
- color: white;
515
- padding: 6px 12px;
516
- border-radius: 20px;
517
- font-size: 0.9em;
518
- margin-left: 10px;
519
- font-weight: 500;
520
- box-shadow: 0 2px 4px rgba(52, 199, 89, 0.2);
521
- }
522
-
523
- .bonus-score .tooltip-text {
524
- width: 250px;
525
- line-height: 1.4;
526
- padding: 10px;
527
- }
528
-
529
- .bonus-score .progress {
530
- background: linear-gradient(90deg, #48bb78, #68d391);
531
- }
532
-
533
- .health-section {
534
- margin: 25px 0;
535
- padding: 24px;
536
- background-color: #f8f9fb;
537
- border-radius: 12px;
538
- border: 1px solid #e1e4e8;
539
- }
540
-
541
- .health-section .subsection-title {
542
- font-size: 1.3em;
543
- font-weight: 600;
544
- margin-bottom: 20px;
545
- display: flex;
546
- align-items: center;
547
- gap: 8px;
548
- color: #2c3e50;
549
- }
550
-
551
- .health-info {
552
- background-color: white;
553
- padding: 24px;
554
- border-radius: 8px;
555
- margin: 15px 0;
556
- border: 1px solid #e1e4e8;
557
- }
558
-
559
- .health-details {
560
- font-size: 1.1rem;
561
- line-height: 1.6;
562
- }
563
-
564
- .health-details h4 {
565
- color: #2c3e50;
566
- font-size: 1.15rem;
567
- font-weight: 600;
568
- margin: 20px 0 15px 0;
569
- }
570
-
571
- .health-details h4:first-child {
572
- margin-top: 0;
573
- }
574
-
575
- .health-details ul {
576
- list-style-type: none;
577
- padding-left: 0;
578
- margin: 0 0 25px 0;
579
- }
580
-
581
- .health-details ul li {
582
- margin-bottom: 12px;
583
- padding-left: 20px;
584
- position: relative;
585
- }
586
-
587
- .health-details ul li:before {
588
- content: "•";
589
- position: absolute;
590
- left: 0;
591
- color: #2c3e50;
592
- }
593
-
594
- .health-disclaimer {
595
- margin-top: 20px;
596
- padding-top: 20px;
597
- border-top: 1px solid #e1e4e8;
598
- }
599
-
600
- .health-disclaimer p {
601
- margin: 6px 0;
602
- padding-left: 20px;
603
- position: relative;
604
- color: #888; /* 統一設定灰色 */
605
- font-size: 0.95rem;
606
- line-height: 1.5;
607
- font-style: italic;
608
- }
609
-
610
- .health-disclaimer p:before {
611
- content: "›";
612
- position: absolute;
613
- left: 0;
614
- color: #999;
615
- font-style: normal;
616
- font-weight: 500;
617
- }
618
-
619
- .health-disclaimer p:first-child {
620
- font-style: normal; /* 取消斜體 */
621
- font-weight: 500; /* 加粗 */
622
- color: #666; /* 稍深的灰色 */
623
- }
624
-
625
- .health-disclaimer p span,
626
- .health-disclaimer p strong,
627
- .health-disclaimer p em {
628
- color: inherit;
629
- }
630
-
631
- .history-container {
632
- max-width: 800px;
633
- margin: 0 auto;
634
- padding: 20px;
635
- }
636
-
637
- .history-entry {
638
- background-color: #f8f9fa;
639
- border-radius: 8px;
640
- padding: 15px;
641
- margin-bottom: 20px;
642
- box-shadow: 0 1px 3px rgba(0,0,0,0.1);
643
- }
644
-
645
- .history-header {
646
- display: flex;
647
- justify-content: space-between;
648
- align-items: center;
649
- margin-bottom: 10px;
650
- padding-bottom: 10px;
651
- border-bottom: 1px solid #eee;
652
- }
653
-
654
- .timestamp {
655
- color: #666;
656
- font-size: 0.9em;
657
- }
658
-
659
- .delete-btn {
660
- background: none;
661
- border: none;
662
- cursor: pointer;
663
- font-size: 1.2em;
664
- padding: 5px;
665
- }
666
-
667
- .delete-btn:hover {
668
- color: #dc3545;
669
- }
670
-
671
- .search-params ul {
672
- list-style: none;
673
- padding-left: 20px;
674
- }
675
-
676
- .search-params li {
677
- margin: 5px 0;
678
- color: #555;
679
- }
680
-
681
- .top-results ol {
682
- padding-left: 25px;
683
- }
684
-
685
- .top-results li {
686
- margin: 5px 0;
687
- color: #333;
688
- }
689
-
690
- .breed-item {
691
- display: flex;
692
- justify-content: space-between;
693
- align-items: center;
694
- padding: 12px 16px;
695
- margin: 8px 0;
696
- background-color: white;
697
- border-radius: 6px;
698
- border: 1px solid #e1e4e8;
699
- transition: all 0.2s ease;
700
- }
701
-
702
- .breed-item:hover {
703
- transform: translateX(5px);
704
- box-shadow: 0 2px 4px rgba(0,0,0,0.1);
705
- }
706
-
707
- .breed-rank {
708
- font-weight: 600;
709
- color: #666;
710
- margin-right: 12px;
711
- min-width: 30px;
712
- }
713
-
714
- .breed-name {
715
- flex: 1;
716
- font-weight: 500;
717
- color: #2c3e50;
718
- padding: 0 12px;
719
- }
720
-
721
- .breed-score {
722
- font-weight: 600;
723
- color: #34C759;
724
- padding: 4px 8px;
725
- border-radius: 20px;
726
- background-color: rgba(52, 199, 89, 0.1);
727
- min-width: 70px;
728
- text-align: center;
729
- }
730
-
731
- .history-entry {
732
- background-color: #f8f9fa;
733
- border-radius: 12px;
734
- padding: 20px;
735
- margin-bottom: 25px;
736
- box-shadow: 0 2px 8px rgba(0,0,0,0.05);
737
- border: 1px solid #e1e4e8;
738
- }
739
-
740
- .history-header {
741
- margin-bottom: 15px;
742
- padding-bottom: 12px;
743
- border-bottom: 1px solid #e1e4e8;
744
- }
745
-
746
- .history-header .timestamp {
747
- color: #666;
748
- font-size: 0.9em;
749
- display: flex;
750
- align-items: center;
751
- gap: 6px;
752
- }
753
-
754
- h4 {
755
- color: #2c3e50;
756
- font-size: 1.1em;
757
- margin: 18px 0 12px 0;
758
- padding: 0;
759
- }
760
-
761
- .params-list ul {
762
- list-style: none;
763
- padding-left: 0;
764
- margin: 10px 0;
765
- }
766
-
767
- .params-list li {
768
- margin: 8px 0;
769
- color: #4a5568;
770
- display: flex;
771
- align-items: center;
772
- }
773
-
774
- .empty-history {
775
- text-align: center;
776
- padding: 40px 20px;
777
- color: #666;
778
- font-size: 1.1em;
779
- background-color: #f8f9fa;
780
- border-radius: 12px;
781
- border: 1px dashed #e1e4e8;
782
- margin: 20px 0;
783
- }
784
-
785
- """