Update routes/emails.py
Browse files- routes/emails.py +178 -220
routes/emails.py
CHANGED
@@ -39,314 +39,272 @@ def generate_email_html(email_type: str, to: str) -> str:
|
|
39 |
if email_type == "welcome":
|
40 |
return """
|
41 |
<!DOCTYPE html>
|
42 |
-
<html lang="
|
43 |
<head>
|
44 |
<meta charset="UTF-8">
|
45 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
46 |
-
<title>
|
47 |
<style>
|
48 |
* {
|
49 |
margin: 0;
|
50 |
padding: 0;
|
51 |
box-sizing: border-box;
|
52 |
}
|
53 |
-
|
54 |
body {
|
55 |
-
font-family: '
|
56 |
-
background:
|
57 |
-
|
58 |
-
|
59 |
}
|
60 |
-
|
61 |
.email-container {
|
62 |
max-width: 600px;
|
63 |
margin: 0 auto;
|
64 |
-
background:
|
65 |
-
border-radius: 20px;
|
66 |
-
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
|
67 |
-
overflow: hidden;
|
68 |
}
|
69 |
-
|
70 |
.header {
|
71 |
-
background: linear-gradient(135deg, #8B5CF6 0%, #A855F7 100%);
|
72 |
-
padding: 60px 40px;
|
73 |
text-align: center;
|
74 |
-
|
75 |
}
|
76 |
-
|
77 |
-
.
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
right: 0;
|
83 |
-
bottom: 0;
|
84 |
-
background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="white" opacity="0.1"/><circle cx="80" cy="40" r="3" fill="white" opacity="0.1"/><circle cx="40" cy="80" r="2" fill="white" opacity="0.1"/><circle cx="70" cy="70" r="2" fill="white" opacity="0.1"/></svg>');
|
85 |
-
pointer-events: none;
|
86 |
}
|
87 |
-
|
88 |
-
.
|
89 |
-
|
90 |
-
|
91 |
-
background: rgba(255, 255, 255, 0.2);
|
92 |
-
border-radius: 50%;
|
93 |
-
display: flex;
|
94 |
-
align-items: center;
|
95 |
-
justify-content: center;
|
96 |
-
margin: 0 auto 30px;
|
97 |
-
backdrop-filter: blur(10px);
|
98 |
}
|
99 |
-
|
100 |
-
.
|
101 |
-
width:
|
102 |
-
|
103 |
-
|
|
|
|
|
|
|
104 |
}
|
105 |
-
|
106 |
-
.
|
107 |
-
color: white;
|
108 |
font-size: 36px;
|
109 |
font-weight: 700;
|
110 |
-
|
111 |
-
|
112 |
-
|
|
|
113 |
}
|
114 |
-
|
115 |
-
.
|
116 |
-
|
117 |
-
font-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
padding: 50px 40px;
|
125 |
-
text-align: center;
|
126 |
}
|
127 |
-
|
128 |
-
.
|
129 |
-
|
130 |
-
|
|
|
|
|
|
|
|
|
|
|
131 |
font-weight: 600;
|
132 |
-
|
|
|
|
|
|
|
133 |
}
|
134 |
-
|
135 |
-
.
|
136 |
-
|
137 |
-
|
138 |
-
line-height: 1.7;
|
139 |
-
margin-bottom: 30px;
|
140 |
}
|
141 |
-
|
142 |
.features {
|
|
|
|
|
|
|
|
|
143 |
display: grid;
|
144 |
-
grid-template-columns: repeat(auto-fit, minmax(
|
145 |
-
gap:
|
146 |
-
margin:
|
147 |
}
|
148 |
-
|
149 |
-
.feature {
|
150 |
text-align: center;
|
|
|
|
|
|
|
|
|
151 |
}
|
152 |
-
|
153 |
.feature-icon {
|
154 |
width: 60px;
|
155 |
height: 60px;
|
156 |
-
background: linear-gradient(135deg, #
|
157 |
border-radius: 50%;
|
|
|
158 |
display: flex;
|
159 |
align-items: center;
|
160 |
justify-content: center;
|
161 |
-
|
162 |
-
|
163 |
-
}
|
164 |
-
|
165 |
-
.feature-icon:hover {
|
166 |
-
transform: scale(1.1);
|
167 |
-
}
|
168 |
-
|
169 |
-
.feature-icon svg {
|
170 |
-
width: 30px;
|
171 |
-
height: 30px;
|
172 |
-
fill: white;
|
173 |
}
|
174 |
-
|
175 |
-
.feature
|
176 |
-
|
177 |
-
font-size: 16px;
|
178 |
font-weight: 600;
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
.feature p {
|
183 |
-
color: #6B7280;
|
184 |
-
font-size: 14px;
|
185 |
-
margin: 0;
|
186 |
}
|
187 |
-
|
188 |
-
.
|
189 |
-
display: inline-block;
|
190 |
-
background: linear-gradient(135deg, #8B5CF6 0%, #A855F7 100%);
|
191 |
-
color: white;
|
192 |
-
padding: 15px 40px;
|
193 |
-
text-decoration: none;
|
194 |
-
border-radius: 50px;
|
195 |
-
font-weight: 600;
|
196 |
font-size: 16px;
|
197 |
-
|
198 |
-
|
199 |
}
|
200 |
-
|
201 |
-
.cta-button:hover {
|
202 |
-
transform: translateY(-2px);
|
203 |
-
box-shadow: 0 15px 40px rgba(139, 92, 246, 0.4);
|
204 |
-
}
|
205 |
-
|
206 |
.footer {
|
207 |
-
background: #F9FAFB;
|
208 |
-
padding: 30px 40px;
|
209 |
text-align: center;
|
210 |
-
|
|
|
|
|
211 |
}
|
212 |
-
|
213 |
-
.footer
|
214 |
-
color: #9CA3AF;
|
215 |
font-size: 14px;
|
216 |
-
|
|
|
217 |
}
|
218 |
-
|
219 |
.social-links {
|
220 |
display: flex;
|
221 |
justify-content: center;
|
222 |
-
gap:
|
223 |
margin-top: 20px;
|
224 |
}
|
225 |
-
|
226 |
-
.social-
|
|
|
227 |
width: 40px;
|
228 |
height: 40px;
|
229 |
-
background: #
|
230 |
border-radius: 50%;
|
231 |
-
|
232 |
-
align-items: center;
|
233 |
-
justify-content: center;
|
234 |
text-decoration: none;
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
.social-links a:hover {
|
239 |
-
background: #8B5CF6;
|
240 |
-
}
|
241 |
-
|
242 |
-
.social-links svg {
|
243 |
-
width: 20px;
|
244 |
-
height: 20px;
|
245 |
-
fill: #6B7280;
|
246 |
-
transition: fill 0.3s ease;
|
247 |
}
|
248 |
-
|
249 |
-
.social-
|
250 |
-
|
|
|
251 |
}
|
252 |
-
|
253 |
-
@media (max-width:
|
254 |
-
.
|
255 |
-
|
256 |
-
border-radius: 0;
|
257 |
}
|
258 |
-
|
259 |
-
.
|
260 |
-
padding:
|
261 |
}
|
262 |
-
|
263 |
-
.
|
264 |
font-size: 28px;
|
265 |
}
|
266 |
-
|
267 |
-
.
|
268 |
-
font-size:
|
269 |
}
|
270 |
-
|
271 |
.features {
|
|
|
|
|
|
|
|
|
272 |
grid-template-columns: 1fr;
|
273 |
-
gap:
|
|
|
|
|
|
|
|
|
274 |
}
|
275 |
}
|
276 |
</style>
|
277 |
</head>
|
278 |
<body>
|
279 |
<div class="email-container">
|
|
|
280 |
<div class="header">
|
281 |
-
<div class="
|
282 |
-
<svg viewBox="0 0 24 24">
|
283 |
-
<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/>
|
284 |
-
</svg>
|
285 |
-
</div>
|
286 |
-
<h1>Bem-vindo(a)!</h1>
|
287 |
-
<p>Estamos muito felizes em tê-lo(a) conosco</p>
|
288 |
</div>
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
<
|
|
|
|
|
293 |
|
294 |
-
<
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
|
|
|
|
|
|
|
|
|
|
303 |
</div>
|
304 |
|
305 |
-
<div class="feature">
|
306 |
-
<div class="feature-icon">
|
307 |
-
|
308 |
-
|
309 |
-
</svg>
|
310 |
-
</div>
|
311 |
-
<h3>Suporte 24/7</h3>
|
312 |
-
<p>Nossa equipe está sempre disponível para ajudá-lo(a)</p>
|
313 |
</div>
|
314 |
|
315 |
-
<div class="feature">
|
316 |
-
<div class="feature-icon">
|
317 |
-
|
318 |
-
|
319 |
-
</svg>
|
320 |
-
</div>
|
321 |
-
<h3>Atualizações</h3>
|
322 |
-
<p>Receba as últimas novidades e melhorias em primeira mão</p>
|
323 |
</div>
|
324 |
</div>
|
325 |
-
|
326 |
-
<a href="#" class="cta-button">Começar Agora</a>
|
327 |
</div>
|
328 |
-
|
|
|
329 |
<div class="footer">
|
330 |
-
<p
|
331 |
-
|
|
|
|
|
332 |
|
333 |
<div class="social-links">
|
334 |
-
<a href="#">
|
335 |
-
|
336 |
-
|
337 |
-
</svg>
|
338 |
-
</a>
|
339 |
-
<a href="#">
|
340 |
-
<svg viewBox="0 0 24 24">
|
341 |
-
<path d="M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z"/>
|
342 |
-
</svg>
|
343 |
-
</a>
|
344 |
-
<a href="#">
|
345 |
-
<svg viewBox="0 0 24 24">
|
346 |
-
<path d="M12.017 0C5.396 0 .029 5.367.029 11.987c0 5.079 3.158 9.417 7.618 11.174-.105-.949-.199-2.403.041-3.439.219-.937 1.406-5.957 1.406-5.957s-.359-.72-.359-1.781c0-1.663.967-2.911 2.168-2.911 1.024 0 1.518.769 1.518 1.688 0 1.029-.653 2.567-.992 3.992-.285 1.193.6 2.165 1.775 2.165 2.128 0 3.768-2.245 3.768-5.487 0-2.861-2.063-4.869-5.008-4.869-3.41 0-5.409 2.562-5.409 5.199 0 1.033.394 2.143.889 2.748.099.12.112.225.085.348-.09.375-.293 1.199-.334 1.363-.053.225-.172.271-.402.165-1.495-.69-2.433-2.878-2.433-4.646 0-3.776 2.748-7.252 7.92-7.252 4.158 0 7.392 2.967 7.392 6.923 0 4.135-2.607 7.462-6.233 7.462-1.214 0-2.357-.629-2.75-1.378l-.748 2.853c-.271 1.043-1.002 2.35-1.492 3.146C9.57 23.812 10.763 24.009 12.017 24.009c6.624 0 11.99-5.367 11.99-11.988C24.007 5.367 18.641.001 12.017.001z"/>
|
347 |
-
</svg>
|
348 |
-
</a>
|
349 |
</div>
|
|
|
|
|
|
|
|
|
|
|
350 |
</div>
|
351 |
</div>
|
352 |
</body>
|
|
|
39 |
if email_type == "welcome":
|
40 |
return """
|
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 |
+
|
54 |
body {
|
55 |
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
|
56 |
+
background-color: #ffffff;
|
57 |
+
color: #1d1d1f;
|
58 |
+
line-height: 1.6;
|
59 |
}
|
60 |
+
|
61 |
.email-container {
|
62 |
max-width: 600px;
|
63 |
margin: 0 auto;
|
64 |
+
background-color: #ffffff;
|
|
|
|
|
|
|
65 |
}
|
66 |
+
|
67 |
.header {
|
|
|
|
|
68 |
text-align: center;
|
69 |
+
padding: 60px 40px 40px;
|
70 |
}
|
71 |
+
|
72 |
+
.logo {
|
73 |
+
font-size: 28px;
|
74 |
+
font-weight: 700;
|
75 |
+
color: #6b46c1;
|
76 |
+
letter-spacing: -0.5px;
|
|
|
|
|
|
|
|
|
77 |
}
|
78 |
+
|
79 |
+
.hero-section {
|
80 |
+
text-align: center;
|
81 |
+
padding: 0 40px 60px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
82 |
}
|
83 |
+
|
84 |
+
.hero-image {
|
85 |
+
width: 100%;
|
86 |
+
max-width: 400px;
|
87 |
+
height: auto;
|
88 |
+
margin: 0 auto 50px;
|
89 |
+
border-radius: 20px;
|
90 |
+
box-shadow: 0 20px 40px rgba(107, 70, 193, 0.1);
|
91 |
}
|
92 |
+
|
93 |
+
.headline {
|
|
|
94 |
font-size: 36px;
|
95 |
font-weight: 700;
|
96 |
+
color: #1d1d1f;
|
97 |
+
margin-bottom: 24px;
|
98 |
+
line-height: 1.2;
|
99 |
+
letter-spacing: -0.8px;
|
100 |
}
|
101 |
+
|
102 |
+
.subheadline {
|
103 |
+
font-size: 20px;
|
104 |
+
font-weight: 400;
|
105 |
+
color: #6e6e73;
|
106 |
+
margin-bottom: 50px;
|
107 |
+
line-height: 1.4;
|
108 |
+
max-width: 480px;
|
109 |
+
margin-left: auto;
|
110 |
+
margin-right: auto;
|
|
|
|
|
111 |
}
|
112 |
+
|
113 |
+
.cta-button {
|
114 |
+
display: inline-block;
|
115 |
+
background: linear-gradient(135deg, #6b46c1 0%, #8b5cf6 100%);
|
116 |
+
color: #ffffff;
|
117 |
+
text-decoration: none;
|
118 |
+
padding: 16px 40px;
|
119 |
+
border-radius: 50px;
|
120 |
+
font-size: 18px;
|
121 |
font-weight: 600;
|
122 |
+
letter-spacing: 0.2px;
|
123 |
+
transition: all 0.3s ease;
|
124 |
+
box-shadow: 0 8px 24px rgba(107, 70, 193, 0.3);
|
125 |
+
margin-bottom: 60px;
|
126 |
}
|
127 |
+
|
128 |
+
.cta-button:hover {
|
129 |
+
transform: translateY(-2px);
|
130 |
+
box-shadow: 0 12px 32px rgba(107, 70, 193, 0.4);
|
|
|
|
|
131 |
}
|
132 |
+
|
133 |
.features {
|
134 |
+
padding: 0 40px 60px;
|
135 |
+
}
|
136 |
+
|
137 |
+
.feature-grid {
|
138 |
display: grid;
|
139 |
+
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
|
140 |
+
gap: 40px;
|
141 |
+
margin-top: 50px;
|
142 |
}
|
143 |
+
|
144 |
+
.feature-item {
|
145 |
text-align: center;
|
146 |
+
padding: 30px 20px;
|
147 |
+
border-radius: 16px;
|
148 |
+
background-color: #fafafa;
|
149 |
+
border: 1px solid #f5f5f7;
|
150 |
}
|
151 |
+
|
152 |
.feature-icon {
|
153 |
width: 60px;
|
154 |
height: 60px;
|
155 |
+
background: linear-gradient(135deg, #6b46c1 0%, #8b5cf6 100%);
|
156 |
border-radius: 50%;
|
157 |
+
margin: 0 auto 24px;
|
158 |
display: flex;
|
159 |
align-items: center;
|
160 |
justify-content: center;
|
161 |
+
font-size: 24px;
|
162 |
+
color: white;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
163 |
}
|
164 |
+
|
165 |
+
.feature-title {
|
166 |
+
font-size: 20px;
|
|
|
167 |
font-weight: 600;
|
168 |
+
color: #1d1d1f;
|
169 |
+
margin-bottom: 12px;
|
|
|
|
|
|
|
|
|
|
|
170 |
}
|
171 |
+
|
172 |
+
.feature-description {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
173 |
font-size: 16px;
|
174 |
+
color: #6e6e73;
|
175 |
+
line-height: 1.5;
|
176 |
}
|
177 |
+
|
|
|
|
|
|
|
|
|
|
|
178 |
.footer {
|
|
|
|
|
179 |
text-align: center;
|
180 |
+
padding: 40px;
|
181 |
+
border-top: 1px solid #f5f5f7;
|
182 |
+
margin-top: 40px;
|
183 |
}
|
184 |
+
|
185 |
+
.footer-text {
|
|
|
186 |
font-size: 14px;
|
187 |
+
color: #86868b;
|
188 |
+
margin-bottom: 16px;
|
189 |
}
|
190 |
+
|
191 |
.social-links {
|
192 |
display: flex;
|
193 |
justify-content: center;
|
194 |
+
gap: 24px;
|
195 |
margin-top: 20px;
|
196 |
}
|
197 |
+
|
198 |
+
.social-link {
|
199 |
+
display: inline-block;
|
200 |
width: 40px;
|
201 |
height: 40px;
|
202 |
+
background-color: #6b46c1;
|
203 |
border-radius: 50%;
|
204 |
+
color: white;
|
|
|
|
|
205 |
text-decoration: none;
|
206 |
+
line-height: 40px;
|
207 |
+
font-size: 18px;
|
208 |
+
transition: all 0.3s ease;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
209 |
}
|
210 |
+
|
211 |
+
.social-link:hover {
|
212 |
+
background-color: #553c9a;
|
213 |
+
transform: translateY(-2px);
|
214 |
}
|
215 |
+
|
216 |
+
@media (max-width: 480px) {
|
217 |
+
.header {
|
218 |
+
padding: 40px 20px 20px;
|
|
|
219 |
}
|
220 |
+
|
221 |
+
.hero-section {
|
222 |
+
padding: 0 20px 40px;
|
223 |
}
|
224 |
+
|
225 |
+
.headline {
|
226 |
font-size: 28px;
|
227 |
}
|
228 |
+
|
229 |
+
.subheadline {
|
230 |
+
font-size: 18px;
|
231 |
}
|
232 |
+
|
233 |
.features {
|
234 |
+
padding: 0 20px 40px;
|
235 |
+
}
|
236 |
+
|
237 |
+
.feature-grid {
|
238 |
grid-template-columns: 1fr;
|
239 |
+
gap: 30px;
|
240 |
+
}
|
241 |
+
|
242 |
+
.footer {
|
243 |
+
padding: 30px 20px;
|
244 |
}
|
245 |
}
|
246 |
</style>
|
247 |
</head>
|
248 |
<body>
|
249 |
<div class="email-container">
|
250 |
+
<!-- Header -->
|
251 |
<div class="header">
|
252 |
+
<div class="logo">ClosetCoach</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
253 |
</div>
|
254 |
+
|
255 |
+
<!-- Hero Section -->
|
256 |
+
<div class="hero-section">
|
257 |
+
<img src="https://huggingface.co/spaces/habulaj/connect/resolve/main/brazuca.png" alt="Style transformation illustration" class="hero-image">
|
258 |
+
|
259 |
+
<h1 class="headline">Welcome to your style journey</h1>
|
260 |
|
261 |
+
<p class="subheadline">
|
262 |
+
Connect with professional stylists who understand your unique style and help you create looks that make you feel confident and authentic.
|
263 |
+
</p>
|
264 |
+
|
265 |
+
<a href="#" class="cta-button">Start Your Style Quiz</a>
|
266 |
+
</div>
|
267 |
+
|
268 |
+
<!-- Features -->
|
269 |
+
<div class="features">
|
270 |
+
<div class="feature-grid">
|
271 |
+
<div class="feature-item">
|
272 |
+
<div class="feature-icon">✨</div>
|
273 |
+
<h3 class="feature-title">Personal Styling</h3>
|
274 |
+
<p class="feature-description">Get matched with expert stylists who curate looks just for you</p>
|
275 |
</div>
|
276 |
|
277 |
+
<div class="feature-item">
|
278 |
+
<div class="feature-icon">👗</div>
|
279 |
+
<h3 class="feature-title">Wardrobe Refresh</h3>
|
280 |
+
<p class="feature-description">Discover new ways to style pieces you already own</p>
|
|
|
|
|
|
|
|
|
281 |
</div>
|
282 |
|
283 |
+
<div class="feature-item">
|
284 |
+
<div class="feature-icon">💜</div>
|
285 |
+
<h3 class="feature-title">Confidence Boost</h3>
|
286 |
+
<p class="feature-description">Feel amazing in clothes that truly reflect who you are</p>
|
|
|
|
|
|
|
|
|
287 |
</div>
|
288 |
</div>
|
|
|
|
|
289 |
</div>
|
290 |
+
|
291 |
+
<!-- Footer -->
|
292 |
<div class="footer">
|
293 |
+
<p class="footer-text">
|
294 |
+
You're receiving this email because you signed up for ClosetCoach.<br>
|
295 |
+
Ready to transform your style? Let's get started!
|
296 |
+
</p>
|
297 |
|
298 |
<div class="social-links">
|
299 |
+
<a href="#" class="social-link">f</a>
|
300 |
+
<a href="#" class="social-link">t</a>
|
301 |
+
<a href="#" class="social-link">i</a>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
302 |
</div>
|
303 |
+
|
304 |
+
<p class="footer-text" style="margin-top: 24px;">
|
305 |
+
© 2025 ClosetCoach. All rights reserved.<br>
|
306 |
+
San Francisco, CA • [email protected]
|
307 |
+
</p>
|
308 |
</div>
|
309 |
</div>
|
310 |
</body>
|