PluginProbe
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot / 4.9.5
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot v4.9.5
4.9.5 4.9.4 4.9.3 4.9.2 4.9.1 4.9.0 4.8.2 4.8.1 4.8.0 4.7.0 4.6.2 4.6.1 4.6.0 4.5.6 4.5.5 4.5.4 4.5.3 4.5.2 4.5.1 4.5.0 4.4.1 4.4.0 3.3.4 3.4.0 3.4.1 All 203 releases
betterdocs / react-src / admin / scss / _quality-analysis-circular.scss

_quality-analysis-circular.scss in BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot 4.9.5, at react-src/admin/scss/_quality-analysis-circular.scss

585 lines 15.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 // Article Quality Analysis - Circular Progress Design
2 // Matching ai-challenge branch design
3
4 $size: 100px;
5 $spinnerWidth: 0.8;
6 $color: #0fa;
7 $maskColor: #ffffff;
8 $animTime: 2.25s;
9 $easing: ease;
10 $timing: $easing;
11
12 .betterdocs-quality-analysis-content {
13
14 .quality-loading {
15 display: flex;
16 flex-direction: column;
17 align-items: center;
18 justify-content: center;
19 padding: 3rem 2rem;
20 text-align: center;
21
22 .quality-loading-spinner {
23 position: relative;
24 width: $size;
25 height: $size;
26 margin-bottom: 1.5rem;
27
28 .quality-spinner {
29 width: $size;
30 height: $size;
31 position: relative;
32 border-radius: 100%;
33 overflow: hidden;
34
35 &::before,
36 &::after {
37 content: "";
38 z-index: 100;
39 display: block;
40 transform-origin: 50% 50%;
41 -webkit-transform-origin: 100% 50%;
42 width: $size / 2;
43 position: absolute;
44 top: 0;
45 left: 0;
46 background: $maskColor;
47 height: $size;
48 }
49 &::before {
50 animation: spin $animTime $easing infinite;
51 -webkit-animation: spin $animTime $easing infinite;
52 animation-delay: $animTime / 4;
53 -webkit-animation-delay: $animTime / 4;
54 transition-timing-function: $easing;
55 -webkit-transition-timing-function: $easing;
56 }
57 &::after {
58 animation: offsetSpin $animTime $easing infinite;
59 -webkit-animation: offsetSpin $animTime $easing infinite;
60 transition-timing-function: $easing;
61 -webkit-transition-timing-function: $easing;
62 }
63
64 .quality-spinner-mask {
65 width: $size * $spinnerWidth;
66 height: $size * $spinnerWidth;
67 background: $maskColor;
68 border-radius: 100%;
69 position: absolute;
70 top: $size * (0.5 - $spinnerWidth/2);
71 left: $size * (0.5 - $spinnerWidth/2);
72 z-index: 200;
73 }
74
75 .quality-spinner-color {
76 width: $size;
77 height: $size;
78 animation: spin $animTime $timing infinite;
79 -webkit-animation: spin $animTime $timing infinite;
80 transition-timing-function: $easing;
81 -webkit-transition-timing-function: $easing;
82 border-radius: 100%;
83 background: linear-gradient($color 1%, transparent);
84 position: absolute;
85 top: 0;
86 left: 0;
87 }
88 }
89 }
90
91 p {
92 font-size: 1.125rem;
93 font-weight: 500;
94 color: #374151;
95 text-align: center;
96 margin: 0;
97 }
98 }
99
100 .quality-results {
101 .quality-results-header {
102 display: flex;
103 align-items: center;
104 justify-content: space-between;
105 margin-bottom: 20px;
106 padding-bottom: 15px;
107
108 h4 {
109 margin: 0;
110 font-size: 16px;
111 font-weight: 600;
112 color: #1d2327;
113 }
114
115 .betterdocs-regenerate-quality {
116 display: inline-flex;
117 align-items: center;
118 justify-content: center;
119 background: #EAECF0;
120 border-radius: 8px;
121 cursor: pointer;
122 transition: all 0.2s ease;
123 padding: 5px;
124 border: none;
125
126 svg {
127 width: 14px;
128 height: 14px;
129 }
130 }
131 }
132
133 .quality-results-body {
134 display: flex;
135 flex-direction: column;
136 background-color: #ffffff;
137 border: 1px solid #e5e7eb;
138 border-radius: 12px;
139 margin-bottom: 32px;
140 @media (min-width: 1024px) {
141 flex-direction: row;
142 }
143 }
144
145 // Left Column: Circular Progress Score
146 .score-column {
147 display: flex;
148 flex-direction: column;
149 align-items: center;
150 justify-content: center;
151 text-align: center;
152 flex-shrink: 0;
153 width: 100%;
154 padding: 16px;
155 border-right: 1px solid rgba(242, 244, 247, 1);
156 background-image: url('../../../assets/static/admin/images/overallscore.png');
157 background-position: bottom left;
158 background-repeat: no-repeat;
159
160 @media (min-width: 1024px) {
161 width: 300px;
162 }
163
164 .score-column-title {
165 font-size: 14px;
166 font-weight: 600;
167 color: #667085;
168 margin: 0 0 16px 0;
169 }
170
171 .progress-ring-wrapper {
172 position: relative;
173 width: 120px;
174 height: 120px;
175 margin-bottom: 16px;
176
177 .progress-ring {
178 width: 100%;
179 height: 100%;
180
181 .progress-ring-bg {
182 stroke: #e5e7eb;
183 }
184
185 .progress-ring-circle {
186 stroke: #d1d5db;
187 transition: stroke-dashoffset 0.5s ease-in-out;
188
189 &.green {
190 stroke: #00b884;
191 }
192
193 &.yellow {
194 stroke: #eab308;
195 }
196
197 &.orange {
198 stroke: #f97316;
199 }
200
201 &.red {
202 stroke: #ef4444;
203 }
204 }
205 }
206
207 .score-text-wrapper {
208 position: absolute;
209 top: 0;
210 left: 0;
211 right: 0;
212 bottom: 0;
213 display: flex;
214 flex-direction: column;
215 align-items: center;
216 justify-content: center;
217
218 .score-value {
219 font-size: 36px;
220 font-weight: 700;
221 color: #1f2937;
222 line-height: 48px;
223
224 &.green {
225 color: #00b884;
226 }
227
228 &.yellow {
229 color: #eab308;
230 }
231
232 &.orange {
233 color: #f97316;
234 }
235
236 &.red {
237 color: #ef4444;
238 }
239 }
240
241 .score-label {
242 font-size: 14px;
243 color: #6b7280;
244 }
245 }
246 }
247
248 .score-feedback {
249 padding: 6px 12px;
250 border-radius: 9999px;
251 font-size: 14px;
252 font-weight: 500;
253
254 &.green {
255 background-color: #f0fdf9;
256 color: #007554;
257 }
258
259 &.yellow {
260 background-color: #fef9c3;
261 color: #a16207;
262 }
263
264 &.orange {
265 background-color: #ffedd5;
266 color: #c2410c;
267 }
268
269 &.red {
270 background-color: #fee2e2;
271 color: #b91c1c;
272 }
273 }
274
275 .score-description {
276 margin-top: 8px;
277 font-size: 13px;
278 color: #6b7280;
279 line-height: 1.5;
280 }
281 }
282
283 // Right Column: Details
284 .details-column {
285 flex: 1;
286 display: flex;
287 flex-direction: column;
288 gap: 24px;
289 padding: 18px 24px;
290
291 .section {
292 .section-title {
293 font-size: 14px;
294 font-weight: 600;
295 color: #667085;
296 margin: 0 0 24px 0;
297 text-align: center;
298 }
299
300 .score-breakdown-list {
301 display: flex;
302 flex-direction: column;
303 gap: 12px;
304
305 .score-item {
306 .score-name-group {
307 display: flex;
308 align-items: center;
309 justify-content: space-between;
310 margin-bottom: 6px;
311 font-size: 14px;
312 line-height: 1.5;
313 font-weight: 400;
314 .score-name {
315 color: #1D2939;
316 }
317 .score-percentage {
318 text-align: right;
319 color: #667085;
320 }
321 }
322 .score-bar-group {
323 .score-bar-wrapper {
324 background-color: #e5e7eb;
325 border-radius: 9999px;
326 height: 10px;
327
328 .score-bar-fill {
329 height: 10px;
330 border-radius: 9999px;
331 transition: width 0.5s ease-in-out;
332
333 &.green {
334 background: #00b884;
335 }
336
337 &.yellow {
338 background: #eab308;
339 }
340
341 &.orange {
342 background: #f97316;
343 }
344
345 &.red {
346 background: #ef4444;
347 }
348 }
349 }
350 }
351 }
352 }
353 }
354 }
355 }
356 .improvement-section {
357 h3 {
358 font-weight: 600;
359 font-size: 16px;
360 color: #1D2939;
361 margin: 0 0 16px 0;
362 }
363 .improvements-list {
364 display: flex;
365 flex-direction: column;
366 gap: 16px;
367
368 .improvement-item {
369 display: flex;
370 align-items: flex-start;
371 gap: 8px;
372
373 .improvement-icon {
374 flex-shrink: 0;
375 width: 20px;
376 height: 20px;
377
378 svg {
379 display: block;
380 width: 100%;
381 height: 100%;
382 }
383 }
384
385 .improvement-text {
386 flex: 1;
387 font-size: 14px;
388 line-height: 1.5;
389 color: #667085;
390 }
391 }
392 }
393
394 }
395
396 .quality-error {
397 display: flex;
398 flex-direction: column;
399 padding: 20px;
400 margin: 0 20px;
401 background-color: rgba(255, 247, 237, 0.5);
402 border: 1px solid #ffedd5;
403 border-radius: 12px;
404
405 // Content validation error (red background)
406 &.error-content-validation {
407 background-color: rgba(254, 226, 226, 0.5);
408 border: 1px solid #fecaca;
409
410 .error-content .error-text .error-message {
411 color: #991b1b;
412 }
413 }
414
415 // Configuration error (orange background - default)
416 &.error-config {
417 background-color: rgba(255, 247, 237, 0.5);
418 border: 1px solid #ffedd5;
419 }
420
421 .error-content {
422 display: flex;
423 flex-direction: row;
424 align-items: flex-start;
425 gap: 20px;
426
427 .error-icon {
428 padding: 0.75rem;
429 background-color: white;
430 border-radius: 50%;
431 box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
432 border: 1px solid #ffedd5;
433 color: #f97316;
434 display: flex;
435 align-items: center;
436 justify-content: center;
437 flex-shrink: 0;
438
439 svg {
440 display: block;
441 }
442
443 // When icon is hidden, adjust layout
444 &:not([style*="display: none"]) ~ .error-text {
445 flex: 1;
446 }
447 }
448
449 .error-text {
450 flex: 1;
451
452 strong {
453 color: #111827;
454 font-weight: 600;
455 font-size: 1rem;
456 margin-bottom: 0.25rem;
457 margin-top: 0;
458 display: block;
459 }
460
461 .error-message {
462 color: #6b7280;
463 font-size: 0.875rem;
464 line-height: 1.625;
465 margin-top: 0;
466 }
467
468 .error-action-button {
469 display: inline-flex;
470 align-items: center;
471 justify-content: center;
472 gap: 0.5rem;
473 padding: 0.625rem 1.25rem;
474 border-radius: 0.5rem;
475 background: #00b884;
476 color: #FFFFFF;
477 font-weight: 500;
478 font-size: 0.875rem;
479 border: none;
480 cursor: pointer;
481 box-shadow: 0 1px 2px 0 rgba(16, 185, 129, 0.1);
482 transition: opacity 0.2s;
483 text-decoration: none;
484 margin-top: 1rem;
485 }
486 }
487 }
488 }
489
490 .quality-empty {
491 display: flex;
492 flex-direction: column;
493 text-align: left;
494 padding: 24px;
495 h4 {
496 margin: 0 0 16px;
497 font-size: 20px;
498 font-weight: 600;
499 color: #1D2939;
500 }
501
502 p {
503 margin: 0 0 16px;
504 font-size: 16px;
505 color: #475467;
506 line-height: 1.5;
507 }
508
509 .betterdocs-analyze-btn {
510 display: flex;
511 align-items: center;
512 justify-content: center;
513 gap: 8px;
514 padding: 8px 24px;
515 cursor: pointer;
516 font-size: 14px;
517 font-weight: 600;
518 line-height: 1.5;
519 width: auto;
520 max-width: max-content;
521 white-space: nowrap;
522 border-radius: 12px;
523 background: #fff; /* Add background color for the button */
524 position: relative;
525 border: none;
526 &::before {
527 content: '';
528 position: absolute;
529 inset: 0;
530 border-radius: 12px;
531 padding: 2px; /* This creates the border width */
532 background: conic-gradient(from 90deg at 50.51% 50.65%,
533 #54B8FF -29.78deg,
534 #3751FF 26.9deg,
535 #C891FC 112.04deg,
536 #FFCE9D 216.82deg,
537 #00DE9F 248.78deg,
538 #54B8FF 330.22deg,
539 #3751FF 386.9deg);
540 -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
541 -webkit-mask-composite: xor;
542 mask-composite: exclude;
543 pointer-events: none;
544 }
545 }
546 }
547 }
548
549 // Keyframes for spinner animation
550 @keyframes spin {
551 from {
552 transform: rotate(0deg);
553 }
554 to {
555 transform: rotate(360deg);
556 }
557 }
558
559 @-webkit-keyframes spin {
560 from {
561 -webkit-transform: rotate(0deg);
562 }
563 to {
564 -webkit-transform: rotate(360deg);
565 }
566 }
567
568 @keyframes offsetSpin {
569 from {
570 transform: rotate(180deg);
571 }
572 to {
573 transform: rotate(540deg);
574 }
575 }
576
577 @-webkit-keyframes offsetSpin {
578 from {
579 -webkit-transform: rotate(180deg);
580 }
581 to {
582 -webkit-transform: rotate(540deg);
583 }
584 }
585