diff --git a/app/assets/stylesheets/attestation.scss b/app/assets/stylesheets/attestation.scss index 75a10efba..e01a9168b 100644 --- a/app/assets/stylesheets/attestation.scss +++ b/app/assets/stylesheets/attestation.scss @@ -27,6 +27,7 @@ font-size: 8pt; content: counter(page) " / " counter(pages); margin-top: 17mm; + white-space: nowrap; } @bottom-left { @@ -41,11 +42,12 @@ flex-direction: column; justify-content: space-between; // This will push the footer down max-width: 21cm; - height: 29.7cm; + min-height: 29.7cm; padding: 17mm; margin: 0 auto; background: #FFFFFF; box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); // Optional: for better visualization + position: relative; } } @@ -165,9 +167,15 @@ } } - .footer { + footer { position: running(footer); font-size: 7pt; font-weight: 100; + white-space: nowrap; + + @media screen { + position: absolute; + bottom: 0; + } } } diff --git a/app/views/administrateurs/attestation_template_v2s/show.html.haml b/app/views/administrateurs/attestation_template_v2s/show.html.haml index 06c87773f..e27889003 100644 --- a/app/views/administrateurs/attestation_template_v2s/show.html.haml +++ b/app/views/administrateurs/attestation_template_v2s/show.html.haml @@ -30,12 +30,13 @@ - if @attestation_template.label_direction.present? = simple_format @attestation_template.label_direction, class: "direction" + - if @attestation_template.footer.present? + %footer + = simple_format @attestation_template.footer + .main = sanitize(@body, attributes: %w[class style], tags: Rails.configuration.action_view.sanitized_allowed_tags + %w[header]) - if @attestation_template.signature.present? .signature = image_tag(@attestation_template.signature_url) - - - if @attestation_template.footer.present? - = simple_format @attestation_template.footer, class: "footer"