-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcontent.css
More file actions
313 lines (268 loc) · 5.59 KB
/
content.css
File metadata and controls
313 lines (268 loc) · 5.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
/* LLM Translation Assistant Styles */
.llm-assistant-container {
margin: 8px 0;
padding: 10px;
background: #f8f9fa;
border: 1px solid #e9ecef;
border-radius: 6px;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.llm-translate-btn {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
border: none;
padding: 8px 16px;
border-radius: 4px;
cursor: pointer;
font-size: 14px;
font-weight: 500;
transition: all 0.3s ease;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.llm-translate-btn:hover {
transform: translateY(-1px);
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}
.llm-translate-btn:active {
transform: translateY(0);
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.llm-translate-btn:disabled {
background: #6c757d;
cursor: not-allowed;
transform: none;
box-shadow: none;
}
.llm-result-container {
margin-top: 10px;
padding: 12px;
background: white;
border: 1px solid #dee2e6;
border-radius: 4px;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.llm-source-text {
margin-bottom: 10px;
padding: 8px 12px;
background: #f8f9fa;
border-left: 3px solid #007bff;
border-radius: 0 4px 4px 0;
font-size: 12px;
color: #6c757d;
line-height: 1.4;
}
.llm-source-text strong {
color: #495057;
font-weight: 600;
}
.llm-source-content {
word-break: break-word;
font-family: 'Courier New', monospace;
background: #ffffff;
padding: 2px 6px;
border-radius: 3px;
border: 1px solid #e9ecef;
margin-left: 4px;
}
.llm-result-text {
background: #f8f9fa;
padding: 10px;
border-radius: 4px;
border-left: 4px solid #667eea;
margin-bottom: 10px;
font-size: 14px;
line-height: 1.5;
color: #495057;
white-space: pre-wrap;
word-wrap: break-word;
}
.llm-apply-btn {
background: #28a745;
color: white;
border: none;
padding: 6px 12px;
border-radius: 4px;
cursor: pointer;
font-size: 13px;
font-weight: 500;
transition: background-color 0.3s ease;
}
.llm-apply-btn:hover {
background: #218838;
}
.llm-apply-btn:active {
background: #1e7e34;
}
/* 响应式设计 */
@media (max-width: 768px) {
.llm-assistant-container {
margin: 6px 0;
padding: 8px;
}
.llm-translate-btn {
width: 100%;
padding: 10px;
font-size: 16px;
}
.llm-result-text {
font-size: 13px;
}
.llm-apply-btn {
width: 100%;
padding: 8px;
font-size: 14px;
}
}
/* 动画效果 */
@keyframes fadeIn {
from {
opacity: 0;
transform: translateY(-10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.llm-result-container {
animation: fadeIn 0.3s ease-out;
}
/* 加载状态 */
.llm-translate-btn:disabled::after {
content: '';
display: inline-block;
width: 12px;
height: 12px;
margin-left: 8px;
border: 2px solid transparent;
border-top: 2px solid currentColor;
border-radius: 50%;
animation: spin 1s linear infinite;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
/* 确保不与现有样式冲突 */
.llm-assistant-container * {
box-sizing: border-box;
}
/* 高对比度模式支持 */
@media (prefers-contrast: high) {
.llm-translate-btn {
background: #000;
border: 2px solid #fff;
}
.llm-result-text {
border-left-color: #000;
background: #fff;
color: #000;
}
.llm-apply-btn {
background: #000;
border: 2px solid #fff;
}
}
/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
.llm-assistant-container {
background: #2d3748;
border-color: #4a5568;
color: #e2e8f0;
}
.llm-result-container {
background: #1a202c;
border-color: #4a5568;
}
.llm-result-text {
background: #2d3748;
color: #e2e8f0;
border-left-color: #667eea;
}
}
/* 网站特定样式 */
/* LibreOffice Weblate */
.llm-weblate-container {
border-color: #0066cc;
}
.llm-weblate-btn {
background: linear-gradient(135deg, #0066cc 0%, #004499 100%);
font-size: 13px;
}
.llm-weblate-btn:hover {
background: linear-gradient(135deg, #0052a3 0%, #003366 100%);
}
/* Google Translate */
.llm-google-container {
border-color: #4285f4;
background: #f8f9fa;
margin: 4px 0;
padding: 8px;
}
.llm-google-btn {
background: #4285f4;
border-radius: 20px;
padding: 6px 16px;
font-size: 13px;
font-weight: 500;
}
.llm-google-btn:hover {
background: #3367d6;
}
/* DeepL */
.llm-deepl-container {
border-color: #0f2027;
background: #ffffff;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.llm-deepl-btn {
background: linear-gradient(135deg, #0f2027 0%, #203a43 100%);
border-radius: 6px;
padding: 8px 20px;
font-size: 14px;
font-weight: 600;
}
.llm-deepl-btn:hover {
background: linear-gradient(135deg, #203a43 0%, #2c5364 100%);
}
/* Crowdin */
.llm-crowdin-container {
border-color: #2e7d32;
background: #f1f8e9;
}
.llm-crowdin-btn {
background: linear-gradient(135deg, #2e7d32 0%, #1b5e20 100%);
border-radius: 4px;
padding: 7px 14px;
font-size: 13px;
font-weight: 500;
}
.llm-crowdin-btn:hover {
background: linear-gradient(135deg, #1b5e20 0%, #0d4e12 100%);
}
/* 通用网站样式 */
.llm-generic-container {
border-color: #6c757d;
}
.llm-generic-btn {
background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
}
.llm-generic-btn:hover {
background: linear-gradient(135deg, #495057 0%, #343a40 100%);
}
/* 网站特定的响应式调整 */
@media (max-width: 768px) {
.llm-google-container,
.llm-deepl-container {
margin: 2px 0;
padding: 6px;
}
.llm-google-btn,
.llm-deepl-btn,
.llm-crowdin-btn,
.llm-weblate-btn {
width: 100%;
padding: 8px;
font-size: 14px;
}
}