timagonch commited on
Commit
4fb5b02
·
1 Parent(s): 541189f

Fix easter egg button visibility — scoped CSS, larger emoji, removed broken fixed position

Browse files
Files changed (1) hide show
  1. app.py +14 -15
app.py CHANGED
@@ -222,23 +222,20 @@ def log_prediction(text, result):
222
 
223
  st.markdown("""
224
  <style>
225
- div[data-testid="stPopover"] {
226
- position: fixed;
227
- top: 14px;
228
- right: 60px;
229
- z-index: 9999;
230
- }
231
- div[data-testid="stPopover"] button {
232
- opacity: 0.22;
233
- transition: opacity 0.25s ease;
234
- font-size: 22px;
235
- color: #aaa;
236
- border: none;
237
  background: transparent;
238
- padding: 4px 10px;
 
 
 
 
 
239
  }
240
- div[data-testid="stPopover"] button:hover {
241
- opacity: 0.75;
242
  }
243
  </style>
244
  """, unsafe_allow_html=True)
@@ -255,8 +252,10 @@ with title_col:
255
  st.caption("Dual BERTweet model · type a social media post to classify it.")
256
 
257
  with egg_col:
 
258
  with st.popover("🔬"):
259
  st.markdown(ABOUT_MD)
 
260
 
261
 
262
  # ─────────────────────────────────────────────────────────────────────
 
222
 
223
  st.markdown("""
224
  <style>
225
+ .easter-egg-col div[data-testid="stPopover"] button {
226
+ opacity: 0.15;
227
+ transition: opacity 0.3s ease;
228
+ font-size: 28px;
 
 
 
 
 
 
 
 
229
  background: transparent;
230
+ border: none;
231
+ padding: 0;
232
+ line-height: 1;
233
+ }
234
+ .easter-egg-col div[data-testid="stPopover"] button:hover {
235
+ opacity: 0.85;
236
  }
237
+ .easter-egg-col div[data-testid="stPopover"] button p {
238
+ font-size: 28px !important;
239
  }
240
  </style>
241
  """, unsafe_allow_html=True)
 
252
  st.caption("Dual BERTweet model · type a social media post to classify it.")
253
 
254
  with egg_col:
255
+ st.markdown('<div class="easter-egg-col">', unsafe_allow_html=True)
256
  with st.popover("🔬"):
257
  st.markdown(ABOUT_MD)
258
+ st.markdown('</div>', unsafe_allow_html=True)
259
 
260
 
261
  # ─────────────────────────────────────────────────────────────────────