nonebot-plugin-dialectlist 2.2.3__tar.gz → 2.2.4__tar.gz

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.
Files changed (22) hide show
  1. {nonebot_plugin_dialectlist-2.2.3 → nonebot_plugin_dialectlist-2.2.4}/PKG-INFO +1 -1
  2. {nonebot_plugin_dialectlist-2.2.3 → nonebot_plugin_dialectlist-2.2.4}/nonebot_plugin_dialectlist/__init__.py +3 -3
  3. nonebot_plugin_dialectlist-2.2.4/nonebot_plugin_dialectlist/template/css/style.css +170 -0
  4. {nonebot_plugin_dialectlist-2.2.3 → nonebot_plugin_dialectlist-2.2.4}/nonebot_plugin_dialectlist/template/rank_template.j2 +14 -6
  5. {nonebot_plugin_dialectlist-2.2.3 → nonebot_plugin_dialectlist-2.2.4}/nonebot_plugin_dialectlist/utils.py +1 -1
  6. {nonebot_plugin_dialectlist-2.2.3 → nonebot_plugin_dialectlist-2.2.4}/nonebot_plugin_dialectlist.egg-info/PKG-INFO +1 -1
  7. {nonebot_plugin_dialectlist-2.2.3 → nonebot_plugin_dialectlist-2.2.4}/pyproject.toml +1 -1
  8. nonebot_plugin_dialectlist-2.2.3/nonebot_plugin_dialectlist/template/css/style.css +0 -118
  9. {nonebot_plugin_dialectlist-2.2.3 → nonebot_plugin_dialectlist-2.2.4}/MANIFEST.in +0 -0
  10. {nonebot_plugin_dialectlist-2.2.3 → nonebot_plugin_dialectlist-2.2.4}/README.md +0 -0
  11. {nonebot_plugin_dialectlist-2.2.3 → nonebot_plugin_dialectlist-2.2.4}/nonebot_plugin_dialectlist/config.py +0 -0
  12. {nonebot_plugin_dialectlist-2.2.3 → nonebot_plugin_dialectlist-2.2.4}/nonebot_plugin_dialectlist/model.py +0 -0
  13. {nonebot_plugin_dialectlist-2.2.3 → nonebot_plugin_dialectlist-2.2.4}/nonebot_plugin_dialectlist/storage.py +0 -0
  14. {nonebot_plugin_dialectlist-2.2.3 → nonebot_plugin_dialectlist-2.2.4}/nonebot_plugin_dialectlist/template/avatar/default.jpg +0 -0
  15. {nonebot_plugin_dialectlist-2.2.3 → nonebot_plugin_dialectlist-2.2.4}/nonebot_plugin_dialectlist/template/avatar/master.jpg +0 -0
  16. {nonebot_plugin_dialectlist-2.2.3 → nonebot_plugin_dialectlist-2.2.4}/nonebot_plugin_dialectlist/time.py +0 -0
  17. {nonebot_plugin_dialectlist-2.2.3 → nonebot_plugin_dialectlist-2.2.4}/nonebot_plugin_dialectlist/usage.py +0 -0
  18. {nonebot_plugin_dialectlist-2.2.3 → nonebot_plugin_dialectlist-2.2.4}/nonebot_plugin_dialectlist.egg-info/SOURCES.txt +0 -0
  19. {nonebot_plugin_dialectlist-2.2.3 → nonebot_plugin_dialectlist-2.2.4}/nonebot_plugin_dialectlist.egg-info/dependency_links.txt +0 -0
  20. {nonebot_plugin_dialectlist-2.2.3 → nonebot_plugin_dialectlist-2.2.4}/nonebot_plugin_dialectlist.egg-info/requires.txt +0 -0
  21. {nonebot_plugin_dialectlist-2.2.3 → nonebot_plugin_dialectlist-2.2.4}/nonebot_plugin_dialectlist.egg-info/top_level.txt +0 -0
  22. {nonebot_plugin_dialectlist-2.2.3 → nonebot_plugin_dialectlist-2.2.4}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: nonebot-plugin-dialectlist
3
- Version: 2.2.3
3
+ Version: 2.2.4
4
4
  Summary: 看看你群群友有多能说
