fix(attestation): footer must be in before flexible content in order to be repeated on each page

This commit is contained in:
Colin Darie 2024-08-19 18:28:19 +02:00
parent b33f542cf4
commit 1dbd198092
No known key found for this signature in database
GPG key ID: 4FB865FDBCA4BCC4
2 changed files with 11 additions and 4 deletions

View file

@ -47,6 +47,7 @@
margin: 0 auto; margin: 0 auto;
background: #FFFFFF; background: #FFFFFF;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); // Optional: for better visualization box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); // Optional: for better visualization
position: relative;
} }
} }
@ -166,10 +167,15 @@
} }
} }
.footer { footer {
position: running(footer); position: running(footer);
font-size: 7pt; font-size: 7pt;
font-weight: 100; font-weight: 100;
white-space: nowrap; white-space: nowrap;
@media screen {
position: absolute;
bottom: 0;
}
} }
} }

View file

@ -30,12 +30,13 @@
- if @attestation_template.label_direction.present? - if @attestation_template.label_direction.present?
= simple_format @attestation_template.label_direction, class: "direction" = simple_format @attestation_template.label_direction, class: "direction"
- if @attestation_template.footer.present?
%footer
= simple_format @attestation_template.footer
.main .main
= sanitize(@body, attributes: %w[class style], tags: Rails.configuration.action_view.sanitized_allowed_tags + %w[header]) = sanitize(@body, attributes: %w[class style], tags: Rails.configuration.action_view.sanitized_allowed_tags + %w[header])
- if @attestation_template.signature.present? - if @attestation_template.signature.present?
.signature .signature
= image_tag(@attestation_template.signature_url) = image_tag(@attestation_template.signature_url)
- if @attestation_template.footer.present?
= simple_format @attestation_template.footer, class: "footer"