galb-dai commited on
Commit
d15b3f0
·
1 Parent(s): 9dbaacb

Add blurb and learn more button.

Browse files
Files changed (2) hide show
  1. app.py +21 -0
  2. src/display/css_html_js.py +25 -0
app.py CHANGED
@@ -332,6 +332,27 @@ with blocks:
332
  gr.HTML(
333
  '<header class="text-center mb-12"><h1 class="text-4xl md:text-5xl font-bold text-gray-900 f1-h1">FormulaOne</h1></header>'
334
  )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
335
 
336
  # Pill-style selector aligned to the top-right
337
  with gr.Row(elem_id="f1-tier-select-row"):
 
332
  gr.HTML(
333
  '<header class="text-center mb-12"><h1 class="text-4xl md:text-5xl font-bold text-gray-900 f1-h1">FormulaOne</h1></header>'
334
  )
335
+ with gr.Row(elem_id="landing-hero-row"):
336
+ gr.Markdown(
337
+ """
338
+ <div class="f1-container">
339
+ <p class="f1-hero">
340
+ A benchmark of <strong>220</strong> novel, expert-level algorithmic problems over graphs that demand deep dynamic
341
+ programming and logical reasoning. <strong>Warmup</strong> and <strong>Tier&nbsp;1</strong> span moderate through
342
+ challenging problems, while <strong>Tier&nbsp;2</strong> is research-level.
343
+ </p>
344
+ </div>
345
+ """,
346
+ elem_classes="markdown-text",
347
+ )
348
+ learn_more_btn = gr.Button("Learn More", elem_id="learn-more-pill", variant="secondary")
349
+
350
+ # Switch to the "What is FormulaOne" tab when the pill is clicked
351
+ learn_more_btn.click(
352
+ lambda: gr.Tabs.update(selected="what-is"),
353
+ inputs=None,
354
+ outputs=tabs,
355
+ )
356
 
357
  # Pill-style selector aligned to the top-right
358
  with gr.Row(elem_id="f1-tier-select-row"):
src/display/css_html_js.py CHANGED
@@ -72,6 +72,31 @@ custom_css = """
72
  }
73
  #learn-more-btn button:hover { text-decoration: underline !important; background: transparent !important; }
74
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
75
  /* Text */
76
  .f1-p, .f1-li { line-height: 1.75; color: #374151; text-wrap: pretty; overflow-wrap: break-word; hyphens: auto; }
77
 
 
72
  }
73
  #learn-more-btn button:hover { text-decoration: underline !important; background: transparent !important; }
74
 
75
+ /* Hero row: keep within 800px, space content, center vertically */
76
+ #landing-hero-row {
77
+ max-width: 800px;
78
+ margin-left: auto;
79
+ margin-right: auto;
80
+ margin-bottom: 8px;
81
+ justify-content: space-between;
82
+ align-items: center;
83
+ }
84
+
85
+ /* Compact blurb text */
86
+ .f1-hero { margin: 0; font-size: 1.02rem; color: var(--f1-text); }
87
+
88
+ /* Learn More pill (right) */
89
+ #learn-more-pill, #learn-more-pill button {
90
+ background: #2563eb !important;
91
+ color: #ffffff !important;
92
+ border: 0 !important;
93
+ border-radius: 999px !important;
94
+ padding: 8px 14px !important;
95
+ box-shadow: 0 1px 2px rgba(0,0,0,0.06) !important;
96
+ font-weight: 700 !important;
97
+ }
98
+ #learn-more-pill button:hover { filter: brightness(0.95) !important; }
99
+
100
  /* Text */
101
  .f1-p, .f1-li { line-height: 1.75; color: #374151; text-wrap: pretty; overflow-wrap: break-word; hyphens: auto; }
102