5
5
  Author-email: Chen_Xu233 <woyerpa@outlook.com>
6
6
  License: MIT
@@ -280,14 +280,14 @@ async def handle_rank(
280
280
  **model_dump(user_info),
281
281
  user_bnum=i[1],
282
282
  user_proportion=round(i[1] / total * 100, 2),
283
- user_index=cn2an.an2cn(index),
283
+ user_index=index,
284
284
  user_nickname=user_nickname,
285
285
  user_avatar_bytes=user_avatar,
286
286
  )
287
287
  user.user_gender = (
288
- "她"
288
+ "♀"
289
289
  if user_info.user_gender == "female"
290
- else "他" if user_info.user_gender == "male" else "ta"
290
+ else "♂" if user_info.user_gender == "male" else ""
291
291
  )
292
292
  rank2.append(user)
293
293
  index += 1
@@ -0,0 +1,170 @@
1
+ body {
2
+ background-color: #1A1A1A;
3
+ /* Dark gradient */
4
+ background-size: cover;
5
+ background-attachment: fixed;
6
+ /* Ensure background stays fixed during scroll */
7
+ margin: 0;
8
+ width: 100%;
9
+ height: 100%;
10
+ font-family: "text", sans-serif;
11
+ color: #E0E0E0;
12
+ /* Light gray text for better contrast */
13
+ }
14
+
15
+ @font-face {
16
+ font-family: "text";
17
+ src: url("../res/HarmonyOS_Sans_SC.woff2");
18
+ }
19
+
20
+ .container {
21
+ padding: 20px 40px;
22
+ position: relative;
23
+ display: flex;
24
+ flex-direction: column;
25
+ }
26
+
27
+ .glow {
28
+ border: 2px solid rgba(77, 228, 255, 0.8);
29
+ box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
30
+ /* Neon glow */
31
+ }
32
+
33
+ .card,
34
+ .card2 {
35
+ text-align: center;
36
+ align-content: center;
37
+ margin: 1%;
38
+ border-radius: 1rem;
39
+ /* background: rgba(25, 25, 25, 0.9); Darker background */
40
+ -webkit-backdrop-filter: blur(5px);
41
+ backdrop-filter: blur(5px);
42
+ }
43
+
44
+ .card2 {
45
+ display: flex;
46
+ justify-content: center;
47
+ flex-wrap: wrap;
48
+ flex-direction: revert;
49
+ }
50
+
51
+ .center_text {
52
+ text-align: center;
53
+ font-size: 3rem;
54
+ font-weight: 900;
55
+ color: #00FFFF;
56
+ /* Cyan color for a techno vibe */
57
+ }
58
+
59
+ .center_text2 {
60
+ text-align: center;
61
+ font-size: 1.5rem;
62
+ color: #A0A0A0;
63
+ /* Slightly lighter gray */
64
+ }
65
+
66
+ .rank_container {
67
+ display: flex;
68
+ flex-direction: column;
69
+ border-radius: 1rem;
70
+ padding: 10px 10px;
71
+ margin: 1%;
72
+ justify-content: center;
73
+ align-items: center;
74
+ /* background: rgba(30, 30, 30, 0.9); Dark background */
75
+ }
76
+
77
+ .rank_card {
78
+ display: flex;
79
+ width: 100%;
80
+ flex-direction: row;
81
+ /* border: 2px solid rgba(100, 100, 100, 0.7); */
82
+ margin: 10px 10px;
83
+ border-radius: 1rem;
84
+ align-content: center;
85
+ backdrop-filter: blur(10px);
86
+ -webkit-backdrop-filter: blur(10px);
87
+ /* background: rgba(40, 40, 40, 0.8); Slightly lighter for contrast */
88
+ }
89
+
90
+ .profile,
91
+ .profile2 {
92
+ border: 2px solid rgba(100, 100, 100, 0.7);
93
+ border-radius: 50%;
94
+ background-size: cover;
95
+ margin-right: 20px;
96
+ }
97
+
98
+ .avatar {
99
+ display: flex;
100
+ justify-content: center;
101
+ align-items: center;
102
+ }
103
+
104
+ .profile {
105
+ width: 12vw;
106
+ height: 12vw;
107
+ }
108
+
109
+ .profile2 {
110
+ width: 8%;
111
+ height: 8%;
112
+ }
113
+
114
+ .rank_card_info {
115
+ width: 100%;
116
+ display: flex;
117
+ flex-direction: column;
118
+ }
119
+
120
+ .g-container {
121
+ width: 90%;
122
+ height: 25px;
123
+ border-radius: 25px;
124
+ background: rgb(0 0 0 / 31%);
125
+ }
126
+
127
+ .g-progress {
128
+ width: 50%;
129
+ height: inherit;
130
+ border-radius: 25px 20px 20px 25px;
131
+ background: linear-gradient(90deg, rgb(0, 128, 255), rgb(255, 0, 174));
132
+ /* Neon cyan to magenta gradient */
133
+ }
134
+
135
+ .rank {
136
+ display: flex;
137
+ flex-direction: row;
138
+ align-items: center;
139
+ justify-content: center;
140
+ }
141
+
142
+ .rank_number {
143
+ margin: 50px;
144
+ font-size: 32px;
145
+ width: 32px;
146
+ height: 32px;
147
+ padding: 6px;
148
+ display: flex;
149
+ justify-content: center;
150
+ align-items: center;
151
+ font-weight: 600;
152
+ }
153
+
154
+ .rank_number_1 {
155
+ border-radius: 999px;
156
+ background-color: gold;
157
+ color: rgb(154, 105, 14);
158
+ }
159
+
160
+ .rank_number_2 {
161
+ border-radius: 999px;
162
+ background-color: silver;
163
+ color: rgb(80, 80, 80);
164
+ }
165
+
166
+ .rank_number_3 {
167
+ border-radius: 999px;
168
+ background-color: #CD7F32;
169
+ color: rgb(95 52 14);
170
+ }
@@ -9,28 +9,36 @@
9
9
  </head>
