Spaces:
Sleeping
Sleeping
Keldos
commited on
Commit
•
de613b4
1
Parent(s):
bfac445
代码块样式适配gradio3.30.0
Browse files- assets/custom.css +80 -72
- requirements.txt +1 -1
assets/custom.css
CHANGED
@@ -405,7 +405,7 @@ thead th {
|
|
405 |
padding: .5em .2em;
|
406 |
}
|
407 |
/* 行内代码 */
|
408 |
-
code {
|
409 |
display: inline;
|
410 |
white-space: break-spaces;
|
411 |
border-radius: 6px;
|
@@ -414,13 +414,13 @@ code {
|
|
414 |
background-color: rgba(175,184,193,0.2);
|
415 |
}
|
416 |
/* 代码块 */
|
417 |
-
pre code {
|
418 |
display: block;
|
419 |
overflow: auto;
|
420 |
white-space: pre;
|
421 |
background-color: hsla(0, 0%, 0%, 80%)!important;
|
422 |
border-radius: 10px;
|
423 |
-
padding: 1.
|
424 |
margin: 0.6em 2em 1em 0.2em;
|
425 |
color: #FFF;
|
426 |
box-shadow: 6px 6px 16px hsla(0, 0%, 0%, 0.2);
|
@@ -428,73 +428,81 @@ pre code {
|
|
428 |
.message pre {
|
429 |
padding: 0 !important;
|
430 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
431 |
/* 代码高亮样式 */
|
432 |
-
.highlight .hll { background-color: #49483e }
|
433 |
-
.highlight .c { color: #75715e } /* Comment */
|
434 |
-
.highlight .err { color: #960050; background-color: #1e0010 } /* Error */
|
435 |
-
.highlight .k { color: #66d9ef
|
436 |
-
.highlight .l { color: #ae81ff
|
437 |
-
.highlight .n { color: #f8f8f2
|
438 |
-
.highlight .o { color: #f92672
|
439 |
-
.highlight .p { color: #f8f8f2
|
440 |
-
.highlight .ch { color: #75715e
|
441 |
-
.highlight .cm { color: #75715e
|
442 |
-
.highlight .cp { color: #75715e
|
443 |
-
.highlight .cpf { color: #75715e
|
444 |
-
.highlight .c1 { color: #75715e
|
445 |
-
.highlight .cs { color: #75715e
|
446 |
-
.highlight .gd { color: #f92672
|
447 |
-
.highlight .ge { font-style: italic
|
448 |
-
.highlight .gi { color: #a6e22e
|
449 |
-
.highlight .gs { font-weight: bold
|
450 |
-
.highlight .gu { color: #75715e
|
451 |
-
.highlight .kc { color: #66d9ef
|
452 |
-
.highlight .kd { color: #66d9ef
|
453 |
-
.highlight .kn { color: #f92672
|
454 |
-
.highlight .kp { color: #66d9ef
|
455 |
-
.highlight .kr { color: #66d9ef
|
456 |
-
.highlight .kt { color: #66d9ef
|
457 |
-
.highlight .ld { color: #e6db74
|
458 |
-
.highlight .m { color: #ae81ff
|
459 |
-
.highlight .s { color: #e6db74
|
460 |
-
.highlight .na { color: #a6e22e
|
461 |
-
.highlight .nb { color: #f8f8f2
|
462 |
-
.highlight .nc { color: #a6e22e
|
463 |
-
.highlight .no { color: #66d9ef
|
464 |
-
.highlight .nd { color: #a6e22e
|
465 |
-
.highlight .ni { color: #f8f8f2
|
466 |
-
.highlight .ne { color: #a6e22e
|
467 |
-
.highlight .nf { color: #a6e22e
|
468 |
-
.highlight .nl { color: #f8f8f2
|
469 |
-
.highlight .nn { color: #f8f8f2
|
470 |
-
.highlight .nx { color: #a6e22e
|
471 |
-
.highlight .py { color: #f8f8f2
|
472 |
-
.highlight .nt { color: #f92672
|
473 |
-
.highlight .nv { color: #f8f8f2
|
474 |
-
.highlight .ow { color: #f92672
|
475 |
-
.highlight .w { color: #f8f8f2
|
476 |
-
.highlight .mb { color: #ae81ff
|
477 |
-
.highlight .mf { color: #ae81ff
|
478 |
-
.highlight .mh { color: #ae81ff
|
479 |
-
.highlight .mi { color: #ae81ff
|
480 |
-
.highlight .mo { color: #ae81ff
|
481 |
-
.highlight .sa { color: #e6db74
|
482 |
-
.highlight .sb { color: #e6db74
|
483 |
-
.highlight .sc { color: #e6db74
|
484 |
-
.highlight .dl { color: #e6db74
|
485 |
-
.highlight .sd { color: #e6db74
|
486 |
-
.highlight .s2 { color: #e6db74
|
487 |
-
.highlight .se { color: #ae81ff
|
488 |
-
.highlight .sh { color: #e6db74
|
489 |
-
.highlight .si { color: #e6db74
|
490 |
-
.highlight .sx { color: #e6db74
|
491 |
-
.highlight .sr { color: #e6db74
|
492 |
-
.highlight .s1 { color: #e6db74
|
493 |
-
.highlight .ss { color: #e6db74
|
494 |
-
.highlight .bp { color: #f8f8f2
|
495 |
-
.highlight .fm { color: #a6e22e
|
496 |
-
.highlight .vc { color: #f8f8f2
|
497 |
-
.highlight .vg { color: #f8f8f2
|
498 |
-
.highlight .vi { color: #f8f8f2
|
499 |
-
.highlight .vm { color: #f8f8f2
|
500 |
-
.highlight .il { color: #ae81ff
|
|
|
405 |
padding: .5em .2em;
|
406 |
}
|
407 |
/* 行内代码 */
|
408 |
+
.message :not(pre) code {
|
409 |
display: inline;
|
410 |
white-space: break-spaces;
|
411 |
border-radius: 6px;
|
|
|
414 |
background-color: rgba(175,184,193,0.2);
|
415 |
}
|
416 |
/* 代码块 */
|
417 |
+
.message pre code {
|
418 |
display: block;
|
419 |
overflow: auto;
|
420 |
white-space: pre;
|
421 |
background-color: hsla(0, 0%, 0%, 80%)!important;
|
422 |
border-radius: 10px;
|
423 |
+
padding: 1.2em 1em 0em .5em;
|
424 |
margin: 0.6em 2em 1em 0.2em;
|
425 |
color: #FFF;
|
426 |
box-shadow: 6px 6px 16px hsla(0, 0%, 0%, 0.2);
|
|
|
428 |
.message pre {
|
429 |
padding: 0 !important;
|
430 |
}
|
431 |
+
.message pre code div.highlight {
|
432 |
+
background-color: unset !important;
|
433 |
+
}
|
434 |
+
|
435 |
+
button.copy-button {
|
436 |
+
display: none;
|
437 |
+
}
|
438 |
+
|
439 |
/* 代码高亮样式 */
|
440 |
+
.highlight .hll { background-color: #49483e !important }
|
441 |
+
.highlight .c { color: #75715e !important } /* Comment */
|
442 |
+
.highlight .err { color: #960050 !important; background-color: #1e0010 } /* Error */
|
443 |
+
.highlight .k { color: #66d9ef !important} /* Keyword */
|
444 |
+
.highlight .l { color: #ae81ff !important} /* Literal */
|
445 |
+
.highlight .n { color: #f8f8f2 !important} /* Name */
|
446 |
+
.highlight .o { color: #f92672 !important} /* Operator */
|
447 |
+
.highlight .p { color: #f8f8f2 !important} /* Punctuation */
|
448 |
+
.highlight .ch { color: #75715e !important} /* Comment.Hashbang */
|
449 |
+
.highlight .cm { color: #75715e !important} /* Comment.Multiline */
|
450 |
+
.highlight .cp { color: #75715e !important} /* Comment.Preproc */
|
451 |
+
.highlight .cpf { color: #75715e !important} /* Comment.PreprocFile */
|
452 |
+
.highlight .c1 { color: #75715e !important} /* Comment.Single */
|
453 |
+
.highlight .cs { color: #75715e !important} /* Comment.Special */
|
454 |
+
.highlight .gd { color: #f92672 !important} /* Generic.Deleted */
|
455 |
+
.highlight .ge { font-style: italic !important} /* Generic.Emph */
|
456 |
+
.highlight .gi { color: #a6e22e !important} /* Generic.Inserted */
|
457 |
+
.highlight .gs { font-weight: bold !important} /* Generic.Strong */
|
458 |
+
.highlight .gu { color: #75715e !important} /* Generic.Subheading */
|
459 |
+
.highlight .kc { color: #66d9ef !important} /* Keyword.Constant */
|
460 |
+
.highlight .kd { color: #66d9ef !important} /* Keyword.Declaration */
|
461 |
+
.highlight .kn { color: #f92672 !important} /* Keyword.Namespace */
|
462 |
+
.highlight .kp { color: #66d9ef !important} /* Keyword.Pseudo */
|
463 |
+
.highlight .kr { color: #66d9ef !important} /* Keyword.Reserved */
|
464 |
+
.highlight .kt { color: #66d9ef !important} /* Keyword.Type */
|
465 |
+
.highlight .ld { color: #e6db74 !important} /* Literal.Date */
|
466 |
+
.highlight .m { color: #ae81ff !important} /* Literal.Number */
|
467 |
+
.highlight .s { color: #e6db74 !important} /* Literal.String */
|
468 |
+
.highlight .na { color: #a6e22e !important} /* Name.Attribute */
|
469 |
+
.highlight .nb { color: #f8f8f2 !important} /* Name.Builtin */
|
470 |
+
.highlight .nc { color: #a6e22e !important} /* Name.Class */
|
471 |
+
.highlight .no { color: #66d9ef !important} /* Name.Constant */
|
472 |
+
.highlight .nd { color: #a6e22e !important} /* Name.Decorator */
|
473 |
+
.highlight .ni { color: #f8f8f2 !important} /* Name.Entity */
|
474 |
+
.highlight .ne { color: #a6e22e !important} /* Name.Exception */
|
475 |
+
.highlight .nf { color: #a6e22e !important} /* Name.Function */
|
476 |
+
.highlight .nl { color: #f8f8f2 !important} /* Name.Label */
|
477 |
+
.highlight .nn { color: #f8f8f2 !important} /* Name.Namespace */
|
478 |
+
.highlight .nx { color: #a6e22e !important} /* Name.Other */
|
479 |
+
.highlight .py { color: #f8f8f2 !important} /* Name.Property */
|
480 |
+
.highlight .nt { color: #f92672 !important} /* Name.Tag */
|
481 |
+
.highlight .nv { color: #f8f8f2 !important} /* Name.Variable */
|
482 |
+
.highlight .ow { color: #f92672 !important} /* Operator.Word */
|
483 |
+
.highlight .w { color: #f8f8f2 !important} /* Text.Whitespace */
|
484 |
+
.highlight .mb { color: #ae81ff !important} /* Literal.Number.Bin */
|
485 |
+
.highlight .mf { color: #ae81ff !important} /* Literal.Number.Float */
|
486 |
+
.highlight .mh { color: #ae81ff !important} /* Literal.Number.Hex */
|
487 |
+
.highlight .mi { color: #ae81ff !important} /* Literal.Number.Integer */
|
488 |
+
.highlight .mo { color: #ae81ff !important} /* Literal.Number.Oct */
|
489 |
+
.highlight .sa { color: #e6db74 !important} /* Literal.String.Affix */
|
490 |
+
.highlight .sb { color: #e6db74 !important} /* Literal.String.Backtick */
|
491 |
+
.highlight .sc { color: #e6db74 !important} /* Literal.String.Char */
|
492 |
+
.highlight .dl { color: #e6db74 !important} /* Literal.String.Delimiter */
|
493 |
+
.highlight .sd { color: #e6db74 !important} /* Literal.String.Doc */
|
494 |
+
.highlight .s2 { color: #e6db74 !important} /* Literal.String.Double */
|
495 |
+
.highlight .se { color: #ae81ff !important} /* Literal.String.Escape */
|
496 |
+
.highlight .sh { color: #e6db74 !important} /* Literal.String.Heredoc */
|
497 |
+
.highlight .si { color: #e6db74 !important} /* Literal.String.Interpol */
|
498 |
+
.highlight .sx { color: #e6db74 !important} /* Literal.String.Other */
|
499 |
+
.highlight .sr { color: #e6db74 !important} /* Literal.String.Regex */
|
500 |
+
.highlight .s1 { color: #e6db74 !important} /* Literal.String.Single */
|
501 |
+
.highlight .ss { color: #e6db74 !important} /* Literal.String.Symbol */
|
502 |
+
.highlight .bp { color: #f8f8f2 !important} /* Name.Builtin.Pseudo */
|
503 |
+
.highlight .fm { color: #a6e22e !important} /* Name.Function.Magic */
|
504 |
+
.highlight .vc { color: #f8f8f2 !important} /* Name.Variable.Class */
|
505 |
+
.highlight .vg { color: #f8f8f2 !important} /* Name.Variable.Global */
|
506 |
+
.highlight .vi { color: #f8f8f2 !important} /* Name.Variable.Instance */
|
507 |
+
.highlight .vm { color: #f8f8f2 !important} /* Name.Variable.Magic */
|
508 |
+
.highlight .il { color: #ae81ff !important} /* Literal.Number.Integer.Long */
|
requirements.txt
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
gradio==3.
|
2 |
gradio_client==0.1.4
|
3 |
mdtex2html
|
4 |
pypinyin
|
|
|
1 |
+
gradio==3.30.0
|
2 |
gradio_client==0.1.4
|
3 |
mdtex2html
|
4 |
pypinyin
|