vankhieu Codex commited on
Commit
b5e48c0
·
1 Parent(s): c13d7d0

Show selected quick example state

Browse files

Co-authored-by: Codex <codex@openai.com>

Files changed (1) hide show
  1. app.py +38 -0
app.py CHANGED
@@ -341,6 +341,43 @@ button:hover,
341
  font-size: 12px;
342
  }
343
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
344
  @media (max-width: 900px) {
345
  #sci-shell {
346
  width: calc(100vw - 16px);
@@ -558,6 +595,7 @@ with gr.Blocks(css=custom_css, title="SciVisual-Agent") as demo:
558
  label="Quick Examples",
559
  value=None,
560
  interactive=True,
 
561
  )
562
  terminal = gr.Textbox(
563
  label="System Terminal Log",
 
341
  font-size: 12px;
342
  }
343
 
344
+ #quick-examples .wrap {
345
+ gap: 8px !important;
346
+ }
347
+
348
+ #quick-examples .wrap label {
349
+ position: relative !important;
350
+ min-height: 38px !important;
351
+ padding: 9px 40px 9px 12px !important;
352
+ border: 1px solid rgba(0, 255, 204, 0.22) !important;
353
+ background: rgba(2, 6, 16, 0.58) !important;
354
+ color: var(--cyber-muted) !important;
355
+ transition: border-color 140ms ease, box-shadow 140ms ease, color 140ms ease, background 140ms ease !important;
356
+ }
357
+
358
+ #quick-examples .wrap label:hover {
359
+ border-color: rgba(0, 255, 204, 0.55) !important;
360
+ color: var(--cyber-text) !important;
361
+ }
362
+
363
+ #quick-examples .wrap label:has(input[type="radio"]:checked) {
364
+ border-color: var(--cyber-cyan) !important;
365
+ background: linear-gradient(90deg, rgba(0, 255, 204, 0.16), rgba(255, 0, 85, 0.08)) !important;
366
+ color: #ffffff !important;
367
+ box-shadow: 0 0 18px rgba(0, 255, 204, 0.20), inset 0 0 18px rgba(0, 255, 204, 0.06) !important;
368
+ }
369
+
370
+ #quick-examples .wrap label:has(input[type="radio"]:checked)::after {
371
+ content: "✓";
372
+ position: absolute;
373
+ right: 12px;
374
+ top: 50%;
375
+ transform: translateY(-50%);
376
+ color: var(--cyber-cyan);
377
+ font-size: 18px;
378
+ text-shadow: 0 0 10px rgba(0, 255, 204, 0.75);
379
+ }
380
+
381
  @media (max-width: 900px) {
382
  #sci-shell {
383
  width: calc(100vw - 16px);
 
595
  label="Quick Examples",
596
  value=None,
597
  interactive=True,
598
+ elem_id="quick-examples",
599
  )
600
  terminal = gr.Textbox(
601
  label="System Terminal Log",