10
10
  <body>
11
11
  <div class="container">
12
- <div class="card" >
12
+ <div class="card glow" >
13
13
  <p class="center_text">话痨排行榜</p>
14
14
  </div>
15
15
 
16
- <div class="rank_container">
16
+ <div class="rank_container glow">
17
17
 
18
18
  {% for i in users %}
19
19
  <div class="rank_card">
20
- <img class="profile" src="{{ cache_path }}/{{ i.user_id }}.jpg"/>
20
+ <div class="rank">
21
+ <div class="rank_number rank_number_{{ i.user_index }}">{{ i.user_index }}</div>
22
+ </div>
23
+ <div class="avatar">
24
+ <img class="profile" src="{{ cache_path }}/{{ i.user_id }}.jpg"/>
25
+ </div>
21
26
  <div class="rank_card_info">
22
- <h1>第{{ i.user_index }}名:{{ i.user_nickname }}</h1>
27
+ <h1>{{ i.user_nickname }} {{ i.user_gender }}</h1>
23
28
  <div class="g-container">
24
29
  <div class="g-progress" style="width: {{ i.user_proportion }}%"></div>
25
30
  </div>
26
- <p>{{ i.user_gender }}一共废话了{{ i.user_bnum }}句,占比{{ i.user_proportion }}%</p>
31
+ <p>{{ i.user_proportion }}%</p>
32
+ </div>
33
+ <div class="rank">
34
+ <div class="rank_number">{{ i.user_bnum }}</div>
27
35
  </div>
28
36
  </div>
29
37
  {% endfor %}
30
38
 
31
39
  </div>
32
40
 
33
- <div class="card2">
41
+ <div class="card2 glow">
34
42
  <img class="profile2" src="{{ file_path }}/template/avatar/master.jpg"/>
35
43
  <p class="center_text2">Designed By ChenXu233</p>
36
44
  </div>
@@ -178,5 +178,5 @@ async def get_rank_image(rank: List[UserRankInfo]) -> bytes:
178
178
  "cache_path": cache_path,
179
179
  "file_path": os.path.dirname(os.path.abspath(__file__)),
180
180
  },
181
- pages={"viewport": {"width": 1100, "height": 10}},
181
+ pages={"viewport": {"width": 1000, "height": 10}},
182
182
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: nonebot-plugin-dialectlist
3
- Version: 2.2.3
3
+ Version: 2.2.4
4
4
  Summary: 看看你群群友有多能说
