Skip to content

Commit

Permalink
Merge pull request #53 from privacybydesign/feat/email-templates
Browse files Browse the repository at this point in the history
adding style for email templates
  • Loading branch information
w-ensink authored Dec 16, 2024
2 parents 455eeb9 + 1e931a6 commit ecdc4a4
Show file tree
Hide file tree
Showing 4 changed files with 189 additions and 28 deletions.
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,12 @@ COPY --from=webappbuild /www/ /usr/local/tomee/webapps/ROOT/

# Copy the war file to the webapps directory
COPY --from=javabuild /app/build/libs/irma_email_issuer.war /usr/local/tomee/webapps/

# Copy template files to the email templates directory
COPY ./src/main/resources/email-en.html /email-templates/email-en.html
COPY ./src/main/resources/email-nl.html /email-templates/email-nl.html


RUN mkdir /usr/local/keys

ENV IRMA_CONF="/config/"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ public Response sendEmail(@FormParam("email") String email,
true,
url,
url

);
} catch (AddressException e) {
logger.error("Invalid address: {}", e.getMessage());
Expand Down
106 changes: 92 additions & 14 deletions src/main/resources/email-en.html
Original file line number Diff line number Diff line change
@@ -1,16 +1,94 @@
<!doctype html>
<!DOCTYPE html>
<html>

<head>
<title>Add e-mail address to Yivi app</title>
<meta http-equiv="Content-Type" content="text/html charset=UTF-8" />
</head>

<body>
<p>Click the link to add the e-mail address to your Yivi app.</p>
<p>
<a href="%s">Add e-mail address to your Yivi app</a>
</p>
</body>

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
body {
margin: 0;
padding: 0;
background-color: #ffffff;
font-family: 'Roboto', 'Open Sans', 'Arial', sans-serif;
font-size: 16px;
line-height: 1.5;
color: #b9113d;
}
</style>
</head>
<body style="margin: 0; padding: 0; background-color: #ffffff; font-family:'Roboto', 'Open Sans', 'Arial', sans-serif ; font-size: 16px; line-height: 1.5; color: #b9113d;">
<table align="center" width="100%%" cellpadding="0" cellspacing="0" role="presentation" style="background-color: #ffffff;">
<tr>
<td align="center">
<table width="600" cellpadding="0" cellspacing="0" style="background-color: #ffffff; border: 1px solid #ddd; border-radius: 4px; overflow: hidden;">
<!-- Header -->
<tr>
<td style="padding: 16px 24px; text-align: center;">
<img src="https://yivi-cdn.s3.nl-ams.scw.cloud/yivi-header.png" />
</td>
</tr>
<!-- Title -->
<tr>
<td style="padding: 16px 24px; font-size: 24px; font-weight: bold; color: #a3244a; text-align: left;">
Email Confirmation
</td>
</tr>
<!-- Body Text -->
<tr>
<td style="padding: 16px 24px; font-size: 18px; color: #a3244a; text-align: left;">
<p>Dear Yivi User,</p>
<p>
Thanks for using Yivi, your privacy-friendly identity wallet!<br />
Click the button below to verify and add your email address to your Yivi app.
</p>
</td>
</tr>
<!-- Button -->
<tr>
<td align="center" style="padding: 16px 24px;">
<a href="%1$s"
style="
color: #ffffff;
font-size: 16px;
font-family: 'Roboto', 'Open Sans', 'Arial', sans-serif;
font-weight: bold;
background-color: #a3244a;
border-radius: 4px;
display: block;
padding: 16px 32px;
text-decoration: none;
background: #a3244a url('https://yivi-cdn.s3.nl-ams.scw.cloud/button-primary.svg') no-repeat right;">
Verify your email address
</a>
</td>
</tr>

<!-- Alternate Link -->
<tr>
<td style="padding: 16px 24px; font-size: 18px; color: #a3244a; text-align: left;">
If the button doesn&#39;t work, you can also verify your email by using the link below:<br />
<a href="%1$s" style="color:blue underline;">%1$s</a>
</td>
</tr>
<!-- Footer Text -->
<tr>
<td style="padding: 16px 24px; font-size: 18px; color: #a3244a; text-align: left;">
Didn&#39;t request this?<br />
Ignore this email or contact us.
</td>
</tr>
<!-- Divider -->
<tr>
<td style="padding: 0; border-top: 3px solid #8b173a;"></td>
</tr>
<!-- Footer -->
<tr>
<td style="padding: 16px 24px; font-size: 16px; color: #a3244a; text-align: left;">
Sent to you from Yivi, join our <a href="https://github.com/privacybydesign">Github community</a>.
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
107 changes: 93 additions & 14 deletions src/main/resources/email-nl.html
Original file line number Diff line number Diff line change
@@ -1,16 +1,95 @@
<!doctype html>
<!DOCTYPE html>
<html>

<head>
<title>Voeg e-mailadres toe aan Yivi-app</title>
<meta http-equiv="Content-Type" content="text/html charset=UTF-8" />
</head>

<body>
<p>Klik op de link om het e-mailadres toe te voegen aan je Yivi-app.</p>
<p>
<a href="%s">Voeg e-mailadres toe aan je Yivi-app</a>
</p>
</body>

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
body {
margin: 0;
padding: 0;
background-color: #ffffff;
font-family: 'Roboto', 'Open Sans', 'Arial', sans-serif;
font-size: 16px;
line-height: 1.5;
color: #b9113d;
}
</style>
</head>
<body style="margin: 0; padding: 0; background-color: #ffffff; font-family: Verdana, Arial; font-size: 16px; line-height: 1.5; color: #b9113d;"></body>
<table align="center" width="100%%" cellpadding="0" cellspacing="0" role="presentation" style="background-color: #ffffff;">
<tr>
<td align="center">
<table width="600" cellpadding="0" cellspacing="0" style="background-color: #ffffff; border: 1px solid #ddd; border-radius: 4px; overflow: hidden;">
<!-- Header -->
<tr>
<td style="padding: 16px 24px; text-align: center;">
<img src="https://yivi-cdn.s3.nl-ams.scw.cloud/yivi-header.png" />
</td>
</tr>
<!-- Title -->
<tr>
<td style="padding: 16px 24px; font-size: 24px; font-weight: bold; color: #a3244a; text-align: left;">
E-mailbevestiging
</td>
</tr>
<!-- Body Text -->
<tr>
<td style="padding: 16px 24px; font-size: 18px; color: #a3244a; text-align: left;">
<p>Beste Yivi-gebruiker,</p>
<p>
Bedankt voor het gebruiken van Yivi, jouw privacyvriendelijke identity wallet!<br />
Klik op de knop hieronder om je e-mailadres te verifiëren en toe te voegen aan jouw Yivi-app.
</p>
</td>
</tr>
<!-- Button -->
<tr>
<td align="center" style="padding: 16px 24px;">
<a href="%1$s"
style="
color: #ffffff;
font-size: 16px;
font-family: 'Roboto', 'Open Sans', 'Arial', sans-serif;
font-weight: bold;
background-color: #a3244a;
border-radius: 4px;
display: block;
padding: 16px 32px;
text-decoration: none;
background: #a3244a url('https://yivi-cdn.s3.nl-ams.scw.cloud/button-primary.svg') no-repeat right;">
Verifieer je e-mailadres
</a>
</td>
</tr>

<!-- Alternate Link -->
<tr>
<td style="padding: 16px 24px; font-size: 18px; color: #a3244a; text-align: left;">
Werkt deze knop niet? Gebruik dan de onderstaande link om je e-mailadres te verifiëren:<br />
<a href="%1$s" style="color:blue underline;">%1$s</a>
</td>
</tr>
<!-- Footer Text -->
<tr>
<td style="padding: 16px 24px; font-size: 18px; color: #a3244a; text-align: left;">
Heb jij dit niet aangevraagd?<br />
Negeer deze e-mail of neem contact met ons op.

</td>
</tr>
<!-- Divider -->
<tr>
<td style="padding: 0; border-top: 3px solid #8b173a;"></td>
</tr>
<!-- Footer -->
<tr>
<td style="padding: 16px 24px; font-size: 16px; color: #a3244a; text-align: left;">
Verzonden door Yivi, sluit je aan bij onze <a href="https://github.com/privacybydesign">GitHub-community</a>.
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>

0 comments on commit ecdc4a4

Please sign in to comment.