|
24 | 24 | }
|
25 | 25 |
|
26 | 26 | .sub_setting{
|
27 |
| - display: inline-block; |
28 |
| - white-space: nowrap; |
29 |
| - margin: 0 auto; |
30 |
| - opacity: 1; |
31 |
| - vertical-align: middle; |
| 27 | + display: inline-block; |
| 28 | + white-space: nowrap; |
| 29 | + margin: 0 auto; |
| 30 | + opacity: 1; |
| 31 | + vertical-align: middle; |
| 32 | + line-height: 0; /* 消除行高影响 */ |
32 | 33 | }
|
33 | 34 |
|
34 |
| -.sub_div{ |
35 |
| - white-space: nowrap; |
| 35 | +.sub_setting img { |
| 36 | + vertical-align: middle; /* 确保图标垂直居中 */ |
| 37 | + display: inline-block; |
36 | 38 | }
|
37 | 39 |
|
| 40 | +/* 日间模式样式 */ |
38 | 41 | .text_show{
|
39 |
| - color: #000000; |
40 |
| - text-shadow: |
41 |
| - -0.7px -0.7px 0 #ffffff, |
42 |
| - 0.7px -0.7px 0 #ffffff, |
43 |
| - -0.7px 0.7px 0 #ffffff, |
44 |
| - 0.7px 0.7px 0 #ffffff; |
| 42 | + color: #333333; |
45 | 43 | }
|
46 | 44 |
|
47 |
| -:root[data-darkmode="true"] { |
| 45 | +.progress_bar_bg { |
| 46 | + border: 1px solid #999999; |
| 47 | + background-color: #f5f5f5; |
| 48 | +} |
48 | 49 |
|
49 |
| - #icon_wrench { |
50 |
| - -webkit-filter: invert(1); |
51 |
| - filter: invert(1); |
52 |
| - } |
53 |
| - |
54 |
| - #icon_arrow { |
55 |
| - -webkit-filter: invert(1); |
56 |
| - filter: invert(1); |
57 |
| - } |
| 50 | +.progress_bar_high { |
| 51 | + background-color: #9edd9e; |
| 52 | +} |
| 53 | + |
| 54 | +.progress_bar_medium { |
| 55 | + background-color: #ffc99f; |
| 56 | +} |
| 57 | + |
| 58 | +.progress_bar_low { |
| 59 | + background-color: #ffb9b9; |
| 60 | +} |
| 61 | + |
| 62 | +/* 夜间模式样式 */ |
| 63 | +:root[data-darkmode="true"] { |
| 64 | + #icon_wrench { |
| 65 | + -webkit-filter: invert(1); |
| 66 | + filter: invert(1); |
| 67 | + } |
| 68 | + |
| 69 | + #icon_arrow { |
| 70 | + -webkit-filter: invert(1); |
| 71 | + filter: invert(1); |
| 72 | + } |
| 73 | + |
| 74 | + .text_show{ |
| 75 | + color: #e0e0e0; |
| 76 | + } |
| 77 | + |
| 78 | + .progress_bar_bg { |
| 79 | + border: 1px solid #666666; |
| 80 | + background-color: #333333; |
| 81 | + } |
| 82 | + |
| 83 | + .progress_bar_high { |
| 84 | + background-color: #5da05d; |
| 85 | + } |
| 86 | + |
| 87 | + .progress_bar_medium { |
| 88 | + background-color: #cc8550; |
| 89 | + } |
| 90 | + |
| 91 | + .progress_bar_low { |
| 92 | + background-color: #cc6262; |
| 93 | + } |
58 | 94 | }
|
59 | 95 |
|
60 | 96 | </style>
|
|
105 | 141 |
|
106 | 142 | function progressbar_<%=idname%>(v, m, pc, np, f, t, tr) {
|
107 | 143 | return String.format(
|
108 |
| - '<div style="width:250px; max-width:500px; position:relative; border:1px solid #999999; border-radius: 6px">' + |
109 |
| - (pc >= 50 ? '<div style="background-color:#9edd9e; width:%d%%; height:36px; border-radius: 6px">' : (pc < 50 && pc >= 20 ? '<div style="background-color:#ffc99f; width:%d%%; height:35px">' : '<div style="background-color:#ffb9b9; width:%d%%; height:35px">')) + |
110 |
| - '<div style="position:absolute; left:0;' + (tr == "null" ? 'top:12px;' : 'top:0;') + 'text-align:center; width:100%%">' + |
111 |
| - '<small class="text_show">%s '+ (f ? f : '/') +' %s ' + (np ? "" : '(%s%%)') + (tr == "null" ? '<div style="visibility: hidden;">' : '<div style="visibility: visible;">') + '%s (<%:Remaining%> %s <%:days%>)</small>' + |
| 144 | + '<div class="progress_bar_bg" style="width:250px; max-width:500px; position:relative; border-radius: 6px">' + |
| 145 | + (pc >= 50 ? '<div class="progress_bar_high" style="width:%d%%; height:36px; border-radius: 6px">' : |
| 146 | + (pc < 50 && pc >= 20 ? '<div class="progress_bar_medium" style="width:%d%%; height:36px; border-radius: 6px">' : |
| 147 | + '<div class="progress_bar_low" style="width:%d%%; height:36px; border-radius: 6px">')) + |
| 148 | + '<div style="position:absolute; left:0;' + (tr == "null" ? 'top:12px;' : 'top:-2px;') + 'text-align:center; width:100%%">' + |
| 149 | + '<small class="text_show">%s '+ (f ? f : '/') +' %s ' + (np ? "" : '(%s%%)') + |
| 150 | + (tr == "null" ? '<div style="visibility: hidden;">' : '<div style="visibility: visible;">') + |
| 151 | + '%s (<%:Remaining%> %s <%:days%>)</small>' + |
112 | 152 | '</div>' +
|
113 | 153 | '</div>' +
|
114 | 154 | '</div>', pc, v, m, pc, t, tr
|
|
0 commit comments