danemery-ai2 commited on
Commit
c917078
·
unverified ·
1 Parent(s): 49b6cdd

Add feedback button to about page (#38)

Browse files
Files changed (3) hide show
  1. about.py +9 -1
  2. content.py +4 -19
  3. ui_components.py +0 -6
about.py CHANGED
@@ -62,4 +62,12 @@ These design choices ensure fair comparison while penalizing cherry-picking and
62
  - AstaBench technical blog post
63
  - FAQ and submission guide
64
  """, elem_id="about-content"
65
- )
 
 
 
 
 
 
 
 
 
62
  - AstaBench technical blog post
63
  - FAQ and submission guide
64
  """, elem_id="about-content"
65
+ )
66
+
67
+ # Floating feedback button
68
+ floating_feedback_button_html = """
69
+ <div>
70
+ <a id="feedback-button" href="https://docs.google.com/forms/d/e/1FAIpQLSfJdVkD62aPYh8XehN2FrSeHUWt488Ejc-QdtuZn5NZ3eNoxA/viewform">Have feedback?</a>
71
+ </div>
72
+ """
73
+ gr.HTML(floating_feedback_button_html)
content.py CHANGED
@@ -458,38 +458,23 @@ span.wrap[tabindex="0"][role="button"][data-editable="false"] {
458
  background: none;
459
  }
460
 
461
- #floating-feedback-button {
462
- position: fixed;
463
- bottom: 20px;
464
- right: 20px;
465
- z-index: 1000;
466
  background-color: #345d60;
467
  color: white;
468
  border: none;
469
  border-radius: 4px;
 
470
  padding: 15px 20px;
471
  font-size: 16px;
472
  cursor: pointer;
473
- box-shadow: 0 4px 8px rgba(0,0,0,0.2);
474
  transition: all 0.3s ease;
475
  text-decoration: none;
476
  }
477
 
478
- @media (max-width: 768px) {
479
- #floating-feedback-button {
480
- padding: 12px 16px;
481
- font-size: 12px;
482
- }
483
- }
484
-
485
- #floating-feedback-button:hover {
486
  background-color: #5d888b;
487
  transform: translateY(-2px);
488
  box-shadow: 0 6px 12px rgba(0,0,0,0.3);
489
  }
490
-
491
- html, body {
492
- height: 100%;
493
- overflow-y: auto;
494
- }
495
  """
 
458
  background: none;
459
  }
460
 
461
+ #feedback-button {
462
+ display: inline-block;
 
 
 
463
  background-color: #345d60;
464
  color: white;
465
  border: none;
466
  border-radius: 4px;
467
+ margin: 5px 0 0 24px;
468
  padding: 15px 20px;
469
  font-size: 16px;
470
  cursor: pointer;
 
471
  transition: all 0.3s ease;
472
  text-decoration: none;
473
  }
474
 
475
+ #feedback-button:hover {
 
 
 
 
 
 
 
476
  background-color: #5d888b;
477
  transform: translateY(-2px);
478
  box-shadow: 0 6px 12px rgba(0,0,0,0.3);
479
  }
 
 
 
 
 
480
  """
ui_components.py CHANGED
@@ -334,12 +334,6 @@ def create_leaderboard_display(
334
  )
335
  gr.HTML(SCATTER_DISCLAIMER, elem_id="scatter-disclaimer")
336
 
337
- # Floating feedback button
338
- floating_feedback_button_html = """
339
- <a id="floating-feedback-button" href="https://docs.google.com/forms/d/e/1FAIpQLSfJdVkD62aPYh8XehN2FrSeHUWt488Ejc-QdtuZn5NZ3eNoxA/viewform">Have feedback?</a>
340
- """
341
- gr.HTML(floating_feedback_button_html)
342
-
343
  # Put table and key into an accordion
344
  with gr.Accordion("Show / Hide Table View", open=True, elem_id="leaderboard-accordion"):
345
  gr.HTML(value=legend_markdown, elem_id="legend-markdown")
 
334
  )
335
  gr.HTML(SCATTER_DISCLAIMER, elem_id="scatter-disclaimer")
336
 
 
 
 
 
 
 
337
  # Put table and key into an accordion
338
  with gr.Accordion("Show / Hide Table View", open=True, elem_id="leaderboard-accordion"):
339
  gr.HTML(value=legend_markdown, elem_id="legend-markdown")