Update routes/emails.py
Browse files- routes/emails.py +263 -7
routes/emails.py
CHANGED
@@ -38,13 +38,269 @@ def generate_email_html(email_type: str, to: str) -> str:
|
|
38 |
# Defina aqui os templates HTML para cada tipo de email
|
39 |
if email_type == "welcome":
|
40 |
return f"""
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
"""
|
49 |
elif email_type == "goodbye":
|
50 |
return f"""
|
|
|
38 |
# Defina aqui os templates HTML para cada tipo de email
|
39 |
if email_type == "welcome":
|
40 |
return f"""
|
41 |
+
<!DOCTYPE html>
|
42 |
+
<html lang="en">
|
43 |
+
<head>
|
44 |
+
<meta charset="UTF-8">
|
45 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
46 |
+
<title>Welcome to ClosetCoach</title>
|
47 |
+
<style>
|
48 |
+
* {
|
49 |
+
margin: 0;
|
50 |
+
padding: 0;
|
51 |
+
box-sizing: border-box;
|
52 |
+
}
|
53 |
+
body {
|
54 |
+
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
55 |
+
background-color: #fafafa;
|
56 |
+
color: #1a1a1a;
|
57 |
+
line-height: 1.5;
|
58 |
+
}
|
59 |
+
.container {
|
60 |
+
max-width: 500px;
|
61 |
+
margin: 40px auto;
|
62 |
+
background: white;
|
63 |
+
border-radius: 16px;
|
64 |
+
overflow: hidden;
|
65 |
+
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
|
66 |
+
}
|
67 |
+
.header {
|
68 |
+
background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%);
|
69 |
+
padding: 60px 40px;
|
70 |
+
text-align: center;
|
71 |
+
}
|
72 |
+
.logo {
|
73 |
+
font-size: 28px;
|
74 |
+
font-weight: 700;
|
75 |
+
color: white;
|
76 |
+
letter-spacing: -0.5px;
|
77 |
+
margin-bottom: 8px;
|
78 |
+
}
|
79 |
+
.tagline {
|
80 |
+
color: rgba(255, 255, 255, 0.85);
|
81 |
+
font-size: 15px;
|
82 |
+
font-weight: 400;
|
83 |
+
}
|
84 |
+
.content {
|
85 |
+
padding: 48px 40px;
|
86 |
+
}
|
87 |
+
.welcome-title {
|
88 |
+
font-size: 24px;
|
89 |
+
font-weight: 600;
|
90 |
+
color: #1a1a1a;
|
91 |
+
margin-bottom: 16px;
|
92 |
+
letter-spacing: -0.3px;
|
93 |
+
}
|
94 |
+
.welcome-text {
|
95 |
+
font-size: 16px;
|
96 |
+
color: #6b7280;
|
97 |
+
margin-bottom: 40px;
|
98 |
+
line-height: 1.6;
|
99 |
+
}
|
100 |
+
.features {
|
101 |
+
margin: 40px 0;
|
102 |
+
}
|
103 |
+
.feature {
|
104 |
+
display: flex;
|
105 |
+
align-items: flex-start;
|
106 |
+
margin-bottom: 24px;
|
107 |
+
padding: 16px 0;
|
108 |
+
}
|
109 |
+
.feature:last-child {
|
110 |
+
margin-bottom: 0;
|
111 |
+
}
|
112 |
+
.feature-icon {
|
113 |
+
width: 40px;
|
114 |
+
height: 40px;
|
115 |
+
background: #f3f4f6;
|
116 |
+
border-radius: 10px;
|
117 |
+
display: flex;
|
118 |
+
align-items: center;
|
119 |
+
justify-content: center;
|
120 |
+
margin-right: 16px;
|
121 |
+
font-size: 16px;
|
122 |
+
flex-shrink: 0;
|
123 |
+
}
|
124 |
+
.feature-content h3 {
|
125 |
+
font-size: 16px;
|
126 |
+
font-weight: 600;
|
127 |
+
color: #1a1a1a;
|
128 |
+
margin-bottom: 4px;
|
129 |
+
}
|
130 |
+
.feature-content p {
|
131 |
+
font-size: 14px;
|
132 |
+
color: #6b7280;
|
133 |
+
line-height: 1.5;
|
134 |
+
}
|
135 |
+
.cta-section {
|
136 |
+
background: #fafafa;
|
137 |
+
padding: 32px;
|
138 |
+
border-radius: 12px;
|
139 |
+
text-align: center;
|
140 |
+
margin: 40px 0;
|
141 |
+
}
|
142 |
+
.cta-title {
|
143 |
+
font-size: 18px;
|
144 |
+
font-weight: 600;
|
145 |
+
color: #1a1a1a;
|
146 |
+
margin-bottom: 8px;
|
147 |
+
}
|
148 |
+
.cta-text {
|
149 |
+
font-size: 14px;
|
150 |
+
color: #6b7280;
|
151 |
+
margin-bottom: 24px;
|
152 |
+
}
|
153 |
+
.cta-button {
|
154 |
+
display: inline-block;
|
155 |
+
background: #8b5cf6;
|
156 |
+
color: white;
|
157 |
+
padding: 12px 32px;
|
158 |
+
text-decoration: none;
|
159 |
+
border-radius: 8px;
|
160 |
+
font-weight: 500;
|
161 |
+
font-size: 15px;
|
162 |
+
transition: all 0.2s ease;
|
163 |
+
}
|
164 |
+
.cta-button:hover {
|
165 |
+
background: #7c3aed;
|
166 |
+
transform: translateY(-1px);
|
167 |
+
}
|
168 |
+
.next-steps {
|
169 |
+
margin-top: 40px;
|
170 |
+
padding: 24px;
|
171 |
+
background: #f8fafc;
|
172 |
+
border-radius: 8px;
|
173 |
+
border-left: 3px solid #8b5cf6;
|
174 |
+
}
|
175 |
+
.next-steps h4 {
|
176 |
+
font-size: 14px;
|
177 |
+
font-weight: 600;
|
178 |
+
color: #1a1a1a;
|
179 |
+
margin-bottom: 12px;
|
180 |
+
text-transform: uppercase;
|
181 |
+
letter-spacing: 0.5px;
|
182 |
+
}
|
183 |
+
.next-steps ul {
|
184 |
+
list-style: none;
|
185 |
+
font-size: 14px;
|
186 |
+
color: #6b7280;
|
187 |
+
}
|
188 |
+
.next-steps li {
|
189 |
+
margin-bottom: 6px;
|
190 |
+
padding-left: 16px;
|
191 |
+
position: relative;
|
192 |
+
}
|
193 |
+
.next-steps li:before {
|
194 |
+
content: "→";
|
195 |
+
position: absolute;
|
196 |
+
left: 0;
|
197 |
+
color: #8b5cf6;
|
198 |
+
font-weight: 500;
|
199 |
+
}
|
200 |
+
.footer {
|
201 |
+
background: #1a1a1a;
|
202 |
+
color: #9ca3af;
|
203 |
+
padding: 32px 40px;
|
204 |
+
text-align: center;
|
205 |
+
font-size: 13px;
|
206 |
+
}
|
207 |
+
.footer-brand {
|
208 |
+
color: white;
|
209 |
+
font-weight: 600;
|
210 |
+
margin-bottom: 8px;
|
211 |
+
}
|
212 |
+
.footer-links {
|
213 |
+
margin-top: 16px;
|
214 |
+
}
|
215 |
+
.footer-links a {
|
216 |
+
color: #9ca3af;
|
217 |
+
text-decoration: none;
|
218 |
+
margin: 0 12px;
|
219 |
+
transition: color 0.2s ease;
|
220 |
+
}
|
221 |
+
.footer-links a:hover {
|
222 |
+
color: #8b5cf6;
|
223 |
+
}
|
224 |
+
@media (max-width: 600px) {
|
225 |
+
.container {
|
226 |
+
margin: 20px;
|
227 |
+
max-width: none;
|
228 |
+
}
|
229 |
+
.header, .content, .footer {
|
230 |
+
padding: 32px 24px;
|
231 |
+
}
|
232 |
+
.cta-section {
|
233 |
+
padding: 24px;
|
234 |
+
}
|
235 |
+
}
|
236 |
+
</style>
|
237 |
+
</head>
|
238 |
+
<body>
|
239 |
+
<div class="container">
|
240 |
+
<div class="header">
|
241 |
+
<div class="logo">ClosetCoach</div>
|
242 |
+
<p class="tagline">Your personal style companion</p>
|
243 |
+
</div>
|
244 |
+
|
245 |
+
<div class="content">
|
246 |
+
<h1 class="welcome-title">Welcome aboard</h1>
|
247 |
+
<p class="welcome-text">
|
248 |
+
We're excited to have you join ClosetCoach. Connect with professional stylists across the US and discover your unique style with personalized guidance that fits your lifestyle.
|
249 |
+
</p>
|
250 |
+
|
251 |
+
<div class="features">
|
252 |
+
<div class="feature">
|
253 |
+
<div class="feature-icon">✨</div>
|
254 |
+
<div class="feature-content">
|
255 |
+
<h3>Expert Stylists</h3>
|
256 |
+
<p>Connect with certified professionals who understand your vision and budget</p>
|
257 |
+
</div>
|
258 |
+
</div>
|
259 |
+
<div class="feature">
|
260 |
+
<div class="feature-icon">🎯</div>
|
261 |
+
<div class="feature-content">
|
262 |
+
<h3>Personalized Approach</h3>
|
263 |
+
<p>Get tailored recommendations that match your lifestyle and preferences</p>
|
264 |
+
</div>
|
265 |
+
</div>
|
266 |
+
<div class="feature">
|
267 |
+
<div class="feature-icon">📅</div>
|
268 |
+
<div class="feature-content">
|
269 |
+
<h3>Flexible Scheduling</h3>
|
270 |
+
<p>Book consultations that work with your busy schedule</p>
|
271 |
+
</div>
|
272 |
+
</div>
|
273 |
+
</div>
|
274 |
+
|
275 |
+
<div class="cta-section">
|
276 |
+
<h3 class="cta-title">Ready to get started?</h3>
|
277 |
+
<p class="cta-text">Browse our curated selection of stylists and find your perfect match</p>
|
278 |
+
<a href="#" class="cta-button">Find Your Stylist</a>
|
279 |
+
</div>
|
280 |
+
|
281 |
+
<div class="next-steps">
|
282 |
+
<h4>What's Next</h4>
|
283 |
+
<ul>
|
284 |
+
<li>Complete your style profile</li>
|
285 |
+
<li>Browse featured stylists</li>
|
286 |
+
<li>Book your first consultation</li>
|
287 |
+
<li>Start your style transformation</li>
|
288 |
+
</ul>
|
289 |
+
</div>
|
290 |
+
</div>
|
291 |
+
|
292 |
+
<div class="footer">
|
293 |
+
<div class="footer-brand">ClosetCoach</div>
|
294 |
+
<p>Connecting style with confidence across the USA</p>
|
295 |
+
<div class="footer-links">
|
296 |
+
<a href="#">Help Center</a>
|
297 |
+
<a href="#">Privacy</a>
|
298 |
+
<a href="#">Unsubscribe</a>
|
299 |
+
</div>
|
300 |
+
</div>
|
301 |
+
</div>
|
302 |
+
</body>
|
303 |
+
</html>
|
304 |
"""
|
305 |
elif email_type == "goodbye":
|
306 |
return f"""
|