QIDNLF commited on
Commit
d3b3ec9
ยท
verified ยท
1 Parent(s): 3cc95e9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +31 -28
app.py CHANGED
@@ -554,41 +554,44 @@ with gr.Blocks() as demo:
554
  # 5. Application Styling (CSS)
555
  # ==========================================
556
  css = """
557
- /* [1] ๊ธฐ๋ณธ ํ…Œ์ด๋ธ” ์„ค์ • (๊ฐ€๋กœ ์Šคํฌ๋กค ๋ฐฉ์–ด) */
558
  table {
559
- table-layout: fixed !important;
560
- width: 100% !important;
561
- border-collapse: collapse;
562
  }
563
 
564
- /* [2] ํŒจํ„ด ๊ธฐ๋ฐ˜ ์—ด ๋„ˆ๋น„ ์ž๋™ ํ• ๋‹น (ํ•ต์‹ฌ!) */
565
- /* ํ™€์ˆ˜ ๋ฒˆ์งธ ์—ด (1, 3, 5...๋ฒˆ์งธ ์—ด: Section์ด๋‚˜ Code ์—ด) */
566
- table th:nth-child(odd),
567
- table td:nth-child(odd) {
568
- width: 8% !important; /* ID ์—ด์€ 8%๋งŒ ์ฐจ์ง€ */
569
- background-color: #fafafa; /* ์‹œ๊ฐ์  ๊ตฌ๋ถ„์„ ์œ„ํ•ด ์‚ด์ง ๋ฐฐ๊ฒฝ์ƒ‰ ์ถ”๊ฐ€ */
570
  }
571
 
572
- /* ์ง์ˆ˜ ๋ฒˆ์งธ ์—ด (2, 4, 6...๋ฒˆ์งธ ์—ด: Description ์—ด) */
573
- table th:nth-child(even),
574
- table td:nth-child(even) {
575
- width: auto !important; /* ๋‚˜๋จธ์ง€๋Š” ๋‚ด์šฉ ์—ด์ด ์ฐจ์ง€ */
 
 
576
  }
577
 
578
- /* [3] ์˜ˆ์™ธ ์ƒํ™ฉ ์ฒ˜๋ฆฌ: Code+Desc ๋ณ‘ํ•ฉ(Combine)์ด ์ ์šฉ๋˜์–ด ์—ด ๊ฐœ์ˆ˜๊ฐ€ ์ค„์—ˆ์„ ๋•Œ */
579
- /* ์—ด์ด ๋ณ‘ํ•ฉ๋˜์–ด ๋ชจ๋“  ์—ด์ด '๋‚ด์šฉ'์„ ํฌํ•จํ•˜๊ฒŒ ๋˜๋ฉด, ๋„ˆ๋น„๋ฅผ ๊ท ๋“ฑํ•˜๊ฒŒ ๋ถ„๋ฐฐํ•ฉ๋‹ˆ๋‹ค. */
580
- table:has(th:nth-child(1):not(:has(+ th:nth-child(2)))) {
581
- table-layout: auto !important;
582
- }
583
-
584
- /* [4] ๊ฐ€๋…์„ฑ ๋ณด์ • */
585
- td {
586
- font-size: 16px !important;
587
- line-height: 1.6;
588
- padding: 12px !important;
589
- word-break: keep-all !important; /* ๋‹จ์–ด ๋‹จ์œ„ ์ค„๋ฐ”๊ฟˆ์œผ๋กœ ๊น”๋”ํ•˜๊ฒŒ */
590
- vertical-align: top !important;
591
- }
 
 
 
 
 
 
592
 
593
  thead th {
594
  font-size: 18px !important;
 
554
  # 5. Application Styling (CSS)
555
  # ==========================================
556
  css = """
 
557
  table {
558
+ table-layout: auto !important;
559
+ width: max-content !important;
560
+ min-width: 100% !important;
561
  }
562
 
563
+ th, td {
564
+ min-width: 150px;
 
 
 
 
565
  }
566
 
567
+ table:has(th:nth-last-child(2):first-child),
568
+ table:has(th:nth-last-child(4):first-child),
569
+ table:has(th:nth-last-child(5):first-child),
570
+ table:has(th:nth-last-child(6):first-child) {
571
+ table-layout: fixed !important;
572
+ width: 100% !important;
573
  }
574
 
575
+ table th:nth-last-child(2):first-child, table td:nth-last-child(2):first-child { width: 15% !important; min-width: 0 !important; }
576
+ table th:nth-last-child(1), table td:nth-last-child(1) { width: 85% !important; min-width: 0 !important; }
577
+
578
+ table th:nth-child(1):nth-last-child(4), table td:nth-child(1):nth-last-child(4) { width: 10% !important; min-width: 0 !important; }
579
+ table th:nth-child(2):nth-last-child(3), table td:nth-child(2):nth-last-child(3) { width: 40% !important; min-width: 0 !important; }
580
+ table th:nth-child(3):nth-last-child(2), table td:nth-child(3):nth-last-child(2) { width: 10% !important; min-width: 0 !important; }
581
+ table th:nth-child(4):nth-last-child(1), table td:nth-child(4):nth-last-child(1) { width: 40% !important; min-width: 0 !important; }
582
+
583
+ table th:nth-child(1):nth-last-child(5), table td:nth-child(1):nth-last-child(5) { width: 15% !important; min-width: 0 !important; }
584
+ table th:nth-child(2):nth-last-child(4), table td:nth-child(2):nth-last-child(4) { width: 10% !important; min-width: 0 !important; }
585
+ table th:nth-child(3):nth-last-child(3), table td:nth-child(3):nth-last-child(3) { width: 30% !important; min-width: 0 !important; }
586
+ table th:nth-child(4):nth-last-child(2), table td:nth-child(4):nth-last-child(2) { width: 10% !important; min-width: 0 !important; }
587
+ table th:nth-child(5):nth-last-child(1), table td:nth-child(5):nth-last-child(1) { width: 35% !important; min-width: 0 !important; }
588
+
589
+ table th:nth-child(1):nth-last-child(6), table td:nth-child(1):nth-last-child(6) { width: 8% !important; min-width: 0 !important; }
590
+ table th:nth-child(2):nth-last-child(5), table td:nth-child(2):nth-last-child(5) { width: 15% !important; min-width: 0 !important; }
591
+ table th:nth-child(3):nth-last-child(4), table td:nth-child(3):nth-last-child(4) { width: 27% !important; min-width: 0 !important; }
592
+ table th:nth-child(4):nth-last-child(3), table td:nth-child(4):nth-last-child(3) { width: 8% !important; min-width: 0 !important; }
593
+ table th:nth-child(5):nth-last-child(2), table td:nth-child(5):nth-last-child(2) { width: 15% !important; min-width: 0 !important; }
594
+ table th:nth-child(6):nth-last-child(1), table td:nth-child(6):nth-last-child(1) { width: 27% !important; min-width: 0 !important; }
595
 
596
  thead th {
597
  font-size: 18px !important;