Jerrycool commited on
Commit
ca0494c
·
verified ·
1 Parent(s): 74cd2e7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +58 -2
app.py CHANGED
@@ -306,8 +306,64 @@ body {
306
  }
307
  """
308
 
309
- # Concatenate user‑defined, base and intro CSS (order = priority)
310
- final_css = f"{custom_css}\n{base_css}\n{intro_css}"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
311
 
312
  # ---------------------------------------------------------------------------
313
  # Build the Gradio UI
 
306
  }
307
  """
308
 
309
+ markdown_css = """
310
+ /* ===============================
311
+ About Tab – Markdown Typography
312
+ =============================== */
313
+ .markdown-text, .markdown-text p {
314
+ font-family: Arial, Helvetica, sans-serif;
315
+ font-size: 1.25rem;
316
+ line-height: 1.75;
317
+ color: #344054;
318
+ margin-bottom: 0.9rem;
319
+ }
320
+
321
+
322
+ .markdown-text h1,
323
+ .markdown-text h2,
324
+ .markdown-text h3 {
325
+ color: #212529;
326
+ font-weight: 600;
327
+ line-height: 1.3;
328
+ margin: 1.4rem 0 0.8rem 0;
329
+ }
330
+ .markdown-text h1 { font-size: 2.0rem; } /* ≈32 px */
331
+ .markdown-text h2 { font-size: 1.6rem; } /* ≈26 px */
332
+ .markdown-text h3 { font-size: 1.4rem; } /* ≈23 px */
333
+
334
+
335
+ .markdown-text ul,
336
+ .markdown-text ol {
337
+ padding-left: 1.6rem;
338
+ margin-bottom: 1.1rem;
339
+ }
340
+
341
+
342
+ .markdown-text pre, .markdown-text code {
343
+ font-family: "Source Code Pro", "Menlo", monospace;
344
+ background-color: #f1f3f5;
345
+ border-radius: 0.4rem;
346
+ }
347
+ .markdown-text pre {
348
+ padding: 1rem 1.2rem;
349
+ overflow-x: auto;
350
+ }
351
+ .markdown-text code {
352
+ padding: 0.15rem 0.4rem;
353
+ font-size: 0.95rem;
354
+ }
355
+
356
+
357
+ @media (max-width: 768px) {
358
+ .markdown-text, .markdown-text p {
359
+ font-size: 1.15rem; /* ≈18 px */
360
+ }
361
+ .markdown-text h1 { font-size: 1.6rem; }
362
+ .markdown-text h2 { font-size: 1.4rem; }
363
+ .markdown-text h3 { font-size: 1.25rem; }
364
+ }
365
+ """
366
+ final_css = f"{custom_css}\n{base_css}\n{intro_css}\n{markdown_css}"
367
 
368
  # ---------------------------------------------------------------------------
369
  # Build the Gradio UI