shipping label fix - codex
This commit is contained in:
@@ -154,29 +154,38 @@ function buildShippingLabelPdf(options: {
|
||||
<style>
|
||||
@page { size: 4in 6in; margin: 0; }
|
||||
*, *::before, *::after { box-sizing: border-box; }
|
||||
html, body { width: 4in; height: 6in; margin: 0; padding: 0; display: flex; justify-content: center; align-items: center; overflow: hidden; background: white; }
|
||||
body { font-family: ${company.theme.fontFamily}, Arial, sans-serif; color: #111827; font-size: 10.5px; }
|
||||
.label { width: 3in; height: 5in; border: 2px solid #111827; border-radius: 6px; padding: 6px; display: flex; flex-direction: column; gap: 6px; overflow: hidden; }
|
||||
.row { display: flex; justify-content: space-between; gap: 8px; }
|
||||
html, body { width: 4in; min-width: 4in; max-width: 4in; height: 6in; min-height: 6in; max-height: 6in; margin: 0; padding: 0; overflow: hidden; background: white; }
|
||||
body { font-family: ${company.theme.fontFamily}, Arial, sans-serif; color: #111827; font-size: 10px; line-height: 1.2; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
|
||||
.page { width: 4in; height: 6in; padding: 0.14in; overflow: hidden; page-break-after: avoid; break-after: avoid-page; }
|
||||
.label { width: 100%; height: 100%; border: 2px solid #111827; border-radius: 10px; padding: 0.11in; display: flex; flex-direction: column; gap: 0.09in; overflow: hidden; }
|
||||
.row { display: flex; justify-content: space-between; gap: 0.09in; }
|
||||
.muted { font-size: 9px; text-transform: uppercase; letter-spacing: 0.08em; color: #4b5563; }
|
||||
.brand { border-bottom: 2px solid ${company.theme.primaryColor}; padding-bottom: 6px; }
|
||||
.brand h1 { margin: 0; font-size: 18px; color: ${company.theme.primaryColor}; }
|
||||
.block { border: 1px solid #d1d5db; border-radius: 10px; padding: 10px; }
|
||||
.stack { display: flex; flex-direction: column; gap: 4px; }
|
||||
.barcode { border: 2px solid #111827; border-radius: 6px; padding: 6px; text-align: center; font-family: monospace; font-size: 18px; letter-spacing: 0.18em; }
|
||||
.brand { border-bottom: 2px solid ${company.theme.primaryColor}; padding-bottom: 0.09in; }
|
||||
.brand-row { align-items: flex-start; }
|
||||
.brand-company { flex: 1; min-width: 0; padding-right: 0.06in; }
|
||||
.brand h1 { margin: 0; font-size: 16px; line-height: 1.05; color: ${company.theme.primaryColor}; overflow-wrap: anywhere; }
|
||||
.shipment-number { width: 1.25in; flex: 0 0 1.25in; text-align: right; }
|
||||
.block { border: 1px solid #d1d5db; border-radius: 10px; padding: 0.08in; min-width: 0; }
|
||||
.stack { display: flex; flex-direction: column; gap: 3px; }
|
||||
.barcode { border: 2px solid #111827; border-radius: 8px; padding: 0.08in; text-align: center; font-family: monospace; font-size: 16px; line-height: 1; letter-spacing: 0.15em; }
|
||||
.strong { font-weight: 700; }
|
||||
.big { font-size: 16px; font-weight: 700; }
|
||||
.big { font-size: 15px; line-height: 1.05; font-weight: 700; }
|
||||
.footer { text-align: center; font-size: 9px; color: #4b5563; overflow-wrap: anywhere; }
|
||||
.reference-text { margin-top: 6px; overflow-wrap: anywhere; word-break: break-word; }
|
||||
.block > div[style="margin-top:6px;"] { overflow-wrap: anywhere; word-break: break-word; }
|
||||
div[style="text-align:center; font-size:10px; color:#4b5563;"] { text-align: center; font-size: 9px; color: #4b5563; overflow-wrap: anywhere; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="label">
|
||||
<div class="page">
|
||||
<div class="label">
|
||||
<div class="brand">
|
||||
<div class="row">
|
||||
<div>
|
||||
<div class="row brand-row">
|
||||
<div class="brand-company">
|
||||
<div class="muted">From</div>
|
||||
<h1>${escapeHtml(company.companyName)}</h1>
|
||||
</div>
|
||||
<div style="text-align:right;">
|
||||
<div class="shipment-number">
|
||||
<div class="muted">Shipment</div>
|
||||
<div class="big">${escapeHtml(shipment.shipmentNumber)}</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user