Skip to content

Commit

Permalink
adapt css alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
Holist committed Feb 14, 2025
1 parent 3700532 commit cc13fe7
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 9 deletions.
23 changes: 20 additions & 3 deletions app/javascript/stylesheets/pdf.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -38,6 +50,11 @@ u {
}
}

.user-address {
position: absolute;
right: 0;
}

.direction-names {
margin-top: 110px;
}
Expand Down
14 changes: 8 additions & 6 deletions app/views/letters/_header.html.erb
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
<div class="header">
<div>
<div class="header-left">
<div class="header-logo">
<%= image_tag(organisation.logo.attached? ? organisation.logo.url : department.logo.url) %>
</div>
</div>
<div>
<p><%= sender_city || department.capital %>, le <%= Date.today.strftime('%d/%m/%Y') %></p>
<br/>
<p>À l'attention de</p>
<br/><br/>
<div class="header-right">
<div>
<p><%= sender_city || department.capital %>, le <%= Date.today.strftime('%d/%m/%Y') %></p>
<br/>
<p>À l'attention de</p>
<br/><br/>
</div>
</div>
<div class="user-address">
<p><%= user.title.upcase %> <%= user.first_name.upcase %> <%= user.last_name.upcase %><br/>
Expand Down

0 comments on commit cc13fe7

Please sign in to comment.