m3n99 commited on
Commit
94d36c1
Β·
1 Parent(s): 6416a29

enhance on UI

Browse files
Files changed (1) hide show
  1. app.py +34 -9
app.py CHANGED
@@ -328,26 +328,42 @@ CSS = """
328
  body, .gradio-container {
329
  background: #0f0f1a !important;
330
  }
 
 
 
 
 
 
 
 
 
 
331
  #header {
332
  text-align: center;
333
- padding: 2rem 0 1.25rem;
 
 
334
  }
335
  #header h1 {
336
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
337
  -webkit-background-clip: text;
338
  -webkit-text-fill-color: transparent;
339
- font-size: 2.4rem;
340
  font-weight: 800;
341
  margin-bottom: 0.25rem;
342
  }
343
  #header p { color: #888; font-size: 1rem; margin: 0; }
 
 
344
  #config-card, #output-card, #pdf-row {
345
  background: #1a1a2e !important;
346
  border: 1px solid #2a2a4a !important;
347
  border-radius: 16px !important;
348
- padding: 1.5rem 2rem !important;
349
  margin-bottom: 1.25rem !important;
350
  }
 
 
351
  #config-card input, #config-card textarea, #config-card select {
352
  background: #0f0f1a !important;
353
  border: 1px solid #2a2a4a !important;
@@ -355,22 +371,30 @@ body, .gradio-container {
355
  border-radius: 8px !important;
356
  }
357
  #config-card label, #config-card .label-wrap span { color: #aaa !important; }
 
 
 
 
 
 
 
358
  #generate-btn {
359
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
360
  color: white !important;
361
  font-weight: 700 !important;
362
- font-size: 1.05rem !important;
363
  border: none !important;
364
  border-radius: 10px !important;
365
  width: auto !important;
366
- min-width: 220px !important;
367
- padding: 10px 36px !important;
368
- margin-top: 0.5rem !important;
 
369
  display: block !important;
370
- margin-left: auto !important;
371
- margin-right: auto !important;
372
  }
373
  #generate-btn:hover { opacity: 0.88 !important; transform: translateY(-1px) !important; }
 
 
374
  #output-card p, #output-card li,
375
  #output-card h1, #output-card h2, #output-card h3,
376
  #output-card h4, #output-card code { color: #e0e0f0 !important; }
@@ -385,6 +409,7 @@ body, .gradio-container {
385
  border-radius: 8px !important;
386
  padding: 1rem !important;
387
  }
 
388
  footer { display: none !important; }
389
  """
390
 
 
328
  body, .gradio-container {
329
  background: #0f0f1a !important;
330
  }
331
+
332
+ /* ── constrain page width ── */
333
+ .gradio-container > .main,
334
+ .gradio-container .tabs,
335
+ .gradio-container > div {
336
+ max-width: 860px !important;
337
+ margin-left: auto !important;
338
+ margin-right: auto !important;
339
+ }
340
+
341
  #header {
342
  text-align: center;
343
+ padding: 2rem 0 1.5rem;
344
+ max-width: 860px;
345
+ margin: 0 auto;
346
  }
347
  #header h1 {
348
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
349
  -webkit-background-clip: text;
350
  -webkit-text-fill-color: transparent;
351
+ font-size: 2.2rem;
352
  font-weight: 800;
353
  margin-bottom: 0.25rem;
354
  }
355
  #header p { color: #888; font-size: 1rem; margin: 0; }
356
+
357
+ /* ── cards ── */
358
  #config-card, #output-card, #pdf-row {
359
  background: #1a1a2e !important;
360
  border: 1px solid #2a2a4a !important;
361
  border-radius: 16px !important;
362
+ padding: 1.75rem 2rem !important;
363
  margin-bottom: 1.25rem !important;
364
  }
365
+
366
+ /* ── inputs ── */
367
  #config-card input, #config-card textarea, #config-card select {
368
  background: #0f0f1a !important;
369
  border: 1px solid #2a2a4a !important;
 
371
  border-radius: 8px !important;
372
  }
373
  #config-card label, #config-card .label-wrap span { color: #aaa !important; }
374
+
375
+ /* ── generate button ── */
376
+ #btn-row {
377
+ display: flex !important;
378
+ justify-content: center !important;
379
+ padding: 0.75rem 0 0.25rem !important;
380
+ }
381
  #generate-btn {
382
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
383
  color: white !important;
384
  font-weight: 700 !important;
385
+ font-size: 1rem !important;
386
  border: none !important;
387
  border-radius: 10px !important;
388
  width: auto !important;
389
+ min-width: 200px !important;
390
+ max-width: 260px !important;
391
+ padding: 10px 32px !important;
392
+ margin: 0 auto 1.5rem auto !important;
393
  display: block !important;
 
 
394
  }
395
  #generate-btn:hover { opacity: 0.88 !important; transform: translateY(-1px) !important; }
396
+
397
+ /* ── output card text ── */
398
  #output-card p, #output-card li,
399
  #output-card h1, #output-card h2, #output-card h3,
400
  #output-card h4, #output-card code { color: #e0e0f0 !important; }
 
409
  border-radius: 8px !important;
410
  padding: 1rem !important;
411
  }
412
+
413
  footer { display: none !important; }
414
  """
415