code-slicer commited on
Commit
ad27fd9
Β·
verified Β·
1 Parent(s): 91e4cb9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -4
app.py CHANGED
@@ -398,13 +398,24 @@ def make_key(row) -> tuple[str, str]:
398
  # ───────────────────────────────────── streamlit μ˜μ—­ μ„ μ–Έ
399
  st.set_page_config(page_title="여행은 λͺ¨λ‘νˆ¬μ–΄ : λͺ¨μ•„(MoAi)", layout="centered")
400
 
401
- st.markdown("""
 
 
402
  <style>
403
- /* μ‚¬μ΄λ“œλ°” κ³ μ • */
404
- [data-testid="stSidebar"]{
 
 
405
  position: fixed !important;
 
 
 
 
406
  height: 100vh !important;
407
- }
 
 
 
408
  </style>
409
  """, unsafe_allow_html=True)
410
 
 
398
  # ───────────────────────────────────── streamlit μ˜μ—­ μ„ μ–Έ
399
  st.set_page_config(page_title="여행은 λͺ¨λ‘νˆ¬μ–΄ : λͺ¨μ•„(MoAi)", layout="centered")
400
 
401
+ SIDEBAR_W = 340 # ν•„μš”μ‹œ μ‚¬μ΄λ“œλ°” 폭만 λ°”κΎΈμ„Έμš”
402
+
403
+ st.markdown(f"""
404
  <style>
405
+ :root {{ --sidebar-w: {SIDEBAR_W}px; }}
406
+
407
+ /* 1) μ‚¬μ΄λ“œλ°”λ₯Ό λ·°ν¬νŠΈμ— κ³ μ • */
408
+ aside[data-testid="stSidebar"], [data-testid="stSidebar"] {{
409
  position: fixed !important;
410
+ inset: 0 auto 0 0; /* top:0; right:auto; bottom:0; left:0 */
411
+ width: var(--sidebar-w) !important;
412
+ min-width: var(--sidebar-w) !important;
413
+ max-width: var(--sidebar-w) !important;
414
  height: 100vh !important;
415
+ z-index: 1000;
416
+ background: var(--sidebar-background-color, #ffffff);
417
+ border-right: 1px solid rgba(0,0,0,0.06);
418
+ }}
419
  </style>
420
  """, unsafe_allow_html=True)
421