DeepLearning101 commited on
Commit
1ff489b
·
verified ·
1 Parent(s): ddcc970

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +26 -10
src/streamlit_app.py CHANGED
@@ -18,26 +18,42 @@ st.markdown(
18
  scrollbar-width: none;
19
  }
20
 
21
- /* 2. 調整範例按鈕樣式 */
22
  .stButton button {
23
  width: auto;
24
  padding: 5px 15px;
25
  border-radius: 20px;
26
- border: 1px solid #D4AF37; /* 加入一點微奢華的金色邊框 */
 
 
27
  }
28
 
29
- /* 3. 極度壓縮頂部空白邊距專為小視窗優化 */
30
- .block-container {
31
- padding-top: 1.5rem !important;
32
- padding-bottom: 5rem !important; /* 底部留白避免對話被輸入框蓋住 */
33
- padding-left: 1rem !important;
34
- padding-right: 1rem !important;
35
  }
36
 
37
- /* 4. 隱藏 Streamlit 預設頂部裝飾與漢堡選單 */
38
- header {
39
  visibility: hidden;
40
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
41
  </style>
42
  """,
43
  unsafe_allow_html=True
 
18
  scrollbar-width: none;
19
  }
20
 
21
+ /* 2. 調整範例按鈕樣式 (維持科技藍) */
22
  .stButton button {
23
  width: auto;
24
  padding: 5px 15px;
25
  border-radius: 20px;
26
+ border: 1px solid #58a6ff;
27
+ color: #58a6ff;
28
+ background-color: transparent;
29
  }
30
 
31
+ /* 🚀 3. 關鍵修正:隱藏 Header 背景選單但保留左側展開按鈕 */
32
+ header[data-testid="stHeader"] {
33
+ background-color: rgba(0,0,0,0) !important; /* 背景透明 */
34
+ color: #58a6ff !important;
 
 
35
  }
36
 
37
+ /* 隱藏右側「...」選單按鈕 */
38
+ header[data-testid="stHeader"] #MainMenu {
39
  visibility: hidden;
40
  }
41
+
42
+ /* 確保左側的展開按鈕 (CollapsedControl) 是可見的 */
43
+ div[data-testid="collapsedControl"] {
44
+ visibility: visible !important;
45
+ background-color: #0d1117 !important; /* 給它一點深色背景,免得在白色畫面上看不見 */
46
+ border-radius: 0 5px 5px 0;
47
+ top: 10px;
48
+ }
49
+
50
+ /* 4. 壓縮主畫面邊距 */
51
+ .block-container {
52
+ padding-top: 2rem !important;
53
+ padding-bottom: 5rem !important;
54
+ padding-left: 1rem !important;
55
+ padding-right: 1rem !important;
56
+ }
57
  </style>
58
  """,
59
  unsafe_allow_html=True