Spaces:
Sleeping
Sleeping
Keldos
commited on
Commit
•
2b89e91
1
Parent(s):
76208cf
调整 UI (对话框样式)
Browse files* 减小对话内容字号
* 干掉对话气泡边框
* 减小对话框三角圆角
* 紧凑对话框边距
* 用户气泡宽度随内容多少调整
* bot气泡宽度固定为85%
* 微调了description的上下边距
note: 使用了gradio的CSS变量而没有直接填写固定值,效果可能会在下一次gradio更新时产生变动。
- presets.py +17 -1
presets.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
# -*- coding:utf-8 -*-
|
2 |
title = """<h1 align="left" style="min-width:200px; margin-top:0;">川虎ChatGPT 🚀</h1>"""
|
3 |
-
description = """<div align="center" style="margin
|
4 |
|
5 |
由Bilibili [土川虎虎虎](https://space.bilibili.com/29125536) 和 [明昭MZhao](https://space.bilibili.com/24807452)开发
|
6 |
|
@@ -21,6 +21,22 @@ customCSS = """
|
|
21 |
font-family: monospace;
|
22 |
color: var(--text-color-subdued) !important;
|
23 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
code {
|
25 |
display: inline;
|
26 |
white-space: break-spaces;
|
|
|
1 |
# -*- coding:utf-8 -*-
|
2 |
title = """<h1 align="left" style="min-width:200px; margin-top:0;">川虎ChatGPT 🚀</h1>"""
|
3 |
+
description = """<div align="center" style="margin:16px 0">
|
4 |
|
5 |
由Bilibili [土川虎虎虎](https://space.bilibili.com/29125536) 和 [明昭MZhao](https://space.bilibili.com/24807452)开发
|
6 |
|
|
|
21 |
font-family: monospace;
|
22 |
color: var(--text-color-subdued) !important;
|
23 |
}
|
24 |
+
[class *= "message"] {
|
25 |
+
border-radius: var(--radius-xl) !important;
|
26 |
+
border: none;
|
27 |
+
padding: var(--spacing-xl) !important;
|
28 |
+
font-size: var(--text-md) !important;
|
29 |
+
line-height: var(--line-md) !important;
|
30 |
+
}
|
31 |
+
[data-testid = "bot"] {
|
32 |
+
max-width: 85%;
|
33 |
+
border-bottom-left-radius: 0 !important;
|
34 |
+
}
|
35 |
+
[data-testid = "user"] {
|
36 |
+
max-width: 85%;
|
37 |
+
width: auto !important;
|
38 |
+
border-bottom-right-radius: 0 !important;
|
39 |
+
}
|
40 |
code {
|
41 |
display: inline;
|
42 |
white-space: break-spaces;
|