Spaces:
Runtime error
Runtime error
Commit
·
eb2b5ce
1
Parent(s):
358bef3
Update assets/custom.css
Browse files- assets/custom.css +342 -32
assets/custom.css
CHANGED
|
@@ -1,69 +1,278 @@
|
|
| 1 |
:root {
|
| 2 |
-
--chatbot-color-light: #
|
| 3 |
-
--chatbot-color-dark: #
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
}
|
| 5 |
|
| 6 |
/* status_display */
|
| 7 |
#status_display {
|
| 8 |
display: flex;
|
| 9 |
-
min-height:
|
| 10 |
align-items: flex-end;
|
| 11 |
justify-content: flex-end;
|
| 12 |
}
|
| 13 |
#status_display p {
|
| 14 |
font-size: .85em;
|
| 15 |
-
font-family: monospace;
|
|
|
|
| 16 |
color: var(--body-text-color-subdued);
|
| 17 |
}
|
| 18 |
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
|
| 21 |
/* usage_display */
|
| 22 |
-
|
| 23 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
}
|
| 25 |
-
#usage_display p{
|
| 26 |
-
|
| 27 |
font-size: .85em;
|
| 28 |
-
font-family: monospace;
|
| 29 |
color: var(--body-text-color-subdued);
|
| 30 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
/* list */
|
| 32 |
ol:not(.options), ul:not(.options) {
|
| 33 |
padding-inline-start: 2em !important;
|
| 34 |
}
|
| 35 |
|
| 36 |
-
/*
|
| 37 |
-
/* Light mode (default) */
|
| 38 |
#chuanhu_chatbot {
|
| 39 |
-
background-color: var(--chatbot-color-light) !important;
|
| 40 |
-
color:
|
| 41 |
}
|
| 42 |
[data-testid = "bot"] {
|
| 43 |
-
background-color:
|
| 44 |
}
|
| 45 |
[data-testid = "user"] {
|
| 46 |
-
background-color:
|
| 47 |
}
|
| 48 |
-
|
| 49 |
-
/* Dark mode */
|
| 50 |
.dark #chuanhu_chatbot {
|
| 51 |
-
background-color: var(--chatbot-color-dark) !important;
|
| 52 |
-
color:
|
| 53 |
}
|
| 54 |
.dark [data-testid = "bot"] {
|
| 55 |
-
background-color:
|
| 56 |
}
|
| 57 |
.dark [data-testid = "user"] {
|
| 58 |
-
background-color:
|
| 59 |
}
|
| 60 |
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 64 |
}
|
| 65 |
-
|
| 66 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 67 |
border-radius: var(--radius-xl) !important;
|
| 68 |
border: none;
|
| 69 |
padding: var(--spacing-xl) !important;
|
|
@@ -81,7 +290,105 @@ ol:not(.options), ul:not(.options) {
|
|
| 81 |
width: auto !important;
|
| 82 |
border-bottom-right-radius: 0 !important;
|
| 83 |
}
|
| 84 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 85 |
table {
|
| 86 |
margin: 1em 0;
|
| 87 |
border-collapse: collapse;
|
|
@@ -97,7 +404,7 @@ thead {
|
|
| 97 |
thead th {
|
| 98 |
padding: .5em .2em;
|
| 99 |
}
|
| 100 |
-
/*
|
| 101 |
code {
|
| 102 |
display: inline;
|
| 103 |
white-space: break-spaces;
|
|
@@ -106,7 +413,7 @@ code {
|
|
| 106 |
padding: .2em .4em .1em .4em;
|
| 107 |
background-color: rgba(175,184,193,0.2);
|
| 108 |
}
|
| 109 |
-
/*
|
| 110 |
pre code {
|
| 111 |
display: block;
|
| 112 |
overflow: auto;
|
|
@@ -114,11 +421,14 @@ pre code {
|
|
| 114 |
background-color: hsla(0, 0%, 0%, 80%)!important;
|
| 115 |
border-radius: 10px;
|
| 116 |
padding: 1.4em 1.2em 0em 1.4em;
|
| 117 |
-
margin:
|
| 118 |
color: #FFF;
|
| 119 |
box-shadow: 6px 6px 16px hsla(0, 0%, 0%, 0.2);
|
| 120 |
}
|
| 121 |
-
|
|
|
|
|
|
|
|
|
|
| 122 |
.highlight .hll { background-color: #49483e }
|
| 123 |
.highlight .c { color: #75715e } /* Comment */
|
| 124 |
.highlight .err { color: #960050; background-color: #1e0010 } /* Error */
|
|
|
|
| 1 |
:root {
|
| 2 |
+
--chatbot-color-light: #000000;
|
| 3 |
+
--chatbot-color-dark: #FFFFFF;
|
| 4 |
+
--chatbot-background-color-light: #F3F3F3;
|
| 5 |
+
--chatbot-background-color-dark: #121111;
|
| 6 |
+
--message-user-background-color-light: #95EC69;
|
| 7 |
+
--message-user-background-color-dark: #26B561;
|
| 8 |
+
--message-bot-background-color-light: #FFFFFF;
|
| 9 |
+
--message-bot-background-color-dark: #2C2C2C;
|
| 10 |
+
}
|
| 11 |
+
|
| 12 |
+
#app_title {
|
| 13 |
+
font-weight: var(--prose-header-text-weight);
|
| 14 |
+
font-size: var(--text-xxl);
|
| 15 |
+
line-height: 1.3;
|
| 16 |
+
text-align: left;
|
| 17 |
+
margin-top: 6px;
|
| 18 |
+
white-space: nowrap;
|
| 19 |
+
}
|
| 20 |
+
#description {
|
| 21 |
+
text-align: center;
|
| 22 |
+
margin: 32px 0 4px 0;
|
| 23 |
+
}
|
| 24 |
+
|
| 25 |
+
/* gradio的页脚信息 */
|
| 26 |
+
footer {
|
| 27 |
+
/* display: none !important; */
|
| 28 |
+
margin-top: .2em !important;
|
| 29 |
+
font-size: 85%;
|
| 30 |
+
}
|
| 31 |
+
#footer {
|
| 32 |
+
text-align: center;
|
| 33 |
+
}
|
| 34 |
+
#footer div {
|
| 35 |
+
display: inline-block;
|
| 36 |
+
}
|
| 37 |
+
#footer .versions{
|
| 38 |
+
font-size: 85%;
|
| 39 |
+
opacity: 0.60;
|
| 40 |
+
}
|
| 41 |
+
|
| 42 |
+
#float_display {
|
| 43 |
+
position: absolute;
|
| 44 |
+
max-height: 30px;
|
| 45 |
+
}
|
| 46 |
+
/* user_info */
|
| 47 |
+
#user_info {
|
| 48 |
+
white-space: nowrap;
|
| 49 |
+
position: absolute; left: 8em; top: .2em;
|
| 50 |
+
z-index: var(--layer-2);
|
| 51 |
+
box-shadow: var(--block-shadow);
|
| 52 |
+
border: none; border-radius: var(--block-label-radius);
|
| 53 |
+
background: var(--color-accent);
|
| 54 |
+
padding: var(--block-label-padding);
|
| 55 |
+
font-size: var(--block-label-text-size); line-height: var(--line-sm);
|
| 56 |
+
width: auto; min-height: 30px!important;
|
| 57 |
+
opacity: 1;
|
| 58 |
+
transition: opacity 0.3s ease-in-out;
|
| 59 |
+
}
|
| 60 |
+
#user_info .wrap {
|
| 61 |
+
opacity: 0;
|
| 62 |
+
}
|
| 63 |
+
#user_info p {
|
| 64 |
+
color: white;
|
| 65 |
+
font-weight: var(--block-label-text-weight);
|
| 66 |
+
}
|
| 67 |
+
#user_info.hideK {
|
| 68 |
+
opacity: 0;
|
| 69 |
+
transition: opacity 1s ease-in-out;
|
| 70 |
}
|
| 71 |
|
| 72 |
/* status_display */
|
| 73 |
#status_display {
|
| 74 |
display: flex;
|
| 75 |
+
min-height: 2em;
|
| 76 |
align-items: flex-end;
|
| 77 |
justify-content: flex-end;
|
| 78 |
}
|
| 79 |
#status_display p {
|
| 80 |
font-size: .85em;
|
| 81 |
+
font-family: ui-monospace, "SF Mono", "SFMono-Regular", "Menlo", "Consolas", "Liberation Mono", "Microsoft Yahei UI", "Microsoft Yahei", monospace;
|
| 82 |
+
/* Windows下中文的monospace会fallback为新宋体,实在太丑,这里折中使用微软雅黑 */
|
| 83 |
color: var(--body-text-color-subdued);
|
| 84 |
}
|
| 85 |
|
| 86 |
+
#status_display {
|
| 87 |
+
transition: all 0.6s;
|
| 88 |
+
}
|
| 89 |
+
#chuanhu_chatbot {
|
| 90 |
+
transition: height 0.3s ease;
|
| 91 |
+
}
|
| 92 |
|
| 93 |
/* usage_display */
|
| 94 |
+
.insert_block {
|
| 95 |
+
position: relative;
|
| 96 |
+
margin: 0;
|
| 97 |
+
padding: .5em 1em;
|
| 98 |
+
box-shadow: var(--block-shadow);
|
| 99 |
+
border-width: var(--block-border-width);
|
| 100 |
+
border-color: var(--block-border-color);
|
| 101 |
+
border-radius: var(--block-radius);
|
| 102 |
+
background: var(--block-background-fill);
|
| 103 |
+
width: 100%;
|
| 104 |
+
line-height: var(--line-sm);
|
| 105 |
+
min-height: 2em;
|
| 106 |
}
|
| 107 |
+
#usage_display p, #usage_display span {
|
| 108 |
+
margin: 0;
|
| 109 |
font-size: .85em;
|
|
|
|
| 110 |
color: var(--body-text-color-subdued);
|
| 111 |
}
|
| 112 |
+
.progress-bar {
|
| 113 |
+
background-color: var(--input-background-fill);;
|
| 114 |
+
margin: .5em 0 !important;
|
| 115 |
+
height: 20px;
|
| 116 |
+
border-radius: 10px;
|
| 117 |
+
overflow: hidden;
|
| 118 |
+
}
|
| 119 |
+
.progress {
|
| 120 |
+
background-color: var(--block-title-background-fill);
|
| 121 |
+
height: 100%;
|
| 122 |
+
border-radius: 10px;
|
| 123 |
+
text-align: right;
|
| 124 |
+
transition: width 0.5s ease-in-out;
|
| 125 |
+
}
|
| 126 |
+
.progress-text {
|
| 127 |
+
/* color: white; */
|
| 128 |
+
color: var(--color-accent) !important;
|
| 129 |
+
font-size: 1em !important;
|
| 130 |
+
font-weight: bold;
|
| 131 |
+
padding-right: 10px;
|
| 132 |
+
line-height: 20px;
|
| 133 |
+
}
|
| 134 |
+
|
| 135 |
+
.apSwitch {
|
| 136 |
+
top: 2px;
|
| 137 |
+
display: inline-block;
|
| 138 |
+
height: 24px;
|
| 139 |
+
position: relative;
|
| 140 |
+
width: 48px;
|
| 141 |
+
border-radius: 12px;
|
| 142 |
+
}
|
| 143 |
+
.apSwitch input {
|
| 144 |
+
display: none !important;
|
| 145 |
+
}
|
| 146 |
+
.apSlider {
|
| 147 |
+
background-color: var(--neutral-200);
|
| 148 |
+
bottom: 0;
|
| 149 |
+
cursor: pointer;
|
| 150 |
+
left: 0;
|
| 151 |
+
position: absolute;
|
| 152 |
+
right: 0;
|
| 153 |
+
top: 0;
|
| 154 |
+
transition: .4s;
|
| 155 |
+
font-size: 18px;
|
| 156 |
+
border-radius: 12px;
|
| 157 |
+
}
|
| 158 |
+
.apSlider::before {
|
| 159 |
+
bottom: -1.5px;
|
| 160 |
+
left: 1px;
|
| 161 |
+
position: absolute;
|
| 162 |
+
transition: .4s;
|
| 163 |
+
content: "🌞";
|
| 164 |
+
}
|
| 165 |
+
input:checked + .apSlider {
|
| 166 |
+
background-color: var(--primary-600);
|
| 167 |
+
}
|
| 168 |
+
input:checked + .apSlider::before {
|
| 169 |
+
transform: translateX(23px);
|
| 170 |
+
content:"🌚";
|
| 171 |
+
}
|
| 172 |
+
|
| 173 |
+
/* Override Slider Styles (for webkit browsers like Safari and Chrome)
|
| 174 |
+
* 好希望这份提案能早日实现 https://github.com/w3c/csswg-drafts/issues/4410
|
| 175 |
+
* 进度滑块在各个平台还是太不统一了
|
| 176 |
+
*/
|
| 177 |
+
input[type="range"] {
|
| 178 |
+
-webkit-appearance: none;
|
| 179 |
+
height: 4px;
|
| 180 |
+
background: var(--input-background-fill);
|
| 181 |
+
border-radius: 5px;
|
| 182 |
+
background-image: linear-gradient(var(--primary-500),var(--primary-500));
|
| 183 |
+
background-size: 0% 100%;
|
| 184 |
+
background-repeat: no-repeat;
|
| 185 |
+
}
|
| 186 |
+
input[type="range"]::-webkit-slider-thumb {
|
| 187 |
+
-webkit-appearance: none;
|
| 188 |
+
height: 20px;
|
| 189 |
+
width: 20px;
|
| 190 |
+
border-radius: 50%;
|
| 191 |
+
border: solid 0.5px #ddd;
|
| 192 |
+
background-color: white;
|
| 193 |
+
cursor: ew-resize;
|
| 194 |
+
box-shadow: var(--input-shadow);
|
| 195 |
+
transition: background-color .1s ease;
|
| 196 |
+
}
|
| 197 |
+
input[type="range"]::-webkit-slider-thumb:hover {
|
| 198 |
+
background: var(--neutral-50);
|
| 199 |
+
}
|
| 200 |
+
input[type=range]::-webkit-slider-runnable-track {
|
| 201 |
+
-webkit-appearance: none;
|
| 202 |
+
box-shadow: none;
|
| 203 |
+
border: none;
|
| 204 |
+
background: transparent;
|
| 205 |
+
}
|
| 206 |
+
|
| 207 |
+
#submit_btn, #cancel_btn {
|
| 208 |
+
height: 42px !important;
|
| 209 |
+
}
|
| 210 |
+
#submit_btn::before {
|
| 211 |
+
content: url("data:image/svg+xml, %3Csvg width='21px' height='20px' viewBox='0 0 21 20' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E %3Cg id='page' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3E %3Cg id='send' transform='translate(0.435849, 0.088463)' fill='%23FFFFFF' fill-rule='nonzero'%3E %3Cpath d='M0.579148261,0.0428666046 C0.301105539,-0.0961547561 -0.036517765,0.122307382 0.0032026237,0.420210298 L1.4927172,18.1553639 C1.5125774,18.4334066 1.79062012,18.5922882 2.04880264,18.4929872 L8.24518329,15.8913017 L11.6412765,19.7441794 C11.8597387,19.9825018 12.2370824,19.8832008 12.3165231,19.5852979 L13.9450591,13.4882182 L19.7839562,11.0255541 C20.0619989,10.8865327 20.0818591,10.4694687 19.7839562,10.3105871 L0.579148261,0.0428666046 Z M11.6138902,17.0883151 L9.85385903,14.7195502 L0.718169621,0.618812241 L12.69945,12.9346347 L11.6138902,17.0883151 Z' id='shape'%3E%3C/path%3E %3C/g%3E %3C/g%3E %3C/svg%3E");
|
| 212 |
+
height: 21px;
|
| 213 |
+
}
|
| 214 |
+
#cancel_btn::before {
|
| 215 |
+
content: url("data:image/svg+xml,%3Csvg width='21px' height='21px' viewBox='0 0 21 21' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E %3Cg id='pg' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3E %3Cpath d='M10.2072007,20.088463 C11.5727865,20.088463 12.8594566,19.8259823 14.067211,19.3010209 C15.2749653,18.7760595 16.3386126,18.0538087 17.2581528,17.1342685 C18.177693,16.2147282 18.8982283,15.1527965 19.4197586,13.9484733 C19.9412889,12.7441501 20.202054,11.4557644 20.202054,10.0833163 C20.202054,8.71773046 19.9395733,7.43106036 19.4146119,6.22330603 C18.8896505,5.01555169 18.1673997,3.95018885 17.2478595,3.0272175 C16.3283192,2.10424615 15.2646719,1.3837109 14.0569176,0.865611739 C12.8491633,0.34751258 11.5624932,0.088463 10.1969073,0.088463 C8.83132146,0.088463 7.54636692,0.34751258 6.34204371,0.865611739 C5.1377205,1.3837109 4.07407321,2.10424615 3.15110186,3.0272175 C2.22813051,3.95018885 1.5058797,5.01555169 0.984349419,6.22330603 C0.46281914,7.43106036 0.202054,8.71773046 0.202054,10.0833163 C0.202054,11.4557644 0.4645347,12.7441501 0.9894961,13.9484733 C1.5144575,15.1527965 2.23670831,16.2147282 3.15624854,17.1342685 C4.07578877,18.0538087 5.1377205,18.7760595 6.34204371,19.3010209 C7.54636692,19.8259823 8.83475258,20.088463 10.2072007,20.088463 Z M10.2072007,18.2562448 C9.07493099,18.2562448 8.01471483,18.0452309 7.0265522,17.6232031 C6.03838956,17.2011753 5.17031614,16.6161693 4.42233192,15.8681851 C3.6743477,15.1202009 3.09105726,14.2521274 2.67246059,13.2639648 C2.25386392,12.2758022 2.04456558,11.215586 2.04456558,10.0833163 C2.04456558,8.95104663 2.25386392,7.89083047 2.67246059,6.90266784 C3.09105726,5.9145052 3.6743477,5.04643178 4.42233192,4.29844756 C5.17031614,3.55046334 6.036674,2.9671729 7.02140552,2.54857623 C8.00613703,2.12997956 9.06463763,1.92068122 10.1969073,1.92068122 C11.329177,1.92068122 12.3911087,2.12997956 13.3827025,2.54857623 C14.3742962,2.9671729 15.2440852,3.55046334 15.9920694,4.29844756 C16.7400537,5.04643178 17.3233441,5.9145052 17.7419408,6.90266784 C18.1605374,7.89083047 18.3698358,8.95104663 18.3698358,10.0833163 C18.3698358,11.215586 18.1605374,12.2758022 17.7419408,13.2639648 C17.3233441,14.2521274 16.7400537,15.1202009 15.9920694,15.8681851 C15.2440852,16.6161693 14.3760118,17.2011753 13.3878492,17.6232031 C12.3996865,18.0452309 11.3394704,18.2562448 10.2072007,18.2562448 Z M7.65444721,13.6242324 L12.7496608,13.6242324 C13.0584616,13.6242324 13.3003556,13.5384544 13.4753427,13.3668984 C13.6503299,13.1953424 13.7378234,12.9585951 13.7378234,12.6566565 L13.7378234,7.49968276 C13.7378234,7.19774418 13.6503299,6.96099688 13.4753427,6.78944087 C13.3003556,6.61788486 13.0584616,6.53210685 12.7496608,6.53210685 L7.65444721,6.53210685 C7.33878414,6.53210685 7.09345904,6.61788486 6.91847191,6.78944087 C6.74348478,6.96099688 6.65599121,7.19774418 6.65599121,7.49968276 L6.65599121,12.6566565 C6.65599121,12.9585951 6.74348478,13.1953424 6.91847191,13.3668984 C7.09345904,13.5384544 7.33878414,13.6242324 7.65444721,13.6242324 Z' id='shape' fill='%23FF3B30' fill-rule='nonzero'%3E%3C/path%3E %3C/g%3E %3C/svg%3E");
|
| 216 |
+
height: 21px;
|
| 217 |
+
}
|
| 218 |
/* list */
|
| 219 |
ol:not(.options), ul:not(.options) {
|
| 220 |
padding-inline-start: 2em !important;
|
| 221 |
}
|
| 222 |
|
| 223 |
+
/* 亮色(默认) */
|
|
|
|
| 224 |
#chuanhu_chatbot {
|
| 225 |
+
background-color: var(--chatbot-background-color-light) !important;
|
| 226 |
+
color: var(--chatbot-color-light) !important;
|
| 227 |
}
|
| 228 |
[data-testid = "bot"] {
|
| 229 |
+
background-color: var(--message-bot-background-color-light) !important;
|
| 230 |
}
|
| 231 |
[data-testid = "user"] {
|
| 232 |
+
background-color: var(--message-user-background-color-light) !important;
|
| 233 |
}
|
| 234 |
+
/* 暗色 */
|
|
|
|
| 235 |
.dark #chuanhu_chatbot {
|
| 236 |
+
background-color: var(--chatbot-background-color-dark) !important;
|
| 237 |
+
color: var(--chatbot-color-dark) !important;
|
| 238 |
}
|
| 239 |
.dark [data-testid = "bot"] {
|
| 240 |
+
background-color: var(--message-bot-background-color-dark) !important;
|
| 241 |
}
|
| 242 |
.dark [data-testid = "user"] {
|
| 243 |
+
background-color: var(--message-user-background-color-dark) !important;
|
| 244 |
}
|
| 245 |
|
| 246 |
+
/* 屏幕宽度大于等于500px的设备 */
|
| 247 |
+
/* update on 2023.4.8: 高度的细致调整已写入JavaScript */
|
| 248 |
+
@media screen and (min-width: 500px) {
|
| 249 |
+
#chuanhu_chatbot {
|
| 250 |
+
height: calc(100vh - 200px);
|
| 251 |
+
}
|
| 252 |
+
#chuanhu_chatbot .wrap {
|
| 253 |
+
max-height: calc(100vh - 200px - var(--line-sm)*1rem - 2*var(--block-label-margin) );
|
| 254 |
+
}
|
| 255 |
}
|
| 256 |
+
/* 屏幕宽度小于500px的设备 */
|
| 257 |
+
@media screen and (max-width: 499px) {
|
| 258 |
+
#chuanhu_chatbot {
|
| 259 |
+
height: calc(100vh - 140px);
|
| 260 |
+
}
|
| 261 |
+
#chuanhu_chatbot .wrap {
|
| 262 |
+
max-height: calc(100vh - 140px - var(--line-sm)*1rem - 2*var(--block-label-margin) );
|
| 263 |
+
}
|
| 264 |
+
[data-testid = "bot"] {
|
| 265 |
+
max-width: 95% !important;
|
| 266 |
+
}
|
| 267 |
+
#app_title h1{
|
| 268 |
+
letter-spacing: -1px; font-size: 22px;
|
| 269 |
+
}
|
| 270 |
+
}
|
| 271 |
+
#chuanhu_chatbot .wrap {
|
| 272 |
+
overflow-x: hidden;
|
| 273 |
+
}
|
| 274 |
+
/* 对话气泡 */
|
| 275 |
+
.message {
|
| 276 |
border-radius: var(--radius-xl) !important;
|
| 277 |
border: none;
|
| 278 |
padding: var(--spacing-xl) !important;
|
|
|
|
| 290 |
width: auto !important;
|
| 291 |
border-bottom-right-radius: 0 !important;
|
| 292 |
}
|
| 293 |
+
|
| 294 |
+
.message p {
|
| 295 |
+
margin-top: 0.6em !important;
|
| 296 |
+
margin-bottom: 0.6em !important;
|
| 297 |
+
}
|
| 298 |
+
.message p:first-child { margin-top: 0 !important; }
|
| 299 |
+
.message p:last-of-type { margin-bottom: 0 !important; }
|
| 300 |
+
|
| 301 |
+
.message .md-message {
|
| 302 |
+
display: block;
|
| 303 |
+
padding: 0 !important;
|
| 304 |
+
}
|
| 305 |
+
.message .raw-message {
|
| 306 |
+
display: block;
|
| 307 |
+
padding: 0 !important;
|
| 308 |
+
white-space: pre-wrap;
|
| 309 |
+
}
|
| 310 |
+
.raw-message.hideM, .md-message.hideM {
|
| 311 |
+
display: none;
|
| 312 |
+
}
|
| 313 |
+
|
| 314 |
+
/* custom buttons */
|
| 315 |
+
.chuanhu-btn {
|
| 316 |
+
border-radius: 5px;
|
| 317 |
+
/* background-color: #E6E6E6 !important; */
|
| 318 |
+
color: rgba(120, 120, 120, 0.64) !important;
|
| 319 |
+
padding: 4px !important;
|
| 320 |
+
position: absolute;
|
| 321 |
+
right: -22px;
|
| 322 |
+
cursor: pointer !important;
|
| 323 |
+
transition: color .2s ease, background-color .2s ease;
|
| 324 |
+
}
|
| 325 |
+
.chuanhu-btn:hover {
|
| 326 |
+
background-color: rgba(167, 167, 167, 0.25) !important;
|
| 327 |
+
color: unset !important;
|
| 328 |
+
}
|
| 329 |
+
.chuanhu-btn:active {
|
| 330 |
+
background-color: rgba(167, 167, 167, 0.5) !important;
|
| 331 |
+
}
|
| 332 |
+
.chuanhu-btn:focus {
|
| 333 |
+
outline: none;
|
| 334 |
+
}
|
| 335 |
+
.copy-bot-btn {
|
| 336 |
+
/* top: 18px; */
|
| 337 |
+
bottom: 0;
|
| 338 |
+
}
|
| 339 |
+
.toggle-md-btn {
|
| 340 |
+
/* top: 0; */
|
| 341 |
+
bottom: 20px;
|
| 342 |
+
}
|
| 343 |
+
.copy-code-btn {
|
| 344 |
+
position: relative;
|
| 345 |
+
float: right;
|
| 346 |
+
font-size: 1em;
|
| 347 |
+
cursor: pointer;
|
| 348 |
+
}
|
| 349 |
+
|
| 350 |
+
.message-wrap>div img{
|
| 351 |
+
border-radius: 10px !important;
|
| 352 |
+
}
|
| 353 |
+
|
| 354 |
+
/* history message */
|
| 355 |
+
.wrap>.history-message {
|
| 356 |
+
padding: 10px !important;
|
| 357 |
+
}
|
| 358 |
+
.history-message {
|
| 359 |
+
/* padding: 0 !important; */
|
| 360 |
+
opacity: 80%;
|
| 361 |
+
display: flex;
|
| 362 |
+
flex-direction: column;
|
| 363 |
+
}
|
| 364 |
+
.history-message>.history-message {
|
| 365 |
+
padding: 0 !important;
|
| 366 |
+
}
|
| 367 |
+
.history-message>.message-wrap {
|
| 368 |
+
padding: 0 !important;
|
| 369 |
+
margin-bottom: 16px;
|
| 370 |
+
}
|
| 371 |
+
.history-message>.message {
|
| 372 |
+
margin-bottom: 16px;
|
| 373 |
+
}
|
| 374 |
+
.wrap>.history-message::after {
|
| 375 |
+
content: "";
|
| 376 |
+
display: block;
|
| 377 |
+
height: 2px;
|
| 378 |
+
background-color: var(--body-text-color-subdued);
|
| 379 |
+
margin-bottom: 10px;
|
| 380 |
+
margin-top: -10px;
|
| 381 |
+
clear: both;
|
| 382 |
+
}
|
| 383 |
+
.wrap>.history-message>:last-child::after {
|
| 384 |
+
content: "仅供查看";
|
| 385 |
+
display: block;
|
| 386 |
+
text-align: center;
|
| 387 |
+
color: var(--body-text-color-subdued);
|
| 388 |
+
font-size: 0.8em;
|
| 389 |
+
}
|
| 390 |
+
|
| 391 |
+
/* 表格 */
|
| 392 |
table {
|
| 393 |
margin: 1em 0;
|
| 394 |
border-collapse: collapse;
|
|
|
|
| 404 |
thead th {
|
| 405 |
padding: .5em .2em;
|
| 406 |
}
|
| 407 |
+
/* 行内代码 */
|
| 408 |
code {
|
| 409 |
display: inline;
|
| 410 |
white-space: break-spaces;
|
|
|
|
| 413 |
padding: .2em .4em .1em .4em;
|
| 414 |
background-color: rgba(175,184,193,0.2);
|
| 415 |
}
|
| 416 |
+
/* 代码块 */
|
| 417 |
pre code {
|
| 418 |
display: block;
|
| 419 |
overflow: auto;
|
|
|
|
| 421 |
background-color: hsla(0, 0%, 0%, 80%)!important;
|
| 422 |
border-radius: 10px;
|
| 423 |
padding: 1.4em 1.2em 0em 1.4em;
|
| 424 |
+
margin: 0.6em 2em 1em 0.2em;
|
| 425 |
color: #FFF;
|
| 426 |
box-shadow: 6px 6px 16px hsla(0, 0%, 0%, 0.2);
|
| 427 |
}
|
| 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 */
|