code-slicer commited on
Commit
1489759
Β·
verified Β·
1 Parent(s): 41f4baa

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +23 -0
app.py CHANGED
@@ -187,6 +187,29 @@ st.markdown(
187
  unsafe_allow_html=True,
188
  )
189
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
190
 
191
  # ── P κΈ€κΌ΄ 크기 14 px ───────────────────────────────────
192
  st.markdown("""
 
187
  unsafe_allow_html=True,
188
  )
189
 
190
+ # Unsplash 이미지: source.unsplash.com은 사진 ID둜 직접 이미지λ₯Ό μ„œλΉ™ν•©λ‹ˆλ‹€.
191
+ BG_URL = "https://source.unsplash.com/72Q4qUGGAbU/1080Γ—1920" # ν•΄μƒλ„λŠ” μ›ν•˜μ‹œλŠ” λŒ€λ‘œ μ‘°μ •
192
+
193
+ st.markdown(f"""
194
+ <style>
195
+ /* λ³Έλ¬Έ μœ„μ—, λ°°κ²½ μ΄λ―Έμ§€λ§Œ λ‹΄κΈ΄ κ³ μ • λ ˆμ΄μ–΄λ₯Ό μ˜¬λ¦½λ‹ˆλ‹€ */
196
+ .stApp::before {{
197
+ content: "";
198
+ position: fixed; inset: 0;
199
+ background: url('{BG_URL}') center/cover no-repeat;
200
+ opacity: .5; /* ← 투λͺ…도 50% */
201
+ pointer-events: none; /* 클릭 막지 μ•ŠκΈ° */
202
+ z-index: 0;
203
+ }}
204
+ /* μ»¨ν…μΈ λŠ” κ·Έ μœ„λ‘œ */
205
+ .block-container {{ position: relative; z-index: 1; }}
206
+
207
+ /* λͺ¨λ°”일(일뢀 λΈŒλΌμš°μ €)μ—μ„œ κ³ μ • λ°°κ²½ 이슈 λŒ€μ‘ */
208
+ @media (max-width: 768px){{
209
+ .stApp::before{{ background-attachment: initial; }}
210
+ }}
211
+ </style>
212
+ """, unsafe_allow_html=True)
213
 
214
  # ── P κΈ€κΌ΄ 크기 14 px ───────────────────────────────────
215
  st.markdown("""