main.css 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344
  1. /* 屏幕宽度大于等于500px的设备 */
  2. @media screen and (min-width: 500px) {
  3. #chatbot, #chatbot_classic, #chatbot_classic textarea{
  4. height: 100%;
  5. max-height: calc(58vw - 200px);
  6. min-height: calc(58vw - 400px);
  7. }
  8. #chatbot .wrap, #chatbot_classic, #chatbot_classic textarea{
  9. max-height: 100%;
  10. }
  11. #container_row {
  12. flex-direction: row-reverse;
  13. }
  14. }
  15. /* 屏幕宽度小于500px的设备 */
  16. @media screen and (max-width: 499px) {
  17. #chatbot , #chatbot_classic, #chatbot_classic textarea{
  18. height: 300px;
  19. }
  20. #chatbot .wrap ,#chatbot_classic, #chatbot_classic textarea{
  21. max-height: 100%;
  22. }
  23. #container_row {
  24. flex-direction: column;
  25. }
  26. #chatbot {
  27. max-width: 91vw;
  28. }
  29. }
  30. body, .gradio-container {
  31. background-color: #fff;
  32. }
  33. .gradio-container.app {
  34. max-width: none !important;
  35. }
  36. #gallery {
  37. max-height: 450px;
  38. }
  39. /* status_display */
  40. #status_display > .wrap {
  41. display: none;
  42. }
  43. #status_display {
  44. display: flex;
  45. min-height: 2.5em;
  46. align-items: flex-end;
  47. justify-content: flex-end;
  48. color: rgba(98,74,255,.8);
  49. }
  50. #status_display p {
  51. font-size: .85em;
  52. font-family: monospace;
  53. color: var(--body-text-color-subdued);
  54. }
  55. #container_row button {
  56. border-radius: 0;
  57. box-shadow: none;
  58. }
  59. #container_row button.primary {
  60. border: 1px solid #624aff;
  61. background: #624aff;
  62. color: #fff;
  63. }
  64. #container_row button.secondary {
  65. border: 1px solid rgba(98,74,255,.8);
  66. color: rgba(98,74,255,.8);
  67. }
  68. #container_row .form {
  69. border-radius: 0;
  70. }
  71. #chat-input textarea {
  72. border: 1px solid #e5e7eb;
  73. border-radius: 0;
  74. }
  75. #chat-examples .gallery {
  76. text-align: left;
  77. font-size: 12px;
  78. }
  79. #chat-container {
  80. flex: 1;
  81. }
  82. #chat-bottom-container button.secondary {
  83. font-weight: 600;
  84. font-size: 16px;
  85. }
  86. .robot-info {
  87. display: flex;
  88. justify-content: center;
  89. align-items: center;
  90. }
  91. .robot-info > img {
  92. width: 20%;
  93. }
  94. .robot-info .robot-info-text {
  95. padding: 10px;
  96. color: #624aff;
  97. }
  98. .uploaded-image-box > img {
  99. width: 100px;
  100. }
  101. #settings .tab-nav button {
  102. border: none;
  103. }
  104. #settings .tab-nav {
  105. border: none;
  106. }
  107. #settings .tabitem {
  108. border: none;
  109. padding: 0px;
  110. }
  111. #clear_session_button , #refresh_settings_button, #regenerate_button, #classic_button{
  112. font-size: 1em;
  113. font-weight: normal;
  114. }
  115. #chatbot_classic{
  116. height: 100%;
  117. }
  118. #chatbot {
  119. border-radius: 0;
  120. border: 1px solid #e5e7eb;
  121. box-shadow: var(--shadow-drop);
  122. }
  123. /* 对话气泡 */
  124. #chatbot [class *= "message"] {
  125. border-radius: var(--radius-md) !important;
  126. border: none;
  127. padding: var(--spacing-xl) !important;
  128. min-height: calc(var(--text-md) * var(--line-lg) + 2 * var(--spacing-xl));
  129. min-width: calc(var(--text-md) * var(--line-lg) + 2 * var(--spacing-xl));
  130. white-space: pre-line;
  131. word-wrap: break-word;
  132. font-size: 1rem;
  133. line-height: 1.5rem;
  134. }
  135. #chatbot .bot {
  136. max-width: 85%;
  137. border-bottom-left-radius: 0 !important;
  138. margin-left: 38px;
  139. }
  140. #chatbot .bot::before {
  141. content: '';
  142. display: block;
  143. width: 30px;
  144. height: 30px;
  145. background-image: url(//img.alicdn.com/imgextra/i4/O1CN01PRJFWt1PU8nZDGIKZ_!!6000000001843-0-tps-128-128.jpg);
  146. background-size: cover;
  147. background-repeat: no-repeat;
  148. position: absolute;
  149. top: 5px;
  150. left: -38px;
  151. }
  152. #chatbot .bot img{
  153. max-height: 400px !important;
  154. }
  155. #chatbot .user {
  156. max-width: 85%;
  157. width: auto !important;
  158. border-bottom-right-radius: 0 !important;
  159. }
  160. #chatbot .bot > ol {
  161. padding-left: 30px;
  162. }
  163. #chatbot .bot > ul {
  164. padding-left: 30px;
  165. }
  166. #chatbot summary {
  167. font-size: 0.9em;
  168. font-style: italic;
  169. background-color: var(--secondary-400);
  170. padding-left: 8px;
  171. }
  172. #chatbot .bot details:not(:last-child) {
  173. border-bottom: 1px solid #f7f8f9;
  174. }
  175. /* 表格 */
  176. table {
  177. border-radius: var(--radius-xl) !important;
  178. margin: 1em 0;
  179. border-collapse: collapse;
  180. empty-cells: show;
  181. font-size: 14px;
  182. }
  183. td,th {
  184. font-weight: var(--base-text-weight-semibold, 600);
  185. padding: 6px 13px;
  186. border: 1px solid #d0d7de;
  187. }
  188. thead {
  189. background-color: rgba(175,184,193,0.2);
  190. }
  191. thead {
  192. padding: 6px 13px;
  193. }
  194. table tr:nth-child(2n) {
  195. background-color: var(--color-canvas-subtle)
  196. }
  197. table img {
  198. background-color: transparent
  199. }
  200. .codehilite .copy-button {
  201. display: none;
  202. }
  203. .codehilite {
  204. background: #1d1d1dfc;
  205. color: #666;
  206. page-break-inside: avoid;
  207. max-width: 100%;
  208. display: block;
  209. word-wrap: break-word;
  210. overflow: auto;
  211. overflow-x: auto;
  212. counter-reset: line;
  213. padding-left: 5px;
  214. }
  215. .codehilitetable .codehilite {
  216. border: 0px solid #3e3e3ed6;
  217. box-shadow: inset 0 0 0px #000;
  218. }
  219. pre { line-height: 125%; }
  220. td.linenos .normal { color: #37474F; background-color: #263238; padding-left: 5px; padding-right: 5px; }
  221. span.linenos { color: #37474F; background-color: #263238; padding-left: 5px; padding-right: 5px; }
  222. td.linenos .special { color: #607A86; background-color: #263238; padding-left: 5px; padding-right: 5px; }
  223. span.linenos.special { color: #607A86; background-color: #263238; padding-left: 5px; padding-right: 5px; }
  224. .codehilite .hll { background-color: #2C3B41 }
  225. .codehilite { background: #263238; color: #EEFFFF }
  226. .codehilite .c { color: #546E7A; font-style: italic } /* Comment */
  227. .codehilite .err { color: #FF5370 } /* Error */
  228. .codehilite .esc { color: #89DDFF } /* Escape */
  229. .codehilite .g { color: #EEFFFF } /* Generic */
  230. .codehilite .k { color: #BB80B3 } /* Keyword */
  231. .codehilite .l { color: #C3E88D } /* Literal */
  232. .codehilite .n { color: #EEFFFF } /* Name */
  233. .codehilite .o { color: #89DDFF } /* Operator */
  234. .codehilite .p { color: #89DDFF } /* Punctuation */
  235. .codehilite .ch { color: #546E7A; font-style: italic } /* Comment.Hashbang */
  236. .codehilite .cm { color: #546E7A; font-style: italic } /* Comment.Multiline */
  237. .codehilite .cp { color: #546E7A; font-style: italic } /* Comment.Preproc */
  238. .codehilite .cpf { color: #546E7A; font-style: italic } /* Comment.PreprocFile */
  239. .codehilite .c1 { color: #546E7A; font-style: italic } /* Comment.Single */
  240. .codehilite .cs { color: #546E7A; font-style: italic } /* Comment.Special */
  241. .codehilite .gd { color: #FF5370 } /* Generic.Deleted */
  242. .codehilite .ge { color: #89DDFF } /* Generic.Emph */
  243. .codehilite .gr { color: #FF5370 } /* Generic.Error */
  244. .codehilite .gh { color: #C3E88D } /* Generic.Heading */
  245. .codehilite .gi { color: #C3E88D } /* Generic.Inserted */
  246. .codehilite .go { color: #546E7A } /* Generic.Output */
  247. .codehilite .gp { color: #FFCB6B } /* Generic.Prompt */
  248. .codehilite .gs { color: #FF5370 } /* Generic.Strong */
  249. .codehilite .gu { color: #89DDFF } /* Generic.Subheading */
  250. .codehilite .gt { color: #FF5370 } /* Generic.Traceback */
  251. .codehilite .kc { color: #89DDFF } /* Keyword.Constant */
  252. .codehilite .kd { color: #BB80B3 } /* Keyword.Declaration */
  253. .codehilite .kn { color: #89DDFF; font-style: italic } /* Keyword.Namespace */
  254. .codehilite .kp { color: #89DDFF } /* Keyword.Pseudo */
  255. .codehilite .kr { color: #BB80B3 } /* Keyword.Reserved */
  256. .codehilite .kt { color: #BB80B3 } /* Keyword.Type */
  257. .codehilite .ld { color: #C3E88D } /* Literal.Date */
  258. .codehilite .m { color: #F78C6C } /* Literal.Number */
  259. .codehilite .s { color: #C3E88D } /* Literal.String */
  260. .codehilite .na { color: #BB80B3 } /* Name.Attribute */
  261. .codehilite .nb { color: #82AAFF } /* Name.Builtin */
  262. .codehilite .nc { color: #FFCB6B } /* Name.Class */
  263. .codehilite .no { color: #EEFFFF } /* Name.Constant */
  264. .codehilite .nd { color: #82AAFF } /* Name.Decorator */
  265. .codehilite .ni { color: #89DDFF } /* Name.Entity */
  266. .codehilite .ne { color: #FFCB6B } /* Name.Exception */
  267. .codehilite .nf { color: #82AAFF } /* Name.Function */
  268. .codehilite .nl { color: #82AAFF } /* Name.Label */
  269. .codehilite .nn { color: #FFCB6B } /* Name.Namespace */
  270. .codehilite .nx { color: #EEFFFF } /* Name.Other */
  271. .codehilite .py { color: #FFCB6B } /* Name.Property */
  272. .codehilite .nt { color: #FF5370 } /* Name.Tag */
  273. .codehilite .nv { color: #89DDFF } /* Name.Variable */
  274. .codehilite .ow { color: #89DDFF; font-style: italic } /* Operator.Word */
  275. .codehilite .pm { color: #89DDFF } /* Punctuation.Marker */
  276. .codehilite .w { color: #EEFFFF } /* Text.Whitespace */
  277. .codehilite .mb { color: #F78C6C } /* Literal.Number.Bin */
  278. .codehilite .mf { color: #F78C6C } /* Literal.Number.Float */
  279. .codehilite .mh { color: #F78C6C } /* Literal.Number.Hex */
  280. .codehilite .mi { color: #F78C6C } /* Literal.Number.Integer */
  281. .codehilite .mo { color: #F78C6C } /* Literal.Number.Oct */
  282. .codehilite .sa { color: #BB80B3 } /* Literal.String.Affix */
  283. .codehilite .sb { color: #C3E88D } /* Literal.String.Backtick */
  284. .codehilite .sc { color: #C3E88D } /* Literal.String.Char */
  285. .codehilite .dl { color: #EEFFFF } /* Literal.String.Delimiter */
  286. .codehilite .sd { color: #546E7A; font-style: italic } /* Literal.String.Doc */
  287. .codehilite .s2 { color: #C3E88D } /* Literal.String.Double */
  288. .codehilite .se { color: #EEFFFF } /* Literal.String.Escape */
  289. .codehilite .sh { color: #C3E88D } /* Literal.String.Heredoc */
  290. .codehilite .si { color: #89DDFF } /* Literal.String.Interpol */
  291. .codehilite .sx { color: #C3E88D } /* Literal.String.Other */
  292. .codehilite .sr { color: #89DDFF } /* Literal.String.Regex */
  293. .codehilite .s1 { color: #C3E88D } /* Literal.String.Single */
  294. .codehilite .ss { color: #89DDFF } /* Literal.String.Symbol */
  295. .codehilite .bp { color: #89DDFF } /* Name.Builtin.Pseudo */
  296. .codehilite .fm { color: #82AAFF } /* Name.Function.Magic */
  297. .codehilite .vc { color: #89DDFF } /* Name.Variable.Class */
  298. .codehilite .vg { color: #89DDFF } /* Name.Variable.Global */
  299. .codehilite .vi { color: #89DDFF } /* Name.Variable.Instance */
  300. .codehilite .vm { color: #82AAFF } /* Name.Variable.Magic */
  301. .codehilite .il { color: #F78C6C } /* Literal.Number.Integer.Long */