AlauStone commited on
Commit
33376f3
·
verified ·
1 Parent(s): 526b467

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +41 -21
app.py CHANGED
@@ -61,56 +61,62 @@ def inject_custom_css():
61
  height: 2.5rem !important;
62
  background: transparent !important;
63
  }
64
- /* 左上角侧边栏按钮:替换箭头为「☰ 菜单」 */
65
  [data-testid="stSidebarCollapsedControl"] {
66
  top: 0.4rem !important;
67
  left: 0.5rem !important;
68
  }
69
  [data-testid="stSidebarCollapsedControl"] button {
70
- background: #f0f2f6 !important;
71
- border-radius: 8px !important;
72
- padding: 4px 10px !important;
73
- border: 1px solid #ddd !important;
 
 
 
74
  }
75
  [data-testid="stSidebarCollapsedControl"] button svg { display: none !important; }
76
  [data-testid="stSidebarCollapsedControl"] button::after {
77
  content: "☰ 菜单";
78
  font-size: 14px;
79
- color: #444;
80
- letter-spacing: 1px;
81
  }
82
- /* 侧边栏展开后的收起按钮 */
83
  [data-testid="stSidebarCollapseButton"] button {
84
- background: #f0f2f6 !important;
85
- border-radius: 8px !important;
86
- padding: 4px 10px !important;
87
- border: 1px solid #ddd !important;
 
 
 
88
  }
89
  [data-testid="stSidebarCollapseButton"] button svg { display: none !important; }
90
  [data-testid="stSidebarCollapseButton"] button::after {
91
  content: "✕ 收起";
92
  font-size: 14px;
93
- color: #444;
94
- letter-spacing: 1px;
95
  }
96
- /* 右上角三点菜单:替换为「⚙ 设置」按钮风格 */
97
  [data-testid="stMainMenu"] {
98
  position: fixed !important;
99
  top: 0.55rem !important;
100
  right: 0.5rem !important;
101
  }
102
  [data-testid="stMainMenu"] button {
103
- background: #f0f2f6 !important;
104
- border-radius: 8px !important;
105
- padding: 4px 10px !important;
106
- border: 1px solid #ddd !important;
 
 
 
107
  }
108
  [data-testid="stMainMenu"] button svg { display: none !important; }
109
  [data-testid="stMainMenu"] button::before {
110
  content: "⚙ 设置";
111
  font-size: 14px;
112
- color: #444;
113
- letter-spacing: 1px;
114
  }
115
  /* 主内容区域:限制在标题和搜索框之间 */
116
  .block-container {
@@ -174,6 +180,20 @@ def inject_custom_css():
174
  margin-bottom: 0.5rem !important;
175
  }
176
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
177
  /* 确保聊天容器可滚动 */
178
  [data-testid="stVerticalBlockBorderWrapper"] {
179
  overflow-y: auto !important;
 
61
  height: 2.5rem !important;
62
  background: transparent !important;
63
  }
64
+ /* 左上角侧边栏按钮:替换箭头为「☰ 菜单」- 无边框风格 */
65
  [data-testid="stSidebarCollapsedControl"] {
66
  top: 0.4rem !important;
67
  left: 0.5rem !important;
68
  }
69
  [data-testid="stSidebarCollapsedControl"] button {
70
+ background: transparent !important;
71
+ border: none !important;
72
+ padding: 4px 8px !important;
73
+ }
74
+ [data-testid="stSidebarCollapsedControl"] button:hover {
75
+ background: rgba(0,0,0,0.05) !important;
76
+ border-radius: 6px !important;
77
  }
78
  [data-testid="stSidebarCollapsedControl"] button svg { display: none !important; }
79
  [data-testid="stSidebarCollapsedControl"] button::after {
80
  content: "☰ 菜单";
81
  font-size: 14px;
82
+ color: #666;
 
83
  }
84
+ /* 侧边栏展开后的收起按钮 - 无边框风格 */
85
  [data-testid="stSidebarCollapseButton"] button {
86
+ background: transparent !important;
87
+ border: none !important;
88
+ padding: 4px 8px !important;
89
+ }
90
+ [data-testid="stSidebarCollapseButton"] button:hover {
91
+ background: rgba(0,0,0,0.05) !important;
92
+ border-radius: 6px !important;
93
  }
94
  [data-testid="stSidebarCollapseButton"] button svg { display: none !important; }
95
  [data-testid="stSidebarCollapseButton"] button::after {
96
  content: "✕ 收起";
97
  font-size: 14px;
98
+ color: #666;
 
99
  }
100
+ /* 右上角三点菜单:替换为「⚙ 设置」- 无边框风格 */
101
  [data-testid="stMainMenu"] {
102
  position: fixed !important;
103
  top: 0.55rem !important;
104
  right: 0.5rem !important;
105
  }
106
  [data-testid="stMainMenu"] button {
107
+ background: transparent !important;
108
+ border: none !important;
109
+ padding: 4px 8px !important;
110
+ }
111
+ [data-testid="stMainMenu"] button:hover {
112
+ background: rgba(0,0,0,0.05) !important;
113
+ border-radius: 6px !important;
114
  }
115
  [data-testid="stMainMenu"] button svg { display: none !important; }
116
  [data-testid="stMainMenu"] button::before {
117
  content: "⚙ 设置";
118
  font-size: 14px;
119
+ color: #666;
 
120
  }
121
  /* 主内容区域:限制在标题和搜索框之间 */
122
  .block-container {
 
180
  margin-bottom: 0.5rem !important;
181
  }
182
 
183
+ /* 底部工具栏按钮:无边框风格,统一颜色 */
184
+ .stMainBlockContainer > div > div > div:has([data-testid="stPopover"]) button {
185
+ background: transparent !important;
186
+ border: none !important;
187
+ box-shadow: none !important;
188
+ color: #666 !important;
189
+ }
190
+ .stMainBlockContainer > div > div > div:has([data-testid="stPopover"]) button:hover {
191
+ background: rgba(0,0,0,0.05) !important;
192
+ }
193
+ .stMainBlockContainer > div > div > div:has([data-testid="stPopover"]) button p {
194
+ color: #666 !important;
195
+ }
196
+
197
  /* 确保聊天容器可滚动 */
198
  [data-testid="stVerticalBlockBorderWrapper"] {
199
  overflow-y: auto !important;