-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HTML template added for the recovery email #25
Closed
Closed
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
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
184 changes: 184 additions & 0 deletions
184
password_reset/templates/password_reset/base_email.html
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,184 @@ | ||
{% load i18n %} | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | ||
<html xmlns="http://www.w3.org/1999/xhtml"> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/> | ||
<title>{% block title %}{% endblock title %}</title> | ||
<style type="text/css"> | ||
/* Based on The MailChimp Reset INLINE: Yes. */ | ||
/* Client-specific Styles */ | ||
#outlook a {padding:0;} /* Force Outlook to provide a "view in browser" menu link. */ | ||
body{width:100% !important; -webkit-text-size-adjust:100%; -ms-text-size-adjust:100%; margin:0; padding:0;} | ||
/* Prevent Webkit and Windows Mobile platforms from changing default font sizes.*/ | ||
.ExternalClass {width:100%;} /* Force Hotmail to display emails at full width */ | ||
.ExternalClass, .ExternalClass p, .ExternalClass span, .ExternalClass font, .ExternalClass td, .ExternalClass div {line-height: 100%;} | ||
/* Forces Hotmail to display normal line spacing. More on that: http://www.emailonacid.com/forum/viewthread/43/ */ | ||
#idbackground_table {margin:0; padding:0; width:100% !important; line-height: 100% !important; background-color: #CECECE;} | ||
/* End reset */ | ||
|
||
/* Some sensible defaults for images | ||
Bring inline: Yes. */ | ||
img {outline:none; text-decoration:none; -ms-interpolation-mode: bicubic;} | ||
a img {border:none;} | ||
.image_fix {display:block;} | ||
|
||
/* Yahoo paragraph fix | ||
Bring inline: Yes. */ | ||
p {margin: 1em 0;} | ||
|
||
/* Hotmail header color reset | ||
Bring inline: Yes. */ | ||
h1, h2, h3, h4, h5, h6 {color: black !important;} | ||
|
||
h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {color: blue !important;} | ||
|
||
h1 a:active, h2 a:active, h3 a:active, h4 a:active, h5 a:active, h6 a:active { | ||
color: red !important; /* Preferably not the same color as the normal header link color. There is limited support for psuedo classes in email clients, this was added just for good measure. */ | ||
} | ||
|
||
h1 a:visited, h2 a:visited, h3 a:visited, h4 a:visited, h5 a:visited, h6 a:visited { | ||
color: purple !important; /* Preferably not the same color as the normal header link color. There is limited support for psuedo classes in email clients, this was added just for good measure. */ | ||
} | ||
|
||
/* Outlook 07, 10 Padding issue fix | ||
Bring inline: No.*/ | ||
table td {border-collapse: collapse;} | ||
|
||
/* Remove spacing around Outlook 07, 10 tables | ||
Bring inline: Yes */ | ||
table { border-collapse:collapse; mso-table-lspace:0pt; mso-table-rspace:0pt; } | ||
|
||
/* Styling your links has become much simpler with the new Yahoo. In fact, it falls in line with the main credo of styling in email and make sure to bring your styles inline. Your link colors will be uniform across clients when brought inline. | ||
Bring inline: Yes. */ | ||
a {color: orange;} | ||
|
||
|
||
/*************************************************** | ||
**************************************************** | ||
MOBILE TARGETING | ||
**************************************************** | ||
***************************************************/ | ||
#id_page { | ||
margin: 20px auto; | ||
background-color: #ffffff; | ||
font-family: Lucida, Helvetica, Arial, sans-serif; | ||
font-size: 12px; | ||
} | ||
|
||
#id_logo { | ||
display: block; | ||
margin: 0px auto; | ||
} | ||
|
||
#id_footer { | ||
background-color: #77B5FE; | ||
} | ||
|
||
#id_footer a { | ||
text-decoration: none; | ||
color: #ffffff; | ||
margin-right: 20px; | ||
} | ||
|
||
@media only screen and (max-device-width: 480px) { | ||
/* Part one of controlling phone number linking for mobile. */ | ||
a[href^="tel"], a[href^="sms"] { | ||
text-decoration: none; | ||
color: blue; /* or whatever your want */ | ||
pointer-events: none; | ||
cursor: default; | ||
} | ||
|
||
.mobile_link a[href^="tel"], .mobile_link a[href^="sms"] { | ||
text-decoration: default; | ||
color: orange !important; | ||
pointer-events: auto; | ||
cursor: default; | ||
} | ||
} | ||
|
||
{% comment %} | ||
/* More Specific Targeting */ | ||
@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) { | ||
/* You guessed it, ipad (tablets, smaller screens, etc) */ | ||
/* repeating for the ipad */ | ||
a[href^="tel"], a[href^="sms"] { | ||
text-decoration: none; | ||
color: blue; /* or whatever your want */ | ||
pointer-events: none; | ||
cursor: default; | ||
} | ||
|
||
.mobile_link a[href^="tel"], .mobile_link a[href^="sms"] { | ||
text-decoration: default; | ||
color: orange !important; | ||
pointer-events: auto; | ||
cursor: default; | ||
} | ||
} | ||
|
||
@media only screen and (-webkit-min-device-pixel-ratio: 2) { | ||
/* Put your iPhone 4g styles in here */ | ||
} | ||
|
||
/* Android targeting */ | ||
@media only screen and (-webkit-device-pixel-ratio:.75){ | ||
/* Put CSS for low density (ldpi) Android layouts in here */ | ||
} | ||
@media only screen and (-webkit-device-pixel-ratio:1){ | ||
/* Put CSS for medium density (mdpi) Android layouts in here */ | ||
} | ||
@media only screen and (-webkit-device-pixel-ratio:1.5){ | ||
/* Put CSS for high density (hdpi) Android layouts in here */ | ||
} | ||
/* end Android targeting */ | ||
{% endcomment %} | ||
</style> | ||
|
||
<!-- Targeting Windows Mobile --> | ||
<!--[if IEMobile 7]> | ||
<style type="text/css"> | ||
|
||
</style> | ||
<![endif]--> | ||
|
||
<!-- *********************************************** | ||
**************************************************** | ||
END MOBILE TARGETING | ||
**************************************************** | ||
************************************************ --> | ||
|
||
<!--[if gte mso 9]> | ||
<style> | ||
/* Target Outlook 2007 and 2010 */ | ||
</style> | ||
<![endif]--> | ||
</head> | ||
<body bgcolor="#CECECE"> | ||
<!-- Wrapper/Container Table: Use a wrapper table to control the width and the background color consistently of your email. Use this approach instead of setting attributes on the body tag. --> | ||
<table cellpadding="0" cellspacing="0" border="0" id="id_background_table" width="100%"> | ||
<tr> | ||
<td valign="top"> | ||
<table id="id_page" border="0" cellspacing="5" cellpadding="10" width="640"> | ||
<tr> | ||
<td></td> | ||
</tr> | ||
<tr> | ||
<td style="padding: 0 30px"> | ||
{% block content %} | ||
{% endblock content %} | ||
</td> | ||
</tr> | ||
<tr id="id_footer"> | ||
<td> | ||
<a href="http://{{ site.domain }}">{% blocktrans with site_name=site.name %}Go to {{ site_name }}{% endblocktrans %}</a> | ||
</td> | ||
</tr> | ||
</table> | ||
</td> | ||
</tr> | ||
</table> | ||
<!-- End of wrapper table --> | ||
</body> | ||
</html> |
10 changes: 10 additions & 0 deletions
10
password_reset/templates/password_reset/recovery_email.html
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,10 @@ | ||
{% extends "password_reset/base_email.html" %} | ||
{% load i18n %} | ||
{% load url from future %} | ||
|
||
{% block content %} | ||
<p>{% blocktrans %}Dear {{ username }},{% endblocktrans %}</p> | ||
<p>{% blocktrans with domain=site.domain %}You -- or someone pretending to be you -- has requested a password reset on {{ domain }}.{% endblocktrans %}</p> | ||
<p>{% trans "You can set your new password by following this link:" %} <a href="http{% if secure %}s{% endif %}://{{ site.domain }}{% url "password_reset_reset" token %}">http{% if secure %}s{% endif %}://{{ site.domain }}{% url "password_reset_reset" token %}</a></p> | ||
<p>{% trans "If you don't want to reset your password, simply ignore this email and it will stay unchanged." %}</p> | ||
{% endblock content %} |
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
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could add
http{% if secure %}s{% endif %}
to the protocol.