fix: pdf templates

This commit is contained in:
Ahmed Bouhuolia
2024-09-17 17:46:56 +02:00
parent 2c790427fa
commit bb0d91a9cb
11 changed files with 177 additions and 131 deletions

View File

@@ -4,21 +4,13 @@ block head
- var prefix = 'bc'
style.
.#{prefix}-root {
color: #111;
color: #000;
padding: 24px 30px;
font-size: 12px;
position: relative;
box-shadow: inset 0 4px 0px 0 var(--invoice-primary-color);
}
.#{prefix}-logo-wrap {
font-size: 60px;
margin: 0;
line-height: 1;
margin-bottom: 25px;
font-weight: 500;
color: #333;
}
.#{prefix}-big-title {
height: 120px;
width: 120px;
position: absolute;
@@ -26,6 +18,14 @@ block head
top: 26px;
overflow: hidden;
}
.#{prefix}-big-title {
font-size: 60px;
margin: 0;
line-height: 1;
margin-bottom: 25px;
font-weight: 500;
color: #333;
}
.#{prefix}-terms-list {
display: flex;
flex-direction: column;
@@ -53,6 +53,9 @@ block head
gap: 10px;
margin-bottom: 24px;
}
.#{prefix}-address-section > * {
flex: 1 1 auto;
}
.#{prefix}-address {}
.#{prefix}-table {
width: 100%;
@@ -99,8 +102,12 @@ block head
display: flex;
padding: 4px 0;
}
.#{prefix}-totals__line--gray-border {}
.#{prefix}-totals__line--dark-border {}
.#{prefix}-totals__line--gray-border {
border-bottom: 1px solid #DADADA;
}
.#{prefix}-totals__line--dark-border {
border-bottom: 1px solid #000;
}
.#{prefix}-totals__line__label {
min-width: 160px;
}
@@ -161,30 +168,31 @@ block content
tbody
each line in lines
tr(class=`${prefix}-table__row`)
td(class=`${prefix}-table__column`)= line.item
td(class=`${prefix}-table__column`)= line.description
td(class=`${prefix}-table__column ${prefix}-table__column--right`)= line.rate
td(class=`${prefix}-table__column ${prefix}-table__column--right`)= line.total
td(class=`${prefix}-table__cell`)= line.item
td(class=`${prefix}-table__cell`)= line.description
td(class=`${prefix}-table__cell${prefix}-table__cell--right`)= line.rate
td(class=`${prefix}-table__cell${prefix}-table__cell--right`)= line.total
//- Totals Section
div(class=`${prefix}-totals`)
if showSubtotal
div(class=`${prefix}-totals__line #{prefix}-totals__line--gray-border`)
div(class=`${prefix}-totals__line ${prefix}-totals__line--gray-border`)
span(class=`${prefix}-totals__line__label`)= subtotalLabel
span(class=`${prefix}-totals__line__amount`)= subtotal
if showTotal
div(class=`${prefix}-totals__line #{prefix}-totals__line--dark-border`)
div(class=`${prefix}-totals__line ${prefix}-totals__line--dark-border`)
span(class=`${prefix}-totals__line__label`)= totalLabel
span(class=`${prefix}-totals__line__amount`)= total
//- Customer Note Section
if showCustomerNote
div(class=`${prefix}-statement`)
span(class=`${prefix}-statement__label`)= customerNoteLabel
p(class=`${prefix}-statement__value`)= customerNote
div(class=`${prefix}-statement__label`)= customerNoteLabel
div(class=`${prefix}-statement__value`)= customerNote
//- Terms & Conditions Section
if showTermsConditions
div(class=`${prefix}-statement`)
span(class=`${prefix}-statement__label`)= termsConditionsLabel
p(class=`${prefix}-statement__value`)= termsConditions
div(class=`${prefix}-statement__label`)= termsConditionsLabel
div(class=`${prefix}-statement__value`)= termsConditions