mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-23 16:51:14 -05:00
Add email templates for user notifications and account management
- Created a base email template (base.html) for consistent styling across all emails. - Added moderation approval email template (moderation_approved.html) to notify users of approved submissions. - Added moderation rejection email template (moderation_rejected.html) to inform users of required changes for their submissions. - Created password reset email template (password_reset.html) for users requesting to reset their passwords. - Developed a welcome email template (welcome.html) to greet new users and provide account details and tips for using ThrillWiki.
This commit is contained in:
102
django/templates/emails/base.html
Normal file
102
django/templates/emails/base.html
Normal file
@@ -0,0 +1,102 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{% block title %}ThrillWiki{% endblock %}</title>
|
||||
<style>
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
||||
line-height: 1.6;
|
||||
color: #333;
|
||||
max-width: 600px;
|
||||
margin: 0 auto;
|
||||
padding: 20px;
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
.email-container {
|
||||
background-color: #ffffff;
|
||||
border-radius: 8px;
|
||||
padding: 30px;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
.header {
|
||||
text-align: center;
|
||||
padding-bottom: 20px;
|
||||
border-bottom: 2px solid #22c55e;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
.logo {
|
||||
font-size: 32px;
|
||||
font-weight: bold;
|
||||
color: #22c55e;
|
||||
margin: 0;
|
||||
}
|
||||
.tagline {
|
||||
color: #666;
|
||||
font-size: 14px;
|
||||
margin: 5px 0 0 0;
|
||||
}
|
||||
.content {
|
||||
color: #333;
|
||||
font-size: 16px;
|
||||
}
|
||||
.button {
|
||||
display: inline-block;
|
||||
padding: 12px 24px;
|
||||
background-color: #22c55e;
|
||||
color: #ffffff !important;
|
||||
text-decoration: none;
|
||||
border-radius: 6px;
|
||||
margin: 20px 0;
|
||||
font-weight: 600;
|
||||
}
|
||||
.button:hover {
|
||||
background-color: #16a34a;
|
||||
}
|
||||
.footer {
|
||||
margin-top: 40px;
|
||||
padding-top: 20px;
|
||||
border-top: 1px solid #e5e5e5;
|
||||
font-size: 12px;
|
||||
color: #666;
|
||||
text-align: center;
|
||||
}
|
||||
.info-box {
|
||||
background-color: #f0fdf4;
|
||||
border-left: 4px solid #22c55e;
|
||||
padding: 15px;
|
||||
margin: 20px 0;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.warning-box {
|
||||
background-color: #fef3c7;
|
||||
border-left: 4px solid #f59e0b;
|
||||
padding: 15px;
|
||||
margin: 20px 0;
|
||||
border-radius: 4px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="email-container">
|
||||
<div class="header">
|
||||
<h1 class="logo">🎢 ThrillWiki</h1>
|
||||
<p class="tagline">The Ultimate Roller Coaster Database</p>
|
||||
</div>
|
||||
|
||||
<div class="content">
|
||||
{% block content %}{% endblock %}
|
||||
</div>
|
||||
|
||||
<div class="footer">
|
||||
<p>This email was sent by ThrillWiki.</p>
|
||||
<p>
|
||||
If you have any questions, please contact us at
|
||||
<a href="mailto:support@thrillwiki.com">support@thrillwiki.com</a>
|
||||
</p>
|
||||
<p>© {% now "Y" %} ThrillWiki. All rights reserved.</p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
50
django/templates/emails/moderation_approved.html
Normal file
50
django/templates/emails/moderation_approved.html
Normal file
@@ -0,0 +1,50 @@
|
||||
{% extends "emails/base.html" %}
|
||||
|
||||
{% block title %}Submission Approved - ThrillWiki{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h2>Great News! Your Submission Was Approved ✅</h2>
|
||||
|
||||
<p>Hello {{ submission.user.first_name|default:submission.user.email }},</p>
|
||||
|
||||
<p>Your submission has been reviewed and approved by our moderation team. Your contributions help make ThrillWiki more accurate and comprehensive!</p>
|
||||
|
||||
<div class="info-box">
|
||||
<p><strong>Submission Details:</strong></p>
|
||||
<ul style="margin: 10px 0; padding-left: 20px;">
|
||||
<li><strong>Title:</strong> {{ submission.title }}</li>
|
||||
<li><strong>Type:</strong> {{ submission.get_submission_type_display }}</li>
|
||||
<li><strong>Entity:</strong> {{ submission.entity }}</li>
|
||||
<li><strong>Submitted:</strong> {{ submission.submitted_at|date:"F d, Y g:i A" }}</li>
|
||||
<li><strong>Reviewed by:</strong> {{ submission.reviewed_by.email }}</li>
|
||||
<li><strong>Items approved:</strong> {{ submission.items.approved.count }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
{% if submission.description %}
|
||||
<h3>Your Description:</h3>
|
||||
<p style="background: #f5f5f5; padding: 15px; border-radius: 4px; font-style: italic;">
|
||||
"{{ submission.description }}"
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
<div style="text-align: center; margin: 30px 0;">
|
||||
<a href="{{ submission_url }}" class="button">View Submission</a>
|
||||
</div>
|
||||
|
||||
<h3>What happens next?</h3>
|
||||
<p>Your changes are now live on ThrillWiki and visible to all users. Here's what you can do:</p>
|
||||
<ul style="margin: 10px 0; padding-left: 20px;">
|
||||
<li>View the updated entity page to see your changes</li>
|
||||
<li>Submit more updates to other entities</li>
|
||||
<li>Share your contributions with the community</li>
|
||||
</ul>
|
||||
|
||||
<div class="info-box">
|
||||
<p><strong>📊 Contribution Stats:</strong></p>
|
||||
<p>You've made <strong>{{ user_submission_count }}</strong> submission(s) to ThrillWiki. Thank you for helping us maintain the most accurate roller coaster database!</p>
|
||||
</div>
|
||||
|
||||
<p style="margin-top: 30px;">Keep up the great work!</p>
|
||||
<p><strong>The ThrillWiki Moderation Team</strong></p>
|
||||
{% endblock %}
|
||||
67
django/templates/emails/moderation_rejected.html
Normal file
67
django/templates/emails/moderation_rejected.html
Normal file
@@ -0,0 +1,67 @@
|
||||
{% extends "emails/base.html" %}
|
||||
|
||||
{% block title %}Submission Requires Changes - ThrillWiki{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h2>Your Submission Needs Revision ⚠️</h2>
|
||||
|
||||
<p>Hello {{ submission.user.first_name|default:submission.user.email }},</p>
|
||||
|
||||
<p>Thank you for your contribution to ThrillWiki. After careful review, our moderation team has determined that your submission requires some changes before it can be approved.</p>
|
||||
|
||||
<div class="warning-box">
|
||||
<p><strong>Submission Details:</strong></p>
|
||||
<ul style="margin: 10px 0; padding-left: 20px;">
|
||||
<li><strong>Title:</strong> {{ submission.title }}</li>
|
||||
<li><strong>Type:</strong> {{ submission.get_submission_type_display }}</li>
|
||||
<li><strong>Entity:</strong> {{ submission.entity }}</li>
|
||||
<li><strong>Submitted:</strong> {{ submission.submitted_at|date:"F d, Y g:i A" }}</li>
|
||||
<li><strong>Reviewed by:</strong> {{ submission.reviewed_by.email }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
{% if submission.rejection_reason %}
|
||||
<h3>Reason for Rejection:</h3>
|
||||
<p style="background: #fef3c7; padding: 15px; border-radius: 4px; border-left: 4px solid #f59e0b;">
|
||||
{{ submission.rejection_reason }}
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
<h3>Common Reasons for Rejection:</h3>
|
||||
<ul style="margin: 10px 0; padding-left: 20px;">
|
||||
<li>Insufficient or inaccurate information</li>
|
||||
<li>Missing required sources or citations</li>
|
||||
<li>Duplicate submission</li>
|
||||
<li>Information doesn't match our verification standards</li>
|
||||
<li>Photos don't meet quality guidelines</li>
|
||||
</ul>
|
||||
|
||||
<div style="text-align: center; margin: 30px 0;">
|
||||
<a href="{{ submission_url }}" class="button">Review Your Submission</a>
|
||||
</div>
|
||||
|
||||
<h3>What you can do:</h3>
|
||||
<ol style="margin: 10px 0; padding-left: 20px;">
|
||||
<li>Review the moderator's feedback carefully</li>
|
||||
<li>Gather additional information or sources if needed</li>
|
||||
<li>Submit a new, corrected version</li>
|
||||
<li>Contact the moderation team if you have questions</li>
|
||||
</ol>
|
||||
|
||||
<div class="info-box">
|
||||
<p><strong>💡 Tips for Successful Submissions:</strong></p>
|
||||
<ul style="margin: 10px 0; padding-left: 20px;">
|
||||
<li>Double-check all information before submitting</li>
|
||||
<li>Include sources when possible</li>
|
||||
<li>Provide clear descriptions of your changes</li>
|
||||
<li>Follow our submission guidelines</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<p style="margin-top: 30px;">We appreciate your contributions and look forward to your revised submission!</p>
|
||||
<p><strong>The ThrillWiki Moderation Team</strong></p>
|
||||
|
||||
<p style="font-size: 12px; color: #666; margin-top: 20px;">
|
||||
<em>Questions about this decision? Reply to this email or contact us at support@thrillwiki.com</em>
|
||||
</p>
|
||||
{% endblock %}
|
||||
47
django/templates/emails/password_reset.html
Normal file
47
django/templates/emails/password_reset.html
Normal file
@@ -0,0 +1,47 @@
|
||||
{% extends "emails/base.html" %}
|
||||
|
||||
{% block title %}Reset Your Password - ThrillWiki{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h2>Password Reset Request</h2>
|
||||
|
||||
<p>Hello {{ user.first_name|default:user.email }},</p>
|
||||
|
||||
<p>We received a request to reset the password for your ThrillWiki account.</p>
|
||||
|
||||
<div class="info-box">
|
||||
<p><strong>Account:</strong> {{ user.email }}</p>
|
||||
<p><strong>Request time:</strong> {{ request_time|date:"F d, Y g:i A" }}</p>
|
||||
</div>
|
||||
|
||||
<p>Click the button below to reset your password:</p>
|
||||
|
||||
<div style="text-align: center; margin: 30px 0;">
|
||||
<a href="{{ reset_url }}" class="button">Reset Password</a>
|
||||
</div>
|
||||
|
||||
<p style="font-size: 14px; color: #666;">
|
||||
Or copy and paste this link into your browser:<br>
|
||||
<code style="background: #f5f5f5; padding: 5px 10px; display: inline-block; margin-top: 5px; border-radius: 4px; word-break: break-all;">{{ reset_url }}</code>
|
||||
</p>
|
||||
|
||||
<div class="warning-box">
|
||||
<p><strong>⚠️ Security Notice:</strong></p>
|
||||
<ul style="margin: 10px 0; padding-left: 20px;">
|
||||
<li>This link will expire in <strong>{{ expiry_hours }} hours</strong></li>
|
||||
<li>This link can only be used once</li>
|
||||
<li>If you didn't request this reset, you can safely ignore this email</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<h3>Didn't request this?</h3>
|
||||
<p>If you didn't request a password reset, your account may be at risk. Please:</p>
|
||||
<ol style="margin: 10px 0; padding-left: 20px;">
|
||||
<li>Log in to your account immediately</li>
|
||||
<li>Change your password as a precaution</li>
|
||||
<li>Contact our support team if you notice any suspicious activity</li>
|
||||
</ol>
|
||||
|
||||
<p style="margin-top: 30px;">Stay safe!</p>
|
||||
<p><strong>The ThrillWiki Team</strong></p>
|
||||
{% endblock %}
|
||||
45
django/templates/emails/welcome.html
Normal file
45
django/templates/emails/welcome.html
Normal file
@@ -0,0 +1,45 @@
|
||||
{% extends "emails/base.html" %}
|
||||
|
||||
{% block title %}Welcome to ThrillWiki{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h2>Welcome to ThrillWiki, {{ user.first_name|default:user.email }}! 🎢</h2>
|
||||
|
||||
<p>Thank you for joining the world's most comprehensive roller coaster database. We're excited to have you as part of our community!</p>
|
||||
|
||||
<div class="info-box">
|
||||
<p><strong>Your account details:</strong></p>
|
||||
<ul style="margin: 10px 0; padding-left: 20px;">
|
||||
<li>Email: {{ user.email }}</li>
|
||||
<li>Account created: {{ user.date_joined|date:"F d, Y" }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<h3>What you can do on ThrillWiki:</h3>
|
||||
<ul style="margin: 20px 0; padding-left: 20px;">
|
||||
<li>📊 Browse detailed information about theme parks worldwide</li>
|
||||
<li>🎢 Explore roller coasters and their specifications</li>
|
||||
<li>🏢 Discover ride manufacturers and their creations</li>
|
||||
<li>📸 Upload photos of your park visits</li>
|
||||
<li>✏️ Submit updates and corrections to improve our database</li>
|
||||
<li>⭐ Track your favorite parks and rides</li>
|
||||
</ul>
|
||||
|
||||
<div style="text-align: center; margin: 30px 0;">
|
||||
<a href="{{ site_url }}" class="button">Start Exploring</a>
|
||||
</div>
|
||||
|
||||
<h3>Get Started:</h3>
|
||||
<p>Here are some tips to make the most of your ThrillWiki experience:</p>
|
||||
<ol style="margin: 10px 0; padding-left: 20px;">
|
||||
<li>Complete your profile to personalize your experience</li>
|
||||
<li>Search for your favorite theme parks</li>
|
||||
<li>Contribute to the community by submitting corrections</li>
|
||||
<li>Share your park photos with other enthusiasts</li>
|
||||
</ol>
|
||||
|
||||
<p style="margin-top: 30px;">If you have any questions or need help getting started, don't hesitate to reach out to our support team.</p>
|
||||
|
||||
<p>Happy coaster hunting!</p>
|
||||
<p><strong>The ThrillWiki Team</strong></p>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user