Skip to content

Commit

Permalink
#259 Email templates use Roboto
Browse files Browse the repository at this point in the history
  • Loading branch information
qifeng-bai committed Dec 19, 2024
1 parent 32a45d1 commit 329be9a
Show file tree
Hide file tree
Showing 13 changed files with 83 additions and 83 deletions.
4 changes: 2 additions & 2 deletions grails-app/views/email/_footer.gsp
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<!-- Footer Section -->
<tr>
<td style="padding: 35px 70px 35px 70px;background-color: #C44D34;color: #fff;font-family: 'Arial', sans-serif;font-size: 14px;line-height: 1.43;;text-align: center;">
<td style="padding: 35px 70px 35px 70px;background-color: #C44D34;color: #fff;font-family: 'Roboto', sans-serif;font-size: 14px;line-height: 1.43;;text-align: center;">
<p>The Atlas of Living Australia acknowledges Australia's Traditional Owners and pays respect to the past and present Elders of the nation's Aboriginal and Torres Strait Islander communities.</p>
<p>We honour and celebrate the spiritual, cultural and customary connections of Traditional Owners to Country and the biodiversity that forms part of that Country.</p>
</td>
</tr>
<tr>
<td style="padding: 35px 70px 5px 70px;background-color: #ffffff;color: #000;font-family: 'Arial', sans-serif;font-size: 14px;line-height: 1.43;text-align: center;">
<td style="padding: 35px 70px 5px 70px;background-color: #ffffff;color: #000;font-family: 'Roboto', sans-serif;font-size: 14px;line-height: 1.43;text-align: center;">
<p>
<a href="https://www.education.gov.au/national-collaborative-research-infrastructure-strategy-ncris"><img loading="lazy" src="${grailsApplication.config.grails.serverURL}/assets/email/NCRIS_150px-150x109.jpg" alt="NCRIS logo" width="125" height="90"></a>&nbsp;
&nbsp;<a href="https://csiro.au/"><img loading="lazy" src="${grailsApplication.config.grails.serverURL}/assets/email/CSIRO_Solid_RGB-150x150.png" alt="CSIRO logo" width="90" height="90"></a>&nbsp;
Expand Down
2 changes: 1 addition & 1 deletion grails-app/views/email/_unsubscribe.gsp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<tr >
<td style="padding: 5px 70px 10px 70px;background-color: #ffffff;color: #000;font-family: 'Arial', sans-serif;font-size: 14px;line-height: 1.43;text-align: center;">
<td style="padding: 5px 70px 10px 70px;background-color: #ffffff;color: #000;font-family: 'Roboto', sans-serif;font-size: 14px;line-height: 1.43;text-align: center;">
<g:message code="email.unsubscribe.query" args="[unsubscribeOne, queryName]" />
<br>
<a href="${stopNotification}"><g:message code="alert.manage" /></a>
Expand Down
14 changes: 7 additions & 7 deletions grails-app/views/email/annotations.gsp
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
</head>
<style>
</style>
<body style="background-color: #f4f4f4;margin: 0;padding: 0;font-family: 'Arial', sans-serif;font-size: 16px;line-height: 1.5;">
<body style="background-color: #f4f4f4;margin: 0;padding: 0;font-family: 'Roboto', sans-serif;font-size: 16px;line-height: 1.5;">
<table border="0" cellpadding="0" cellspacing="0" width="100%" style="background-color: #f4f4f4;border-spacing: 0;border-collapse: collapse;">
<tr>
<td align="center" style="padding: 20px;font-family: 'Arial', sans-serif;font-size: 16px;line-height: 1.5;">
<table border="0" cellpadding="0" cellspacing="0" width="650" style="background-color: #ffffff;font-family: 'Arial', sans-serif;font-size: 16px;line-height: 1.5;border-spacing: 0;border-collapse: collapse;">
<td align="center" style="padding: 20px;font-family: 'Roboto', sans-serif;font-size: 16px;line-height: 1.5;">
<table border="0" cellpadding="0" cellspacing="0" width="650" style="background-color: #ffffff;font-family: 'Roboto', sans-serif;font-size: 16px;line-height: 1.5;border-spacing: 0;border-collapse: collapse;">
<!-- Logo -->
<tr>
<td style="text-align: center; padding: 20px; background-color: #fff;">
Expand All @@ -25,21 +25,21 @@
</tr>
<!-- Header -->
<tr>
<td align="center" background="${grailsApplication.config.grails.serverURL}/assets/email/banner-ocean.png" width="620" height="120" style="color:white;background-color:#003A70;padding: 20px 10px 20px 10px;text-align: center;font-family: 'Arial', sans-serif;font-size: 16px;line-height: 1.5;background-image:url(${grailsApplication.config.grails.serverURL}/assets/email/banner-ocean.png);background-position: top center;background-size: cover;background-repeat: no-repeat">
<td align="center" background="${grailsApplication.config.grails.serverURL}/assets/email/banner-ocean.png" width="620" height="120" style="color:white;background-color:#003A70;padding: 20px 10px 20px 10px;text-align: center;font-family: 'Roboto', sans-serif;font-size: 16px;line-height: 1.5;background-image:url(${grailsApplication.config.grails.serverURL}/assets/email/banner-ocean.png);background-position: top center;background-size: cover;background-repeat: no-repeat">
<h1 style="font-size: 24px; color: #fff;">ALA Alerts - ${query.name}</h1>
<p style="font-size: 16px; color: #fff;"><strong>${new SimpleDateFormat("dd MMM yyyy").format(new Date())}</strong></p>
</td>
</tr>
<tr>
<td style="background-color: #E8E8E8;color: #000;padding: 40px 30px 40px 30px;text-align: center;font-family: 'Arial', sans-serif;font-size: 22px;line-height: 1.5;">
<td style="background-color: #E8E8E8;color: #000;padding: 40px 30px 40px 30px;text-align: center;font-family: 'Roboto', sans-serif;font-size: 22px;line-height: 1.5;">
<div> ${totalRecords} occurrence ${totalRecords == 1 ? 'record' : 'records'} ${totalRecords == 1 ? 'has' : 'have'} been updated
</div>
</td>
</tr>
<!-- Records Section -->
<g:each status="i" in="${records}" var="oc">
<tr>
<td style="padding: 20px;background-color: white;font-family: 'Arial', sans-serif;font-size: 14px;line-height: 1.5;">
<td style="padding: 20px;background-color: white;font-family: 'Roboto', sans-serif;font-size: 14px;line-height: 1.5;">
<g:set var="occurrencelink" value="${query.baseUrlForUI}/occurrences/${oc.uuid}"></g:set>
<g:set var="assertionlink" value="${query.baseUrl}/occurrences/${oc.uuid}/assertions"></g:set>
<table style="width: 100%">
Expand All @@ -51,7 +51,7 @@
<strong>${i+1}. </strong>
</td>
<td style="vertical-align: top;">
<a href="${occurrencelink}" style="color: #003A70;text-decoration: none;font-family: 'Arial', sans-serif;font-size: 16px;line-height: 1.5;">
<a href="${occurrencelink}" style="color: #003A70;text-decoration: none;font-family: 'Roboto', sans-serif;font-size: 16px;line-height: 1.5;">
<strong><em>${oc.scientificName?: oc.vernacularName ?: oc.raw_raw_scientificName }</em></strong>
</a>
<p>
Expand Down
14 changes: 7 additions & 7 deletions grails-app/views/email/biocache.gsp
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
color: #003A70;
}
</style>
<body style="background-color: #f4f4f4;margin: 0;padding: 0;font-family: 'Arial', sans-serif;font-size: 16px;line-height: 1.5;">
<body style="background-color: #f4f4f4;margin: 0;padding: 0;font-family: 'Roboto', sans-serif;font-size: 16px;line-height: 1.5;">
<table style="width: 100%; background-color: #f4f4f4;border-spacing: 0;border-collapse: collapse;">
<tr>
<td align="center" style="padding: 20px;font-family: 'Arial', sans-serif;font-size: 16px;line-height: 1.5;">
<table style="width: 650px; background-color: #ffffff; font-family: 'Arial', sans-serif;font-size: 16px;line-height: 1.5;border-spacing: 0;border-collapse: collapse;">
<td align="center" style="padding: 20px;font-family: 'Roboto', sans-serif;font-size: 16px;line-height: 1.5;">
<table style="width: 650px; background-color: #ffffff; font-family: 'Roboto', sans-serif;font-size: 16px;line-height: 1.5;border-spacing: 0;border-collapse: collapse;">
<!-- Logo -->
<tr>
<td style="text-align: center; padding: 20px; background-color: #fff;">
Expand All @@ -28,28 +28,28 @@
</tr>
<!-- Header -->
<tr>
<td height="120" style="color:white;background-color:#003A70;padding: 20px 10px 20px 10px;text-align: center;font-family: 'Arial', sans-serif;font-size: 16px;line-height: 1.5;background-image:url(${grailsApplication.config.grails.serverURL}/assets/email/banner-ocean.png);background-position: top center;background-size: cover;background-repeat: no-repeat">
<td height="120" style="color:white;background-color:#003A70;padding: 20px 10px 20px 10px;text-align: center;font-family: 'Roboto', sans-serif;font-size: 16px;line-height: 1.5;background-image:url(${grailsApplication.config.grails.serverURL}/assets/email/banner-ocean.png);background-position: top center;background-size: cover;background-repeat: no-repeat">
<h1 style="font-size: 24px; color: #fff;">ALA Alerts - ${query.name}</h1>
<p style="font-size: 16px; color: #fff;"><strong>${new SimpleDateFormat("dd MMM yyyy").format(new Date())}</strong></p>
</td>
</tr>
<tr>
<td style="background-color: #E8E8E8;color: #000;padding: 40px 30px 40px 30px;text-align: center;font-family: 'Arial', sans-serif;font-size: 22px;line-height: 1.5;">
<td style="background-color: #E8E8E8;color: #000;padding: 40px 30px 40px 30px;text-align: center;font-family: 'Roboto', sans-serif;font-size: 22px;line-height: 1.5;">
<div> ${totalRecords} occurrence ${totalRecords == 1 ? 'record' : 'records'} ${totalRecords == 1 ? 'has' : 'have'} been updated
</div>
</td>
</tr>
<!-- Records Section -->
<g:each status="i" in="${records}" var="oc">
<tr>
<td style="padding: 20px;background-color: white;font-family: 'Arial', sans-serif;font-size: 14px;line-height: 1.5;">
<td style="padding: 20px;background-color: white;font-family: 'Roboto', sans-serif;font-size: 14px;line-height: 1.5;">
<g:set var="occurrencelink" value="${query.baseUrlForUI}/occurrences/${oc.uuid}"></g:set>
<g:set var="assertionlink" value="${query.baseUrl}/occurrences/${oc.uuid}/assertions"></g:set>
<table style="width: 100%">
<tr style="vertical-align: top;">
<td style="width: 37%">
<g:if test="${oc.scientificName?: oc.vernacularName ?: oc.raw_raw_scientificName}">
<strong>${i+1}. <em><a href="${occurrencelink}" style="color: #003A70;text-decoration: none;font-family: 'Arial', sans-serif;font-size: 16px;line-height: 1.5;">${oc.scientificName?: oc.vernacularName ?: oc.raw_raw_scientificName}</a></em></strong>
<strong>${i+1}. <em><a href="${occurrencelink}" style="color: #003A70;text-decoration: none;font-family: 'Roboto', sans-serif;font-size: 16px;line-height: 1.5;">${oc.scientificName?: oc.vernacularName ?: oc.raw_raw_scientificName}</a></em></strong>
</g:if>
<p style="padding-left: 15px;">
<g:if test="${oc.vernacularName}">
Expand Down
14 changes: 7 additions & 7 deletions grails-app/views/email/biocacheImages.gsp
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@
</style>
</head>

