Update the styling and layout of PDF invoices and labels to align with the new brand identity (Navy and Amber color scheme). Key changes: - Refactor `invoice.blade.php` to use a structured table-based layout for better Dompdf compatibility. - Implement a new color palette using Navy (#1a1a2e) and Amber (#f59e0b). - Redesign `label.blade.php` with a split-cell layout (barcode left, info right) for improved readability. - Standardize typography and spacing across all document templates. - Remove obsolete sample PDF files from the repository.
193 lines
6.4 KiB
PHP
193 lines
6.4 KiB
PHP
<!DOCTYPE html>
|
||
<html lang="en">
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<style>
|
||
/* ════════ Base — A5 Landscape (210×148mm) ════════ */
|
||
* { margin: 0; padding: 0; }
|
||
body {
|
||
font-family: DejaVu Sans, Arial, sans-serif;
|
||
font-size: 9px;
|
||
color: #000000;
|
||
line-height: 1.3;
|
||
}
|
||
@page {
|
||
margin-top: 6mm;
|
||
margin-bottom: 6mm;
|
||
margin-left: 6mm;
|
||
margin-right: 6mm;
|
||
}
|
||
.label-page {
|
||
width: 100%;
|
||
}
|
||
|
||
/* ════════ Main Layout: بارکد سمت چپ + اطلاعات سمت راست ════════ */
|
||
.main-table {
|
||
width: 100%;
|
||
table-layout: fixed;
|
||
border-collapse: collapse;
|
||
border: 2px solid #000000;
|
||
margin-bottom: 3mm;
|
||
}
|
||
.main-table > tbody > tr > td {
|
||
vertical-align: middle;
|
||
padding: 3mm;
|
||
}
|
||
.barcode-cell {
|
||
width: 60%;
|
||
text-align: center;
|
||
border-right: 1.5px solid #000000;
|
||
}
|
||
.info-cell {
|
||
width: 40%;
|
||
}
|
||
|
||
/* ════════ Barcode ════════ */
|
||
.barcode-cell img {
|
||
max-width: 100mm;
|
||
height: 25mm;
|
||
width: auto;
|
||
display: block;
|
||
margin: 0 auto 1mm;
|
||
}
|
||
.awb-number {
|
||
font-size: 18px;
|
||
font-weight: bold;
|
||
letter-spacing: 3px;
|
||
font-family: 'Courier New', 'DejaVu Sans Mono', monospace;
|
||
color: #000000;
|
||
text-align: center;
|
||
margin-top: 1mm;
|
||
}
|
||
.awb-label-small {
|
||
font-size: 7px;
|
||
color: #666666;
|
||
text-transform: uppercase;
|
||
text-align: center;
|
||
margin-top: 1mm;
|
||
}
|
||
|
||
/* ════════ Info Column (Reference/Weight/Origin/Date/Destination) ════════ */
|
||
.info-table {
|
||
width: 100%;
|
||
border-collapse: collapse;
|
||
font-size: 8px;
|
||
}
|
||
.info-table td {
|
||
padding: 1.5mm 2mm;
|
||
border-bottom: 0.5px solid #cccccc;
|
||
}
|
||
.info-table td.info-label {
|
||
width: 45%;
|
||
color: #666666;
|
||
font-weight: bold;
|
||
text-transform: uppercase;
|
||
}
|
||
.info-table td.info-value {
|
||
color: #000000;
|
||
font-weight: bold;
|
||
}
|
||
.info-table tr:last-child td {
|
||
border-bottom: none;
|
||
}
|
||
.country-iso-big {
|
||
font-size: 14px;
|
||
font-weight: bold;
|
||
color: #000000;
|
||
}
|
||
|
||
/* ════════ Weight & Dimensions Row (bottom) ════════ */
|
||
.weights-table {
|
||
width: 100%;
|
||
table-layout: fixed;
|
||
border-collapse: collapse;
|
||
border: 2px solid #000000;
|
||
}
|
||
.weights-table td {
|
||
width: 33.33%;
|
||
text-align: center;
|
||
padding: 2.5mm 2mm;
|
||
border-right: 1px solid #000000;
|
||
vertical-align: middle;
|
||
}
|
||
.weights-table td:last-child {
|
||
border-right: none;
|
||
}
|
||
.weight-label-bottom {
|
||
font-size: 7px;
|
||
color: #666666;
|
||
text-transform: uppercase;
|
||
margin-bottom: 1mm;
|
||
}
|
||
.weight-value-bottom {
|
||
font-size: 13px;
|
||
font-weight: bold;
|
||
color: #000000;
|
||
}
|
||
</style>
|
||
</head>
|
||
<body>
|
||
<div class="label-page">
|
||
|
||
<!-- ════════ Main: Barcode + Info ════════ -->
|
||
<table class="main-table">
|
||
<tr>
|
||
<!-- Barcode (left) -->
|
||
<td class="barcode-cell">
|
||
@if($barcode_base64)
|
||
<img src="{{ $barcode_base64 }}" alt="barcode">
|
||
@endif
|
||
<div class="awb-number">{{ $shipment->awb_no }}</div>
|
||
<div class="awb-label-small">Reference Number</div>
|
||
</td>
|
||
<!-- Info (right) -->
|
||
<td class="info-cell">
|
||
<table class="info-table">
|
||
<tr>
|
||
<td class="info-label">Weight</td>
|
||
<td class="info-value">{{ number_format($shipment->weight ?? 0, 3) }} KG</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="info-label">Origin</td>
|
||
<td class="info-value">
|
||
{{ strtoupper($shipment->fromCountry?->name ?? '—') }}
|
||
<span class="country-iso-big">({{ $origin_iso }})</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="info-label">Date</td>
|
||
<td class="info-value">{{ $shipment->created_at?->format('m/d/Y') }}</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="info-label">Destination</td>
|
||
<td class="info-value">
|
||
{{ strtoupper($shipment->toCountry?->name ?? '—') }}
|
||
<span class="country-iso-big">({{ $dest_iso }})</span>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
|
||
<!-- ════════ Weights & Dimensions (bottom row) ════════ -->
|
||
<table class="weights-table">
|
||
<tr>
|
||
<td>
|
||
<div class="weight-label-bottom">Gross Weight</div>
|
||
<div class="weight-value-bottom">{{ number_format($shipment->weight ?? 0, 3) }} KG</div>
|
||
</td>
|
||
<td>
|
||
<div class="weight-label-bottom">Volumetric Weight</div>
|
||
<div class="weight-value-bottom">{{ number_format($shipment->volumetric_weight ?? 0, 3) }} KG</div>
|
||
</td>
|
||
<td>
|
||
<div class="weight-label-bottom">W × L × H (cm)</div>
|
||
<div class="weight-value-bottom">{{ $shipment->dimensions ?: '—' }}</div>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
|
||
</div>
|
||
</body>
|
||
</html> |