-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheditor.css
More file actions
372 lines (316 loc) · 6 KB
/
editor.css
File metadata and controls
372 lines (316 loc) · 6 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
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
/**
* 在线编辑器样式
*/
/* 编辑工具栏 */
#editor-toolbar {
position: fixed;
top: 0;
right: 0;
z-index: 1000;
width: 100%;
}
/* 状态条 */
.editor-status-bar {
position: fixed;
top: 0;
left: 0;
right: 0;
padding: 12px 20px;
font-size: 14px;
font-weight: 500;
text-align: center;
z-index: 1001;
animation: slideDown 0.3s ease;
}
.editor-status-bar.status-info {
background: linear-gradient(90deg, #3b82f6, #1e40af);
color: white;
}
.editor-status-bar.status-success {
background: linear-gradient(90deg, #10b981, #059669);
color: white;
}
.editor-status-bar.status-error {
background: linear-gradient(90deg, #ef4444, #dc2626);
color: white;
}
@keyframes slideDown {
from {
transform: translateY(-100%);
}
to {
transform: translateY(0);
}
}
/* 编辑按钮容器 */
.editor-buttons {
position: fixed;
top: 16px;
right: 20px;
display: flex;
gap: 10px;
z-index: 999;
}
/* 编辑按钮 */
.editor-btn {
padding: 8px 16px;
border: none;
border-radius: 6px;
font-size: 14px;
font-weight: 600;
cursor: pointer;
transition: all 0.3s ease;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
background: white;
color: #1e40af;
}
.editor-btn:hover {
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.editor-btn-edit {
background: white;
color: #1e40af;
border: 1px solid #1e40af;
}
.editor-btn-edit:hover {
background: #f0f4f8;
}
.editor-btn-save {
background: #10b981;
color: white;
border: none;
}
.editor-btn-save:hover {
background: #059669;
}
.editor-btn-token {
background: white;
color: #7c3aed;
border: 1px solid #7c3aed;
}
.editor-btn-token:hover {
background: #f5f3ff;
}
.editor-btn-token.token-set {
background: #7c3aed;
color: white;
border-color: #7c3aed;
}
.editor-btn-token.token-set:hover {
background: #6d28d9;
}
/* 编辑容器包装器 */
.editor-container-wrapper {
background: white;
border-radius: 8px;
padding: 20px;
margin-bottom: 30px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
border: 2px solid #3b82f6;
}
/* Quill 编辑器容器 */
#editor-container {
min-height: 400px;
margin-bottom: 20px;
}
/* Quill 工具栏样式 */
.ql-toolbar {
border: 1px solid #e2e8f0;
border-radius: 4px 4px 0 0;
background: #f8fafc;
}
.ql-toolbar.ql-snow {
padding: 10px;
}
.ql-toolbar.ql-snow .ql-stroke {
stroke: #64748b;
}
.ql-toolbar.ql-snow .ql-fill,
.ql-toolbar.ql-snow .ql-stroke.ql-fill {
fill: #64748b;
}
.ql-toolbar.ql-snow button:hover,
.ql-toolbar.ql-snow button.ql-active,
.ql-toolbar.ql-snow button:focus,
.ql-toolbar.ql-snow button:active {
stroke: #1e40af;
}
.ql-toolbar.ql-snow button:hover .ql-fill,
.ql-toolbar.ql-snow button.ql-active .ql-fill,
.ql-toolbar.ql-snow button:focus .ql-fill,
.ql-toolbar.ql-snow button:active .ql-fill,
.ql-toolbar.ql-snow button:hover .ql-stroke.ql-fill,
.ql-toolbar.ql-snow button.ql-active .ql-stroke.ql-fill,
.ql-toolbar.ql-snow button:focus .ql-stroke.ql-fill,
.ql-toolbar.ql-snow button:active .ql-stroke.ql-fill {
fill: #1e40af;
}
/* Quill 编辑器内容区 */
.ql-container {
border: 1px solid #e2e8f0;
border-radius: 0 0 4px 4px;
font-size: 16px;
font-family: inherit;
}
.ql-editor {
min-height: 300px;
padding: 15px;
line-height: 1.6;
}
.ql-editor.ql-blank::before {
color: #cbd5e1;
font-style: italic;
}
/* 编辑器操作按钮 */
.editor-actions {
display: flex;
gap: 10px;
justify-content: flex-end;
}
.editor-action-btn {
padding: 10px 20px;
border: none;
border-radius: 6px;
font-size: 14px;
font-weight: 600;
cursor: pointer;
transition: all 0.3s ease;
}
.editor-action-save {
background: #10b981;
color: white;
}
.editor-action-save:hover {
background: #059669;
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}
.editor-action-save:disabled {
background: #cbd5e1;
cursor: not-allowed;
transform: none;
}
.editor-action-cancel {
background: #f3f4f6;
color: #64748b;
border: 1px solid #e5e7eb;
}
.editor-action-cancel:hover {
background: #e5e7eb;
transform: translateY(-2px);
}
/* .ai-section 编辑模式样式 */
.ai-section.editing {
border: 3px solid #3b82f6;
background: #f0f9ff;
opacity: 0.5;
pointer-events: none;
}
/* 响应式设计 */
@media (max-width: 768px) {
.editor-buttons {
top: 10px;
right: 10px;
gap: 5px;
}
.editor-btn {
padding: 6px 12px;
font-size: 12px;
}
.editor-container-wrapper {
padding: 15px;
}
#editor-container {
min-height: 300px;
}
.ql-editor {
min-height: 200px;
}
.editor-action-btn {
padding: 8px 16px;
font-size: 13px;
}
}
/* Quill 图片样式 */
.ql-editor img {
max-width: 100%;
height: auto;
border-radius: 4px;
margin: 10px 0;
}
/* Quill 代码块样式 */
.ql-editor pre {
background: #1e293b;
color: #e2e8f0;
padding: 12px;
border-radius: 4px;
overflow-x: auto;
margin: 10px 0;
}
.ql-editor pre code {
background: none;
color: inherit;
padding: 0;
}
/* Quill 列表样式 */
.ql-editor ol,
.ql-editor ul {
margin: 10px 0;
padding-left: 2em;
}
.ql-editor li {
margin: 5px 0;
}
/* Quill 表格样式 */
.ql-editor table {
border-collapse: collapse;
width: 100%;
margin: 10px 0;
}
.ql-editor td,
.ql-editor th {
border: 1px solid #cbd5e1;
padding: 8px;
}
.ql-editor th {
background: #f1f5f9;
font-weight: 600;
}
/* Quill 引用样式 */
.ql-editor blockquote {
border-left: 4px solid #1e40af;
padding-left: 15px;
margin: 10px 0;
color: #64748b;
font-style: italic;
}
/* Quill 标题样式 */
.ql-editor h2 {
color: #1e40af;
font-size: 1.5em;
margin: 15px 0 10px 0;
font-weight: 700;
border-bottom: 2px solid #e2e8f0;
padding-bottom: 10px;
}
.ql-editor h3 {
color: #7c3aed;
font-size: 1.25em;
margin: 12px 0 8px 0;
font-weight: 600;
}
.ql-editor h4 {
color: #1e293b;
font-size: 1.1em;
margin: 10px 0 6px 0;
font-weight: 600;
}
/* 链接样式 */
.ql-editor a {
color: #1e40af;
text-decoration: underline;
}
.ql-editor a:hover {
color: #0c4a6e;
}