5
5
  Author-email: Chen_Xu233 <woyerpa@outlook.com>
6
6
  License: MIT
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "nonebot-plugin-dialectlist"
3
- version = "2.2.3"
3
+ version = "2.2.4"
4
4
  description = "看看你群群友有多能说"
5
5
  authors = [
6
6
  {name = "Chen_Xu233", email = "woyerpa@outlook.com"},
@@ -1,118 +0,0 @@
1
- body {
2
- background-image: url('https://api.yimian.xyz/img');
3
- background-attachment: scroll;
4
- margin: 0;
5
- background-size: cover;
6
- background-position: center;
7
- background-repeat: no-repeat;
8
- width: 1024;
9
- }
10
-
11
- .container {
12
- padding: 20px 40px;
13
- position: relative;
14
- flex-direction: column;
15
- display: flex;
16
- }
17
-
18
- .card {
19
- border: 5px solid rgba(200, 200, 200, 1);
20
- text-align: center; /*设置文本水平居中*/
21
- align-content: center;
22
- margin: 1% 1% 1% 1%;
23
- border-radius: 2rem;
24
- background: rgba(255, 255, 255, .2);
25
- -webkit-backdrop-filter: blur(3px);
26
- backdrop-filter: blur(3px);
27
- }
28
-
29
- .card2 {
30
- justify-content: center;
31
- flex-wrap: wrap;
32
- align-items: center;
33
- flex-direction: revert;
34
- display: flex;
35
- border: 5px solid rgba(200, 200, 200, 1);
36
- text-align: center; /*设置文本水平居中*/
37
- align-content: center;
38
- margin: 1% 1% 1% 1%;
39
- border-radius: 2rem;
40
- background: rgba(255, 255, 255, .2);
41
- -webkit-backdrop-filter: blur(3px);
42
- backdrop-filter: blur(3px);
43
- }
44
-
45
- .center_text {
46
- text-align: center;
47
- font-size: 300%;
48
- font-weight: bolder;
49
- }
50
-
51
- .center_text2 {
52
- text-align: center;
53
- font-size: 150%;
54
- }
55
-
56
- .rank_container {
57
- flex-direction: column;
58
- display: flex;
59
- border: 5px solid rgba(200, 200, 200, 1);
60
- border-radius: 2rem;
61
- padding: 10px 20px;
62
- margin: 1% 1% 1% 1%;
63
- display: flex;
64
- justify-content: center;
65
- align-items: center;
66
- background: rgba(243, 243, 240, 0.6);
67
- }
68
-
69
- .rank_card {
70
- display: flex;
71
- width: 90%;
72
- flex-direction: row;
73
- border: 3px solid rgba(255, 255, 255, 0.61);
74
- margin: 20px 10px;
75
- border-radius: 2rem;
76
- /* padding: 20px 40px; */
77
- align-content: center;
78
- backdrop-filter: blur(10px);
79
- -webkit-backdrop-filter: blur(10px);
80
- }
81
-
82
- .profile{
83
- width: 20%;
84
- height: 20%;
85
- border: 3px solid rgba(255, 255, 255, 0.61);
86
- border-radius: 2000px;
87
- background-size: cover;
88
- margin-right: 20px;
89
- }
90
-
91
- .profile2{
92
- width: 8%;
93
- height: 8%;
94
- border: 3px solid rgba(255, 255, 255, 0.61);
95
- border-radius: 2000px;
96
- background-size: cover;
97
- margin-right: 20px;
98
- }
99
-
100
- .rank_card_info {
101
- width: 100%;
102
- display: flex;
103
- flex-direction: column;
104
- }
105
-
106
- .g-container {
107
- width: 90%;
108
- height: 25px;
109
- border-radius: 25px;
110
- background: #ffb2b25d;
111
- }
112
-
113
- .g-progress {
114
- width: 50%;
115
- height: inherit;
116
- border-radius: 25px 20px 20px 25px;
117
- background: linear-gradient(90deg,rgb(57, 230, 230), rgb(21, 161, 248));
118
- }