From 28bb87d6310826038696a1f8cd15cd32427d5c35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=B2=AD=EC=B6=98=EC=95=BD=EA=B5=AD?= Date: Wed, 18 Mar 2026 23:24:49 +0900 Subject: [PATCH] =?UTF-8?q?style:=20=ED=85=9C=ED=94=8C=EB=A6=BF=20?= =?UTF-8?q?=EA=B0=80=EB=8F=85=EC=84=B1=20=EA=B0=9C=EC=84=A0=20-=20?= =?UTF-8?q?=ED=8F=B0=ED=8A=B8/=ED=8C=A8=EB=94=A9=20=ED=99=95=EB=8C=80,=20t?= =?UTF-8?q?runcation=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/medication_guide_v2.html | 115 +++++++++++++---------------- 1 file changed, 53 insertions(+), 62 deletions(-) diff --git a/templates/medication_guide_v2.html b/templates/medication_guide_v2.html index 2fda5e0..8db098f 100644 --- a/templates/medication_guide_v2.html +++ b/templates/medication_guide_v2.html @@ -19,10 +19,9 @@ /* 페이지 */ .page { width: 210mm; - height: 297mm; + min-height: 297mm; padding: 5mm; page-break-after: always; - position: relative; box-sizing: border-box; } @@ -63,17 +62,12 @@ color: #666; } - /* 카드 그리드 영역 - 고정 높이 */ + /* 카드 그리드 영역 */ .cards-area { display: grid; grid-template-columns: 1fr 1fr; - grid-template-rows: 1fr 1fr; - gap: 2mm; - height: 265mm; /* 297 - 5*2(패딩) - 15(헤더) - 7(푸터) */ - } - - .cards-area.no-header { - height: 280mm; /* 헤더 없을 때 */ + grid-template-rows: auto auto; + gap: 3mm; } /* 약품 카드 */ @@ -81,8 +75,7 @@ border: 1px solid #E0E0E0; border-radius: 2mm; overflow: hidden; - display: flex; - flex-direction: column; + page-break-inside: avoid; } .drug-card-header { @@ -130,36 +123,34 @@ } .drug-card-body { - padding: 1.5mm; - font-size: 5.5pt; - flex: 1; - overflow: hidden; + padding: 3mm; + font-size: 7pt; } /* 섹션들 */ .coverage-title { - font-size: 6pt; + font-size: 8pt; font-weight: 700; color: #1565C0; - margin-bottom: 1mm; + margin-bottom: 2mm; } .coverage-table { display: grid; grid-template-columns: repeat(4, 1fr); - gap: 0.5mm; + gap: 1mm; background: #F5F5F5; - padding: 1mm; - border-radius: 1mm; - margin-bottom: 1.5mm; + padding: 2mm; + border-radius: 1.5mm; + margin-bottom: 3mm; } .coverage-item { background: white; - padding: 1mm; - border-radius: 0.5mm; + padding: 1.5mm; + border-radius: 1mm; text-align: center; - font-size: 5pt; + font-size: 6pt; } .coverage-item.covered { border-left: 1.5px solid #4CAF50; } @@ -172,26 +163,26 @@ .gap-warning { background: #FFF3E0; border: 1px solid #FFB74D; - border-radius: 1mm; - padding: 1mm; - margin-bottom: 1.5mm; - font-size: 5pt; + border-radius: 1.5mm; + padding: 2mm; + margin-bottom: 3mm; + font-size: 6pt; } - .gap-warning-title { font-weight: 700; color: #E65100; } + .gap-warning-title { font-weight: 700; color: #E65100; font-size: 7pt; } .gap-solution { color: #F57C00; } /* 투약 정보 */ .dosing-section { background: #E3F2FD; - border-radius: 1mm; - padding: 1mm 1.5mm; - margin-bottom: 1.5mm; + border-radius: 1.5mm; + padding: 2mm 3mm; + margin-bottom: 3mm; } - .dosing-title { font-weight: 700; color: #1565C0; font-size: 5.5pt; } - .dosing-main { font-size: 8pt; font-weight: 700; color: #0D47A1; } - .dosing-note { font-size: 5pt; color: #1976D2; } + .dosing-title { font-weight: 700; color: #1565C0; font-size: 7pt; } + .dosing-main { font-size: 11pt; font-weight: 700; color: #0D47A1; } + .dosing-note { font-size: 6pt; color: #1976D2; margin-top: 1mm; } /* 체중별 제품 */ .weight-products { @@ -213,60 +204,60 @@ .dosage-grid { display: grid; grid-template-columns: repeat(3, 1fr); - gap: 0.5mm; + gap: 1mm; background: #E3F2FD; - padding: 1mm; - border-radius: 1mm; - margin-bottom: 1.5mm; + padding: 2mm; + border-radius: 1.5mm; + margin-bottom: 3mm; } .dosage-cell { background: white; - padding: 1mm; - border-radius: 0.5mm; + padding: 1.5mm; + border-radius: 1mm; text-align: center; - font-size: 5pt; + font-size: 6pt; } - .dosage-weight { font-weight: 500; color: #1565C0; } - .dosage-amount { font-weight: 700; color: #0D47A1; font-size: 6pt; } + .dosage-weight { font-weight: 500; color: #1565C0; font-size: 7pt; } + .dosage-amount { font-weight: 700; color: #0D47A1; font-size: 9pt; } /* 절대 금기 */ .contraindication-box { background: #FFEBEE; - border: 1px solid #F44336; - border-radius: 1mm; - padding: 1mm; - margin-bottom: 1.5mm; + border: 1.5px solid #F44336; + border-radius: 1.5mm; + padding: 2mm; + margin-bottom: 3mm; } - .contraindication-title { font-weight: 900; color: #C62828; font-size: 6pt; } + .contraindication-title { font-weight: 900; color: #C62828; font-size: 8pt; margin-bottom: 1mm; } .contraindication-list { list-style: none; - font-size: 5pt; + font-size: 6pt; color: #B71C1C; } - .contraindication-list li { padding: 0.3mm 0; } + .contraindication-list li { padding: 0.5mm 0; } /* 주의사항 */ .warnings-section { background: #FFF8E1; border: 1px solid #FFE082; - border-radius: 1mm; - padding: 1mm; + border-radius: 1.5mm; + padding: 2mm; } - .warnings-title { font-weight: 700; color: #F57F17; font-size: 5.5pt; } + .warnings-title { font-weight: 700; color: #F57F17; font-size: 7pt; margin-bottom: 1mm; } .warnings-list { list-style: none; - font-size: 5pt; + font-size: 6pt; color: #795548; } - .warnings-list li { padding: 0.2mm 0; } + .warnings-list li { padding: 0.3mm 0; } /* 외용제 용법 */ .usage-box { @@ -314,7 +305,7 @@ {% endif %} -
+
{% set start_idx = page_num * drugs_per_page %} {% set end_idx = [start_idx + drugs_per_page, drugs|length] | min %} @@ -384,8 +375,8 @@
🚫 절대 금기
    - {% for c in drug.absolute_contraindications[:3] %} -
  • ❌ {{ c.item }}
  • + {% for c in drug.absolute_contraindications %} +
  • ❌ {{ c.item }} — {{ c.reason }}
  • {% endfor %}
@@ -433,9 +424,9 @@ {% if drug.warnings %}
-
⚠️ 주의
+
⚠️ 주의사항
    - {% for w in drug.warnings[:3] %}
  • {{ w[:40] }}{% if w|length > 40 %}...{% endif %}
  • {% endfor %} + {% for w in drug.warnings %}
  • {{ w }}
  • {% endfor %}
{% endif %}