-
-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add reset password email in new theme
- Loading branch information
Showing
5 changed files
with
173 additions
and
19 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions
19
app/views/devise/mailer/_reset_password_instructions_current_theme.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html charset=UTF-8"> | ||
</head> | ||
<body> | ||
<% if resource.name.present? %> | ||
<p>Hello <%= resource.name %>!</p> | ||
<% else %> | ||
<p>Hello!</p> | ||
<% end %> | ||
|
||
<p>Please click the link below and follow the instructions. We'll have you up and running with a new password in no time.</p> | ||
|
||
<p><%= link_to "Reset password", edit_password_url(resource, reset_password_token: token) %></p> | ||
|
||
<p>Didn't request this email? Then you can safely ignore it.</p> | ||
</body> | ||
</html> |
142 changes: 142 additions & 0 deletions
142
app/views/devise/mailer/_reset_password_instructions_new_theme.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,142 @@ | ||
<!DOCTYPE html> | ||
<html lang="en" xmlns:v="urn:schemas-microsoft-com:vml"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="x-apple-disable-message-reformatting"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<meta name="format-detection" content="telephone=no, date=no, address=no, email=no, url=no"> | ||
<meta name="color-scheme" content="light dark"> | ||
<meta name="supported-color-schemes" content="light dark"> | ||
<!--[if mso]> | ||
<noscript> | ||
<xml> | ||
<o:OfficeDocumentSettings xmlns:o="urn:schemas-microsoft-com:office:office"> | ||
<o:PixelsPerInch>96</o:PixelsPerInch> | ||
</o:OfficeDocumentSettings> | ||
</xml> | ||
</noscript> | ||
<style> | ||
td,th,div,p,a,h1,h2,h3,h4,h5,h6 {font-family: "Segoe UI", sans-serif; mso-line-height-rule: exactly;} | ||
</style> | ||
<![endif]--> | ||
<title>Reset password instructions</title> | ||
<style> | ||
.hover-underline:hover { | ||
text-decoration-line: underline !important | ||
} | ||
@media (max-width: 600px) { | ||
.sm-px-4 { | ||
padding-left: 16px !important; | ||
padding-right: 16px !important | ||
} | ||
} | ||
@media (max-width: 425px) { | ||
.xs-px-6 { | ||
padding-left: 24px !important; | ||
padding-right: 24px !important | ||
} | ||
.xs-py-3 { | ||
padding-top: 12px !important; | ||
padding-bottom: 12px !important | ||
} | ||
.xs-text-2xl { | ||
font-size: 24px !important | ||
} | ||
.xs-text-8px { | ||
font-size: 8px !important | ||
} | ||
} | ||
@media (prefers-color-scheme: dark) { | ||
.dark-mode-bg-_333 { | ||
background-color: #333 !important | ||
} | ||
.dark-mode-text-white { | ||
color: #ffffff !important | ||
} | ||
} | ||
</style> | ||
<link rel="preconnect" href="https://fonts.googleapis.com"> | ||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> | ||
<link href="https://fonts.googleapis.com/css2?family=Fira+Sans:wght@100;200;300;400;500;600;700;800;900&family=Inter:wght@100;200;300;400;500;600;700;800;900&family=Merriweather:wght@300;400;500;700;900&display=fallback" rel="stylesheet"> | ||
</head> | ||
<body class="dark-mode-bg-_333" style="margin: 0; width: 100%; background-color: #ffffff; padding: 0; -webkit-font-smoothing: antialiased; word-break: break-word"> | ||
<div style="display: none"> | ||
Please click the button below and follow the instructions. We'll have you up and running with a new password in no time. | ||
 ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏ | ||
