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