<body style="background-color: #f4f4f4;margin: 0;padding: 0;font-family: 'Arial', sans-serif;font-size: 16px;line-height: 1.5;">
<body style="background-color: #f4f4f4;margin: 0;padding: 0;font-family: 'Roboto', sans-serif;font-size: 16px;line-height: 1.5;">
<table style="background-color: #f4f4f4;border-spacing: 0;border-collapse: collapse;">
<tr>
<td align="center" style="padding: 20px;font-family: 'Arial', sans-serif;font-size: 16px;line-height: 1.5;">
<table border="0" cellpadding="0" cellspacing="0" width="650" style="background-color: #ffffff;font-family: 'Arial', sans-serif;font-size: 16px;line-height: 1.5;border-spacing: 0;border-collapse: collapse;">
<td align="center" style="padding: 20px;font-family: 'Roboto', sans-serif;font-size: 16px;line-height: 1.5;">
<table border="0" cellpadding="0" cellspacing="0" width="650" style="background-color: #ffffff;font-family: 'Roboto', sans-serif;font-size: 16px;line-height: 1.5;border-spacing: 0;border-collapse: collapse;">
<!-- Logo -->
<tr>
<td style="text-align: center; padding: 20px; background-color: #fff;">
Expand All @@ -51,13 +51,13 @@
</tr>
<!-- Header -->
<tr>
<td height="120" style="color:white;background-color:#003A70;padding: 20px 10px 20px 10px;text-align: center;font-family: 'Arial', sans-serif;font-size: 16px;line-height: 1.5;background-image:url(${grailsApplication.config.grails.serverURL}/assets/email/banner-ocean.png);background-position: top center;background-size: cover;background-repeat: no-repeat">
<td height="120" style="color:white;background-color:#003A70;padding: 20px 10px 20px 10px;text-align: center;font-family: 'Roboto', sans-serif;font-size: 16px;line-height: 1.5;background-image:url(${grailsApplication.config.grails.serverURL}/assets/email/banner-ocean.png);background-position: top center;background-size: cover;background-repeat: no-repeat">
<h1 style="font-size: 24px; color: #fff;">ALA Alerts - ${query.name}</h1>
<p style="font-size: 16px; color: #fff;"><strong>${new SimpleDateFormat("dd MMM yyyy").format(new Date())}</strong></p>
</td>
</tr>
<tr>
<td style="background-color: #E8E8E8;color: #000;padding: 40px 30px 40px 30px;text-align: center;font-family: 'Arial', sans-serif;font-size: 22px;line-height: 1.5;">
<td style="background-color: #E8E8E8;color: #000;padding: 40px 30px 40px 30px;text-align: center;font-family: 'Roboto', sans-serif;font-size: 22px;line-height: 1.5;">
<g:set var="totalRecords" value="${records.values().sum { it.size() }}" />
<div>
${totalRecords} ${totalRecords == 1 ? ' record with images ' : ' records with images'} ${totalRecords == 1 ? 'has' : 'have'} been added
Expand All @@ -71,7 +71,7 @@
<!-- Records Section -->
<g:each status="i" in="${records.keySet()}" var="dataResourceId">
<tr>
<td style="padding: 20px;background-color: white;font-family: 'Arial', sans-serif;font-size: 14px;line-height: 1.5;">
<td style="padding: 20px;background-color: white;font-family: 'Roboto', sans-serif;font-size: 14px;line-height: 1.5;">
<g:set var="occurrences" value="${records[dataResourceId]}" />
<g:set var="dataResourceName" value="${occurrences[0]?.dataResourceName?:dataResourceId}" />
<g:set var="dataResourcePublicUrl" value="${occurrences[0]?.dataResourceInfo?.alaPublicUrl}" />
Expand Down Expand Up @@ -99,7 +99,7 @@
<tr>
</g:if>
<td style="width: 25%; vertical-align: top;">
<a href="${query.baseUrlForUI}/occurrences/${oc.uuid}" style="color: #003A70;font-family: 'Arial', sans-serif;font-size: 16px;line-height: 1.5;">
<a href="${query.baseUrlForUI}/occurrences/${oc.uuid}" style="color: #003A70;font-family: 'Roboto', sans-serif;font-size: 16px;line-height: 1.5;">
<img src="${oc.smallImageUrl}" alt="${message(code:"biocache.images.alt.image", args:[oc.scientificName])}" style="vertical-align: top; width:150px; height:150px;border-radius: 6px;line-height: 100%;"/></a>
<br/>
<i>${oc.scientificName}</i><br>
Expand Down
Loading

1 comment on commit 329be9a

@kylie-m
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks for updating the font Bai

Please sign in to comment.