From cc13fe73235fd96a21e52c7665f231e83b2af67f Mon Sep 17 00:00:00 2001 From: Romain Neuville Date: Fri, 14 Feb 2025 14:43:46 +0100 Subject: [PATCH] adapt css alignment --- app/javascript/stylesheets/pdf.scss | 23 ++++++++++++++++++++--- app/views/letters/_header.html.erb | 14 ++++++++------ 2 files changed, 28 insertions(+), 9 deletions(-) diff --git a/app/javascript/stylesheets/pdf.scss b/app/javascript/stylesheets/pdf.scss index d35193a3e..3581d619c 100644 --- a/app/javascript/stylesheets/pdf.scss +++ b/app/javascript/stylesheets/pdf.scss @@ -19,13 +19,25 @@ u { white-space: nowrap; } +.pdf-align-center { + text-align: center; +} + .header { display: flex; - justify-content: space-around; } -.pdf-align-center { - text-align: center; +.header-left { + width: 50%; + display: flex; + justify-content: center; +} + +.header-right { + width: 50%; + display: flex; + justify-content: flex-start; + margin-left: 70px; } .header-logo { @@ -38,6 +50,11 @@ u { } } +.user-address { + position: absolute; + right: 0; +} + .direction-names { margin-top: 110px; } diff --git a/app/views/letters/_header.html.erb b/app/views/letters/_header.html.erb index 4af6663d9..76e373756 100644 --- a/app/views/letters/_header.html.erb +++ b/app/views/letters/_header.html.erb @@ -1,14 +1,16 @@
-
+
-
-

<%= sender_city || department.capital %>, le <%= Date.today.strftime('%d/%m/%Y') %>

-
-

À l'attention de

-

+
+
+

<%= sender_city || department.capital %>, le <%= Date.today.strftime('%d/%m/%Y') %>

+
+

À l'attention de

+

+

<%= user.title.upcase %> <%= user.first_name.upcase %> <%= user.last_name.upcase %>