Matt 7bdd462be9
Some checks failed
Build and Push Docker Images / docker (push) Has been cancelled
Implement comprehensive email templates with SMTP integration
- Add beautiful HTML email templates for receipts, admin notifications, and contact forms
- Implement SMTP email service with Nodemailer and Handlebars templating
- Add carbon equivalency calculations with EPA/DEFRA/IMO 2024 conversion factors
- Add portfolio color palette system for project visualization
- Integrate Wren API portfolio fetching in webhook handler
- Add light mode enforcement for email client compatibility
- Include Puffin logo from MinIO S3 in all templates
- Add test email endpoint for template validation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-31 20:09:31 +01:00

181 lines
5.0 KiB
Handlebars

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="color-scheme" content="light only">
<meta name="supported-color-schemes" content="light">
<title>Contact Form Submission - Puffin Offset</title>
<style>
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
line-height: 1.6;
color: #1e293b;
background-color: #f8fafc;
margin: 0;
padding: 0;
color-scheme: light only;
}
.container {
max-width: 600px;
margin: 0 auto;
background-color: #ffffff;
}
.header {
background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
padding: 30px 20px;
text-align: center;
color: #ffffff;
}
.logo {
width: 100px;
height: auto;
margin-bottom: 15px;
}
.header h1 {
margin: 0;
font-size: 24px;
font-weight: bold;
}
.content {
padding: 30px;
}
.info-box {
background-color: #f1f5f9;
border-radius: 8px;
padding: 20px;
margin: 20px 0;
}
.info-row {
display: flex;
padding: 10px 0;
border-bottom: 1px solid #e2e8f0;
}
.info-row:last-child {
border-bottom: none;
}
.info-label {
min-width: 100px;
color: #64748b;
font-weight: 600;
font-size: 13px;
}
.info-value {
color: #1e293b;
flex: 1;
}
.message-box {
background-color: #ffffff;
border: 2px solid #e2e8f0;
border-radius: 8px;
padding: 20px;
margin: 20px 0;
}
.message-label {
font-size: 12px;
text-transform: uppercase;
letter-spacing: 0.5px;
color: #64748b;
font-weight: 600;
margin-bottom: 10px;
}
.message-content {
color: #1e293b;
white-space: pre-wrap;
line-height: 1.6;
}
.footer {
background-color: #f8fafc;
padding: 20px;
text-align: center;
color: #94a3b8;
font-size: 12px;
}
.reply-button {
display: inline-block;
background-color: #3b82f6;
color: #ffffff;
padding: 12px 24px;
border-radius: 6px;
text-decoration: none;
font-weight: 600;
margin: 20px 0;
}
.timestamp {
color: #94a3b8;
font-size: 12px;
margin-top: 10px;
}
/* Force light mode for email clients */
@media (prefers-color-scheme: dark) {
body {
background-color: #f8fafc !important;
color: #1e293b !important;
}
.container {
background-color: #ffffff !important;
}
.info-box, .message-box {
background-color: #f1f5f9 !important;
}
.info-label, .info-value {
color: #0f172a !important;
}
}
</style>
</head>
<body>
<div class="container">
<div class="header">
<img src="https://s3.puffinoffset.com/public/puffinOffset.png" alt="Puffin Offset" class="logo">
<h1>📬 New Contact Form Submission</h1>
</div>
<div class="content">
<p style="color: #64748b; margin-bottom: 20px;">
You have received a new message from the Puffin Offset contact form.
</p>
<div class="info-box" style="background-color: #f1f5f9 !important;">
<div class="info-row">
<span class="info-label" style="color: #475569 !important;">Name:</span>
<span class="info-value" style="color: #0f172a !important;"><strong>{{name}}</strong></span>
</div>
<div class="info-row">
<span class="info-label" style="color: #475569 !important;">Email:</span>
<span class="info-value" style="color: #0f172a !important;"><a href="mailto:{{email}}" style="color: #3b82f6 !important; text-decoration: none;">{{email}}</a></span>
</div>
<div class="info-row">
<span class="info-label" style="color: #475569 !important;">Phone:</span>
<span class="info-value" style="color: #0f172a !important;">{{phone}}</span>
</div>
<div class="info-row">
<span class="info-label" style="color: #475569 !important;">Company:</span>
<span class="info-value" style="color: #0f172a !important;">{{company}}</span>
</div>
</div>
<div class="message-box" style="background-color: #ffffff !important; border: 2px solid #e2e8f0 !important;">
<div class="message-label" style="color: #475569 !important;">Message:</div>
<div class="message-content" style="color: #0f172a !important;">{{message}}</div>
</div>
<div style="text-align: center;">
<a href="mailto:{{email}}?subject=Re: Your inquiry to Puffin Offset" class="reply-button">
Reply to {{name}}
</a>
</div>
<div class="timestamp">
Received: {{timestamp}}
</div>
</div>
<div class="footer">
<p>This is an automated notification from the Puffin Offset contact form.</p>
<p>&copy; 2025 Puffin Offset</p>
</div>
</div>
</body>
</html>