</div> | ||
<div role="article" aria-roledescription="email" aria-label="Reset password instructions" lang="en"> | ||
<div class="sm-px-4 dark-mode-text-white" style="font-family: Fira Sans, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif; font-size: 18px; color: #414860"> | ||
<table align="center" cellpadding="0" cellspacing="0" role="none"> | ||
<tr> | ||
<td style="width: 552px; max-width: 100%"> | ||
<table width="100%" style="font-family: Inter, Fira Sans, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif" cellpadding="0" cellspacing="0" role="none"> | ||
<tr> | ||
<td style="height: 24px; background-color: #E98E07"></td> | ||
</tr> | ||
<tr> | ||
<td class="xs-px-6 xs-py-3" style="background-color: #F4BE53; padding: 24px 48px"> | ||
<table cellpadding="0" cellspacing="0" role="none"> | ||
<tr> | ||
<td style="background-color: #CA3F94; padding: 4px 16px"> | ||
<h1 class="xs-text-2xl" style="margin: 0; font-size: 36px; font-weight: 800; color: #ffffff">Planning Alerts</h1> | ||
</td> | ||
</tr> | ||
</table> | ||
<table cellpadding="0" cellspacing="0" role="none"> | ||
<tr> | ||
<td class="xs-text-8px" style="background-color: #826D9C; padding: 8px 16px; font-size: 12px; font-weight: 600; color: #ffffff">Email alerts of planning applications near you</td> | ||
</tr> | ||
</table> | ||
</td> | ||
</tr> | ||
</table> | ||
<div role="separator" style="line-height: 72px">‍</div> | ||
<p>Hello,</p> | ||
<p>Please click the button below and follow the instructions. | ||
We'll have you up and running with a new password in no time. | ||
</p> | ||
<p>Thanks,<br>Planning Alerts team</p> | ||
<div role="separator" style="line-height: 48px">‍</div> | ||
<div> | ||
<a href="<%= edit_password_url(resource, reset_password_token: token) %>" style="display: inline-block; background-color: #03827A; padding: 16px 32px; font-size: 18px; font-weight: 600; line-height: 1; color: #ffffff; text-decoration: none"> | ||
<!--[if mso]> | ||
<i style="mso-font-width: -100%; letter-spacing: 32px; mso-text-raise: 30px" hidden> </i> | ||
<![endif]--> | ||
<span style="mso-text-raise: 16px"> | ||
Reset password | ||
</span> | ||
<!--[if mso]> | ||
<i style="mso-font-width: -100%; letter-spacing: 32px;" hidden> </i> | ||
<![endif]--> | ||
</a> | ||
</div> | ||
<div role="separator" style="line-height: 48px">‍</div> | ||
<table style="width: 100%;" cellpadding="0" cellspacing="0" role="none"> | ||
<tr> | ||
<td align="right"> | ||
<img src="<%= image_path "tailwind/reset-password-illustration.png" %>" alt="Illustration of a woman with glasses using her laptop" style="max-width: 100%; vertical-align: middle; line-height: 1; border: 0"> | ||
</td> | ||
</tr> | ||
</table> | ||
<div role="separator" style="line-height: 72px">‍</div> | ||
<p>Didn't request this email? Then you can safely ignore it.</p> | ||
<div role="separator" style="background-color: #e2e8f0; height: 1px; line-height: 1px; margin: 32px 0">‍</div> | ||
<p> | ||
<a href="https://www.planningalerts.org.au" class="dark-mode-text-white hover-underline" style="color: #414860; text-decoration-line: none"><strong>Planning Alerts</strong></a> | ||
is a free service where anyone can find out what is being built and knocked down in their area. | ||
</p> | ||
<p> | ||
The service | ||
is run by the independent charity | ||
<a href="https://www.oaf.org.au/" class="dark-mode-text-white hover-underline" style="color: #414860; text-decoration-line: none">OpenAustralia Foundation</a>. | ||
</p> | ||
<p> | ||
<a href="https://www.planningalerts.org.au/help/contact" style="color: #D37708">Contact us</a> | ||
</p> | ||
</td> | ||
</tr> | ||
</table> | ||
</div> | ||
</div> | ||
</body> | ||
</html> |
24 changes: 5 additions & 19 deletions
24
app/views/devise/mailer/reset_password_instructions.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,5 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html charset=UTF-8"> | ||
</head> | ||
<body> | ||
<% if @resource.name.present? %> | ||
<p>Hello <%= @resource.name %>!</p> | ||
<% else %> | ||
<p>Hello!</p> | ||
<% end %> | ||
|
||
<p>Please click the link below and follow the instructions. We'll have you up and running with a new password in no time.</p> | ||
|
||
<p><%= link_to "Reset password", edit_password_url(@resource, reset_password_token: @token) %></p> | ||
|
||
<p>Didn't request this email? Then you can safely ignore it.</p> | ||
</body> | ||
</html> | ||
<% if @resource.tailwind_theme %> | ||
<%= render "reset_password_instructions_new_theme", resource: @resource, token: @token %> | ||
<% else %> | ||
<%= render "reset_password_instructions_current_theme", resource: @resource, token: @token %> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters