aidn commited on
Commit
f81a7fc
·
verified ·
1 Parent(s): 46c20e3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -6
app.py CHANGED
@@ -263,17 +263,16 @@ def _render_leaderboard() -> str:
263
  white-space:pre-wrap;">{full}</div>
264
  </details>""" if has_more else f'<div style="font-size:.78rem;color:#555;line-height:1.45;margin-bottom:4px;">{preview}</div>'
265
 
266
- # NEU: Der Badge Export Button für die Top 3
267
  btn_html = ""
268
  if rank < 3:
269
- # Strings sauber escapen, damit sie das JavaScript nicht kaputt machen
270
  verdict_esc = e.get('verdict', '').replace("'", "\\'").replace('"', '&quot;').replace('\n', ' ')
271
  btn_html = f"""
272
  <button onclick="exportBadgePNG('{side}', '{pct}', '{e['total']}/{e['max']}', '{verdict_esc}', '{medal}', '{e.get('date', '')}')"
273
- style="margin-top:12px; background:#0A66C2; color:#fff; border:none; border-radius:4px; padding:6px 14px; font-size:.75rem; font-weight:bold; cursor:pointer; display:inline-flex; align-items:center; gap:6px; box-shadow:0 2px 4px rgba(0,0,0,0.1); transition: background 0.2s;"
274
- onmouseover="this.style.background='#004182'"
275
- onmouseout="this.style.background='#0A66C2'">
276
- 📸 Badge als PNG exportieren
277
  </button>
278
  """
279
 
 
263
  white-space:pre-wrap;">{full}</div>
264
  </details>""" if has_more else f'<div style="font-size:.78rem;color:#555;line-height:1.45;margin-bottom:4px;">{preview}</div>'
265
 
266
+ # NEU: Extrem dezenter Badge Export Button für die Top 3
267
  btn_html = ""
268
  if rank < 3:
 
269
  verdict_esc = e.get('verdict', '').replace("'", "\\'").replace('"', '&quot;').replace('\n', ' ')
270
  btn_html = f"""
271
  <button onclick="exportBadgePNG('{side}', '{pct}', '{e['total']}/{e['max']}', '{verdict_esc}', '{medal}', '{e.get('date', '')}')"
272
+ style="margin-top:10px; background:transparent; color:#888; border:1px solid #E0DFDC; border-radius:99px; padding:2px 10px; font-size:.68rem; font-weight:600; cursor:pointer; transition: all 0.15s;"
273
+ onmouseover="this.style.background='#EBF3FB'; this.style.color='#0A66C2'; this.style.borderColor='#70B5F9';"
274
+ onmouseout="this.style.background='transparent'; this.style.color='#888'; this.style.borderColor='#E0DFDC';">
275
+ 📸 PNG Export
276
  </button>
277
  """
278