koishi-plugin-ll-mc 2.2.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,410 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="zh-CN">
3
- <head>
4
- <meta charset="UTF-8">
5
- <meta http-equiv="Content-Security-Policy" content="default-src 'self'; img-src 'self' https: data:; font-src 'self' file: data:; style-src 'self' 'unsafe-inline' https:;">
6
- <meta http-equiv="X-Content-Type-Options" content="nosniff">
7
- <meta http-equiv="X-Frame-Options" content="DENY">
8
- <meta http-equiv="X-XSS-Protection" content="1; mode=block">
9
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
10
- <title>{{title }}</title>
11
- <style>
12
- {{ custom_font_css | safe }}
13
- {% raw %}
14
- * {
15
- margin: 0;
16
- padding: 0;
17
- box-sizing: border-box;
18
- }
19
-
20
- body {
21
- font-family: var(--message-stats-font-family, 'Microsoft YaHei', 'Segoe UI', sans-serif);
22
- background: linear-gradient(135deg, #E9EFF6 0%, #D6E4F0 100%);
23
- padding: 40px;
24
- min-height: 100vh;
25
- color: #1F2937;
26
- }
27
-
28
- .container {
29
- max-width: 900px;
30
- margin: 0 auto;
31
- }
32
-
33
- .header {
34
- text-align: center;
35
- margin-bottom: 40px;
36
- }
37
-
38
- .group-info {
39
- font-size: 24px;
40
- color: #1F2937;
41
- margin-bottom: 10px;
42
- font-weight: 500;
43
- }
44
-
45
- .title {
46
- font-size: 32px;
47
- color: #1F2937;
48
- margin-bottom: 15px;
49
- font-weight: 700;
50
- }
51
-
52
- .total-messages {
53
- font-size: 18px;
54
- color: #6B7280;
55
- font-weight: 500;
56
- margin-bottom: 20px;
57
- }
58
-
59
- .rank-number {
60
- width: 60px;
61
- text-align: center;
62
- margin-right: 25px;
63
- font-weight: bold;
64
- }
65
-
66
- .user_list {
67
- margin-bottom: 30px;
68
- }
69
-
70
- .list-title {
71
- font-size: 24px;
72
- color: #1F2937;
73
- margin-bottom: 25px;
74
- text-align: center;
75
- font-weight: 600;
76
- border-bottom: 2px solid #E5E7EB;
77
- padding-bottom: 15px;
78
- }
79
-
80
- /* 排行榜白色卡片容器 */
81
- .rank-card {
82
- background: #FFFFFF;
83
- border-radius: 20px;
84
- padding: 16px;
85
- margin: 20px 0;
86
- box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
87
- overflow: hidden;
88
- }
89
-
90
- .user-item {
91
- display: flex;
92
- align-items: center;
93
- padding: 16px;
94
- border-bottom: 1px solid #E5E7EB;
95
- transition: all 0.3s ease;
96
- margin-bottom: 0;
97
- }
98
-
99
- .user-item:hover {
100
- background: #F9FAFB;
101
- transform: translateX(5px);
102
- }
103
-
104
- .user-item:last-child {
105
- border-bottom: none;
106
- }
107
-
108
- .user-item-current {
109
- display: flex;
110
- align-items: center;
111
- padding: 16px;
112
- border-bottom: 1px solid #E5E7EB;
113
- transition: all 0.3s ease;
114
- background: #F3E8FF;
115
- border-radius: 16px;
116
- margin: 0 4px;
117
- box-shadow: 0 4px 12px rgba(168, 85, 247, 0.2);
118
- }
119
-
120
- .user-item-current:hover {
121
- background: #E9D5FF;
122
- transform: translateX(5px);
123
- box-shadow: 0 6px 16px rgba(168, 85, 247, 0.3);
124
- }
125
-
126
- .rank {
127
- width: 60px;
128
- height: 60px;
129
- border-radius: 50%;
130
- display: flex;
131
- align-items: center;
132
- justify-content: center;
133
- font-size: 20px;
134
- font-weight: bold;
135
- color: white;
136
- margin-right: 25px;
137
- box-shadow: 0 4px 8px rgba(0,0,0,0.2);
138
- position: relative;
139
- }
140
-
141
- .rank-1 {
142
- background: #3B82F6;
143
- }
144
-
145
- .rank-2 {
146
- background: #6B7280;
147
- }
148
-
149
- .rank-3 {
150
- background: #8B5CF6;
151
- }
152
-
153
- .rank-other {
154
- background: #3B82F6;
155
- }
156
-
157
- .rank-current {
158
- background: #EF4444;
159
- animation: pulse 2s infinite;
160
- }
161
-
162
- @keyframes pulse {
163
- 0% {
164
- box-shadow: 0 4px 8px rgba(239, 68, 68, 0.3);
165
- }
166
-
167
- 50% {
168
- box-shadow: 0 4px 20px rgba(239, 68, 68, 0.6);
169
- }
170
-
171
- 100% {
172
- box-shadow: 0 4px 8px rgba(239, 68, 68, 0.3);
173
- }
174
- }
175
-
176
- .avatar {
177
- width: 75px;
178
- height: 75px;
179
- border-radius: 50%;
180
- margin: 0 30px;
181
- border: 3px solid #FFFFFF;
182
- box-shadow: 0 0 0 1px rgba(0,0,0,0.05), 0 4px 12px rgba(0,0,0,0.15), 0 2px 4px rgba(0,0,0,0.1);
183
- transition: all 0.3s ease;
184
- }
185
-
186
- .avatar:hover {
187
- transform: scale(1.05);
188
- }
189
-
190
- .info {
191
- flex: 1;
192
- display: flex;
193
- justify-content: space-between;
194
- align-items: center;
195
- }
196
-
197
- .name-date {
198
- display: flex;
199
- flex-direction: column;
200
- min-width: 0;
201
- flex: 1;
202
- }
203
-
204
- /* 昵称行:昵称 + 头衔 同行左对齐 */
205
- .nickname-row {
206
- display: flex;
207
- align-items: center;
208
- gap: 10px;
209
- margin-bottom: 6px;
210
- min-width: 0;
211
- }
212
-
213
- .nickname {
214
- font-size: 24px;
215
- color: #1F2937;
216
- font-weight: 600;
217
- line-height: 1.3;
218
- }
219
-
220
- .nickname-with-title {
221
- max-width: 380px;
222
- overflow: hidden;
223
- text-overflow: ellipsis;
224
- white-space: nowrap;
225
- }
226
-
227
- .user-title {
228
- font-size: 13px;
229
- font-weight: 700;
230
- padding: 0px 8px;
231
- border-radius: 10px;
232
- letter-spacing: 0.5px;
233
- white-space: nowrap;
234
- flex-shrink: 0;
235
- display: inline-block;
236
- vertical-align: middle;
237
- line-height: 24px;
238
- }
239
-
240
- .date {
241
- color: #6B7280;
242
- font-size: 15px;
243
- font-weight: 400;
244
- }
245
-
246
- .stats {
247
- text-align: right;
248
- display: flex;
249
- flex-direction: column;
250
- align-items: flex-end;
251
- flex-shrink: 0;
252
- margin-left: 20px;
253
- }
254
-
255
- .count {
256
- font-size: 28px;
257
- font-weight: 700;
258
- color: #EF4444;
259
- margin-bottom: 8px;
260
- }
261
-
262
- .percentage {
263
- font-size: 17px;
264
- color: #22C55E;
265
- font-weight: 500;
266
- }
267
-
268
- .separator {
269
- height: 30px;
270
- border-top: 2px dashed #D1D5DB;
271
- margin: 20px 0;
272
- position: relative;
273
- }
274
-
275
- .separator::after {
276
- content: "▼ 其他用户 ▼";
277
- position: absolute;
278
- top: -12px;
279
- left: 50%;
280
- transform: translateX(-50%);
281
- background: #FFFFFF;
282
- padding: 0 15px;
283
- color: #6B7280;
284
- font-size: 12px;
285
- }
286
-
287
- .footer {
288
- text-align: center;
289
- margin-top: 40px;
290
- color: #6B7280;
291
- font-size: 15px;
292
- font-weight: 500;
293
- }
294
-
295
- .loading {
296
- text-align: center;
297
- padding: 40px;
298
- color: #7f8c8d;
299
- font-style: italic;
300
- }
301
-
302
- /* 响应式设计 */
303
- @media (max-width: 768px) {
304
- body {
305
- padding: 15px;
306
- }
307
-
308
- .header {
309
- padding: 20px;
310
- }
311
-
312
- .group-info {
313
- font-size: 20px;
314
- }
315
-
316
- .title {
317
- font-size: 24px;
318
- }
319
-
320
- .user-item {
321
- padding: 12px;
322
- }
323
-
324
- .rank {
325
- width: 50px;
326
- height: 50px;
327
- font-size: 18px;
328
- margin-right: 20px;
329
- }
330
-
331
- .avatar {
332
- width: 60px;
333
- height: 60px;
334
- margin: 0 20px;
335
- }
336
-
337
- .nickname {
338
- font-size: 20px;
339
- max-width: 120px;
340
- }
341
-
342
- .count {
343
- font-size: 20px;
344
- }
345
- }
346
-
347
- /* 打印样式 */
348
- @media print {
349
- body {
350
- background: white;
351
- padding: 20px;
352
- }
353
-
354
- .user-item:hover {
355
- transform: none;
356
- box-shadow: none;
357
- }
358
-
359
- .rank-current {
360
- animation: none;
361
- }
362
- }
363
- {% endraw %}
364
- </style>
365
- </head>
366
- <body>
367
- <div class="container">
368
- <div class="header">
369
- <div class="group-info">{{ group_name }}{% if show_group_id %}[{{ group_id }}]{% endif %}</div>
370
- <div class="title">{{ title }}</div>
371
- <div class="total-messages">总发言数:{{ total_messages }} 条</div>
372
- </div>
373
-
374
- <div class="user-list">
375
- <div class="rank-card">
376
- {% for item in user_items %}
377
- <div class="{{ 'user-item-current' if item.is_current_user else 'user-item' }}"
378
- style="{{ 'margin-top: 20px; border-top: 2px dashed #bdc3c7;' if item.is_separator else '' }}">
379
- <div class="rank-number" style="color: #3B82F6; font-weight: bold; font-size: 36px;">#{{ item.rank }}</div>
380
- <img class="avatar" src="{{ item.avatar_url }}" style="border-color: #ffffff; border-width: 3px; border-style: solid;" />
381
- <div class="info">
382
- <div class="name-date">
383
- <div class="nickname-row">
384
- <div class="nickname{% if item.title %} nickname-with-title{% endif %}" title="{{ item.nickname }}">{{ item.nickname }}</div>
385
- {% if item.title %}
386
- <div class="user-title" style="color:{{ item.title_color or '#7C3AED' }};background:{{ (item.title_color or '#7C3AED') + '22' }};">「{{ item.title }}」</div>
387
- {% endif %}
388
- </div>
389
- <div class="date">最近发言: {{ item.last_date }}</div>
390
- </div>
391
- <div class="stats">
392
- <div class="count">{{ item.total }} 次</div>
393
- <div class="percentage">({{ "%.2f"|format(item.percentage) }}%)</div>
394
- </div>
395
- </div>
396
- </div>
397
- {% endfor %}
398
- </div>
399
- </div>
400
-
401
- <div class="footer">
402
- <p>🤖 由 ll-mc 发言统计插件生成</p>
403
- <p>生成时间: {{ current_time }}</p>
404
- {% if llm_token_info %}
405
- <p style="font-size: 13px; color: #8B5CF6; margin-top: 4px;">{{ llm_token_info }}</p>
406
- {% endif %}
407
- </div>
408
- </div>
409
- </body>
410
- </html>