nhance/writable/e_card_template/common.html
2025-09-06 10:12:17 +05:30

92 lines
3.8 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<style>
body {
margin: 0;
padding: 0;
font-family: Arial, sans-serif;
}
.ecard-container {
width: 100%;
display: table; /* Dompdf supports table better than flex */
table-layout: fixed;
border-spacing: 10px; /* Gap between front & back */
}
.ecard-section {
display: table-cell;
width: 50%;
height: 200px; /* Fixed height */
max-height: 200px;
font-size: 9px;
background-size: contain;
background-position: top center;
background-repeat: no-repeat;
vertical-align: top;
padding: 12px;
box-sizing: border-box;
overflow: hidden;
}
.ecard-table {
font-size: 9px;
line-height: 14px; /* 🔹 Reduced line height */
border-collapse: collapse;
}
.ecard-table td {
padding: 0px 3px; /* 🔹 Reduced vertical padding */
vertical-align: top;
}
.label {
font-weight: bold;
width: 70px; /* Fixed width for alignment */
white-space: nowrap;
}
.colon {
width: 5px;
text-align: center;
}
.value {
width: auto;
word-wrap: break-word;
}
</style>
</head>
<body>
<div class="ecard-container">
<!-- FRONT CARD -->
<div class="ecard-section front" style="background-image: url('{FRONT_CARD}');">
<div style="margin-left: 100px; margin-top: 20px; position: relative; top: -8px;">
<table class="ecard-table">
<tr><td class="label">Name</td><td class="colon">:</td><td class="value">{NAME}</td></tr>
<tr><td class="label">Gender</td><td class="colon">:</td><td class="value">{GENDER}</td></tr>
<tr><td class="label">D.O.B</td><td class="colon">:</td><td class="value">{DOB}</td></tr>
<tr><td class="label">Relationship</td><td class="colon">:</td><td class="value">{RELATION}</td></tr>
<tr><td class="label">Policy No</td><td class="colon">:</td><td class="value">{POLICY_NO}</td></tr>
<tr><td class="label">TPA/UHID</td><td class="colon">:</td><td class="value">{TPA_ID}</td></tr>
<tr><td class="label">Policy Start</td><td class="colon">:</td><td class="value">{POLICY_START_DATE}</td></tr>
<tr><td class="label">Policy End</td><td class="colon">:</td><td class="value">{POLICY_DATE}</td></tr>
<tr><td class="label">Insurer</td><td class="colon">:</td><td class="value">{INSURER_NAME}</td></tr>
<tr><td class="label">TPA</td><td class="colon">:</td><td class="value">{TPA_NAME}</td></tr>
</table>
</div>
</div>
<!-- BACK CARD -->
<div class="ecard-section back" style="background-image: url('{BACK_CARD}');">
<div style="margin-left: 110px; margin-top: 15px; font-size: 9px; line-height: 11px; position: relative; top: -8px;">
<div>
<span style="color: #AA292E;">For support, Please contact us:</span><br>
{LEVELS}
</div>
<div style="margin-top: -10px;">
<span style="color: #AA292E;">For cashless claims:</span><br>
Share a valid ID with this E-card at the Hospital Insurance Desk.
</div>
</div>
</div>
</div>
</body>
</html>