Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Changes.
Browse files- app.py +7 -6
- src/display/css_html_js.py +17 -0
app.py
CHANGED
@@ -369,13 +369,14 @@ with blocks:
|
|
369 |
elem_classes="markdown-text",
|
370 |
)
|
371 |
|
372 |
-
|
373 |
-
gr.Markdown(
|
374 |
-
'<div class="f1-container"><p style="font-size:1.05rem;font-weight:600;">'
|
375 |
-
'<a class="f1-a" href="#what-is-formulaone">Learn more about FormulaOne.</a>'
|
376 |
-
"</p></div>"
|
377 |
-
)
|
378 |
|
|
|
|
|
|
|
|
|
|
|
|
|
379 |
# Existing "What is FormulaOne" tab
|
380 |
with gr.TabItem("What is FormulaOne", id=1, elem_id="what-is-tab"):
|
381 |
gr.Image(
|
|
|
369 |
elem_classes="markdown-text",
|
370 |
)
|
371 |
|
372 |
+
learn_more_btn = gr.Button("Learn more about FormulaOne →", elem_id="learn-more-btn", variant="secondary")
|
|
|
|
|
|
|
|
|
|
|
373 |
|
374 |
+
# Switch to the "What is FormulaOne" tab (id="what-is")
|
375 |
+
learn_more_btn.click(
|
376 |
+
lambda: gr.Tabs(selected="what-is"), # or gr.Tabs.update(selected="what-is") on older Gradio
|
377 |
+
inputs=None,
|
378 |
+
outputs=tabs,
|
379 |
+
)
|
380 |
# Existing "What is FormulaOne" tab
|
381 |
with gr.TabItem("What is FormulaOne", id=1, elem_id="what-is-tab"):
|
382 |
gr.Image(
|
src/display/css_html_js.py
CHANGED
@@ -55,6 +55,23 @@ custom_css = """
|
|
55 |
box-shadow: 0 1px 2px rgba(0,0,0,0.04);
|
56 |
}
|
57 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
/* Text */
|
59 |
.f1-p, .f1-li { line-height: 1.75; color: #374151; text-wrap: pretty; overflow-wrap: break-word; hyphens: auto; }
|
60 |
|
|
|
55 |
box-shadow: 0 1px 2px rgba(0,0,0,0.04);
|
56 |
}
|
57 |
|
58 |
+
.f1-tier-select-row { background: white; }
|
59 |
+
|
60 |
+
.f1-tier-select-row div { border: none; }
|
61 |
+
|
62 |
+
.f1-tier-select { background: white; }
|
63 |
+
|
64 |
+
#learn-more-btn, #learn-more-btn button {
|
65 |
+
background: transparent !important;
|
66 |
+
border: none !important;
|
67 |
+
color: #2563eb !important;
|
68 |
+
font-weight: 700 !important;
|
69 |
+
font-size: 1.05rem !important;
|
70 |
+
padding: 0 !important;
|
71 |
+
box-shadow: none !important;
|
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 |
|