Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update.
Browse files- app.py +15 -13
- src/display/css_html_js.py +9 -5
app.py
CHANGED
@@ -335,23 +335,25 @@ with blocks:
|
|
335 |
with gr.Row(elem_id="landing-hero-row"):
|
336 |
gr.Markdown(
|
337 |
"""
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
elem_classes="markdown-text",
|
347 |
)
|
348 |
-
learn_more_btn = gr.Button(
|
|
|
|
|
349 |
|
350 |
-
#
|
351 |
learn_more_btn.click(
|
352 |
-
lambda: gr.Tabs
|
353 |
inputs=None,
|
354 |
-
outputs=tabs,
|
355 |
)
|
356 |
|
357 |
# Pill-style selector aligned to the top-right
|
@@ -391,7 +393,7 @@ with blocks:
|
|
391 |
)
|
392 |
|
393 |
# Existing "What is FormulaOne" tab
|
394 |
-
with gr.TabItem("What is FormulaOne", id=
|
395 |
gr.Image(
|
396 |
"assets/banner.png",
|
397 |
show_label=False,
|
|
|
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 1</strong> span moderate through
|
342 |
+
challenging problems, while <strong>Tier 2</strong> is research-level.
|
343 |
+
</p>
|
344 |
+
</div>
|
345 |
+
""",
|
346 |
elem_classes="markdown-text",
|
347 |
)
|
348 |
+
learn_more_btn = gr.Button(
|
349 |
+
"Learn More about FormulaOne", elem_id="learn-more-pill", variant="secondary"
|
350 |
+
)
|
351 |
|
352 |
+
# Make the pill switch to the "What is FormulaOne" tab
|
353 |
learn_more_btn.click(
|
354 |
+
lambda: gr.Tabs(selected="what-is"), # ← THIS actually changes the selected tab
|
355 |
inputs=None,
|
356 |
+
outputs=tabs, # tabs = the handle from `with gr.Tabs(...) as tabs:`
|
357 |
)
|
358 |
|
359 |
# Pill-style selector aligned to the top-right
|
|
|
393 |
)
|
394 |
|
395 |
# Existing "What is FormulaOne" tab
|
396 |
+
with gr.TabItem("What is FormulaOne", id="what-is", elem_id="what-is-tab"):
|
397 |
gr.Image(
|
398 |
"assets/banner.png",
|
399 |
show_label=False,
|
src/display/css_html_js.py
CHANGED
@@ -72,7 +72,6 @@ custom_css = """
|
|
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;
|
@@ -82,18 +81,23 @@ custom_css = """
|
|
82 |
align-items: center;
|
83 |
}
|
84 |
|
85 |
-
/*
|
86 |
.f1-hero { margin: 0; font-size: 1.02rem; color: var(--f1-text); }
|
87 |
|
88 |
-
/* Learn More pill
|
89 |
-
#learn-more-pill,
|
|
|
|
|
|
|
90 |
background: #2563eb !important;
|
91 |
color: #ffffff !important;
|
92 |
border: 0 !important;
|
93 |
border-radius: 999px !important;
|
94 |
-
padding:
|
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 |
|
|
|
72 |
}
|
73 |
#learn-more-btn button:hover { text-decoration: underline !important; background: transparent !important; }
|
74 |
|
|
|
75 |
#landing-hero-row {
|
76 |
max-width: 800px;
|
77 |
margin-left: auto;
|
|
|
81 |
align-items: center;
|
82 |
}
|
83 |
|
84 |
+
/* Blurb text */
|
85 |
.f1-hero { margin: 0; font-size: 1.02rem; color: var(--f1-text); }
|
86 |
|
87 |
+
/* Learn More pill — compact width */
|
88 |
+
#learn-more-pill,
|
89 |
+
#learn-more-pill button {
|
90 |
+
width: auto !important;
|
91 |
+
min-width: 0 !important;
|
92 |
background: #2563eb !important;
|
93 |
color: #ffffff !important;
|
94 |
border: 0 !important;
|
95 |
border-radius: 999px !important;
|
96 |
+
padding: 6px 12px !important; /* narrower */
|
97 |
box-shadow: 0 1px 2px rgba(0,0,0,0.06) !important;
|
98 |
font-weight: 700 !important;
|
99 |
+
font-size: 0.95rem !important; /* slightly smaller text = smaller pill */
|
100 |
+
white-space: nowrap !important; /* keep on one line */
|
101 |
}
|
102 |
#learn-more-pill button:hover { filter: brightness(0.95) !important; }
|
103 |
|