Skip to content

Commit

Permalink
Merge pull request #913 from MTES-MCT/campaign-logo-size
Browse files Browse the repository at this point in the history
fix: draft image sizes + display rules for both date and location
  • Loading branch information
loicguillois authored Sep 30, 2024
2 parents fbf710f + 68d8589 commit f624e79
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
4 changes: 2 additions & 2 deletions frontend/src/components/Draft/DraftBody.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function DraftBody(props: Readonly<Props>) {
<Container as="article" className={styles.article} fluid>
<Row className="fr-mb-2w justify-space-between">
<h6 id="draft-body-label" className="fr-mb-0">
Contenu de votre courrier (obligatoire)
Contenu de votre courrier
</h6>
<AppLink
isSimple
Expand All @@ -37,7 +37,7 @@ function DraftBody(props: Readonly<Props>) {
<AppTextInput
inputForm={props.form}
inputKey="subject"
label="Objet*"
label="Objet"
value={props.subject}
onChange={(event) =>
props.onChange({
Expand Down
8 changes: 6 additions & 2 deletions packages/draft/src/templates/draft/draft.css
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,13 @@ p {
width: 40%;
}

.header__image {
.header__image, .footer__image {
max-width: 140px;
height: auto;
max-height: 140px;
object-fit: contain;
}

.header__image {
margin-bottom: 0.5rem;
}

Expand Down
12 changes: 10 additions & 2 deletions packages/draft/src/templates/draft/draft.hbs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html lang="en">
<html lang="fr">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
Expand Down Expand Up @@ -54,9 +54,17 @@
{{#if writtenFrom}}
{{#if writtenAt}}
<p{{writtenFrom}}, le {{localdate writtenAt}}</p>
{{else}}
<p{{writtenFrom}}</p>
{{/if}}
{{else}}
{{#if writtenAt}}
<p>Le {{localdate writtenAt}}</p>
{{/if}}
{{/if}}
{{#if subject}}
<p><strong>Objet : </strong>{{subject}}</p>
{{/if}}
</header>
<section class="main__body">
{{{body}}}
Expand All @@ -65,7 +73,7 @@
<footer>
<section class="footer__signature">
{{#if sender.signatoryFile}}
<p><img src="{{sender.signatoryFile}}" alt="Signature" /></p>
<p><img src="{{sender.signatoryFile}}" alt="Signature" class="footer__image" /></p>
{{/if}}
{{#if sender.signatoryFirstName}}
{{#if sender.signatoryLastName}}
Expand Down

0 comments on commit f624e79

Please sign in to comment.