habulaj commited on
Commit
c046341
·
verified ·
1 Parent(s): ba9884c

Update routes/emails.py

Browse files
Files changed (1) hide show
  1. routes/emails.py +220 -169
routes/emails.py CHANGED
@@ -38,263 +38,314 @@ 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 """
41
- <html>
 
42
  <head>
43
  <meta charset="UTF-8">
44
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
45
- <title>Welcome to ClosetCoach</title>
46
  <style>
47
  * {
48
  margin: 0;
49
  padding: 0;
50
  box-sizing: border-box;
51
  }
 
52
  body {
53
- font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
54
- background-color: #fafafa;
55
- color: #1a1a1a;
56
- line-height: 1.5;
57
  }
58
- .container {
59
- max-width: 500px;
60
- margin: 40px auto;
 
61
  background: white;
62
- border-radius: 16px;
 
63
  overflow: hidden;
64
- box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
65
  }
 
66
  .header {
67
- background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%);
68
  padding: 60px 40px;
69
  text-align: center;
 
70
  }
71
- .logo {
72
- font-size: 28px;
73
- font-weight: 700;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
74
  color: white;
75
- letter-spacing: -0.5px;
76
- margin-bottom: 8px;
 
 
 
77
  }
78
- .tagline {
79
- color: rgba(255, 255, 255, 0.85);
80
- font-size: 15px;
81
- font-weight: 400;
 
 
 
82
  }
 
83
  .content {
84
- padding: 48px 40px;
 
85
  }
86
- .welcome-title {
87
- font-size: 24px;
 
 
88
  font-weight: 600;
89
- color: #1a1a1a;
90
- margin-bottom: 16px;
91
- letter-spacing: -0.3px;
92
  }
93
- .welcome-text {
 
 
94
  font-size: 16px;
95
- color: #6b7280;
96
- margin-bottom: 40px;
97
- line-height: 1.6;
98
  }
 
99
  .features {
 
 
 
100
  margin: 40px 0;
101
  }
 
102
  .feature {
103
- display: flex;
104
- align-items: flex-start;
105
- margin-bottom: 24px;
106
- padding: 16px 0;
107
- }
108
- .feature:last-child {
109
- margin-bottom: 0;
110
  }
 
111
  .feature-icon {
112
- width: 40px;
113
- height: 40px;
114
- background: #f3f4f6;
115
- border-radius: 10px;
116
  display: flex;
117
  align-items: center;
118
  justify-content: center;
119
- margin-right: 16px;
120
- font-size: 16px;
121
- flex-shrink: 0;
122
- }
123
- .feature-content h3 {
124
- font-size: 16px;
125
- font-weight: 600;
126
- color: #1a1a1a;
127
- margin-bottom: 4px;
128
  }
129
- .feature-content p {
130
- font-size: 14px;
131
- color: #6b7280;
132
- line-height: 1.5;
133
  }
134
- .cta-section {
135
- background: #fafafa;
136
- padding: 32px;
137
- border-radius: 12px;
138
- text-align: center;
139
- margin: 40px 0;
140
  }
141
- .cta-title {
142
- font-size: 18px;
 
 
143
  font-weight: 600;
144
- color: #1a1a1a;
145
  margin-bottom: 8px;
146
  }
147
- .cta-text {
 
 
148
  font-size: 14px;
149
- color: #6b7280;
150
- margin-bottom: 24px;
151
  }
 
152
  .cta-button {
153
  display: inline-block;
154
- background: #8b5cf6;
155
  color: white;
156
- padding: 12px 32px;
157
  text-decoration: none;
158
- border-radius: 8px;
159
- font-weight: 500;
160
- font-size: 15px;
161
- transition: all 0.2s ease;
162
- }
163
- .cta-button:hover {
164
- background: #7c3aed;
165
- transform: translateY(-1px);
166
- }
167
- .next-steps {
168
- margin-top: 40px;
169
- padding: 24px;
170
- background: #f8fafc;
171
- border-radius: 8px;
172
- border-left: 3px solid #8b5cf6;
173
- }
174
- .next-steps h4 {
175
- font-size: 14px;
176
  font-weight: 600;
177
- color: #1a1a1a;
178
- margin-bottom: 12px;
179
- text-transform: uppercase;
180
- letter-spacing: 0.5px;
181
- }
182
- .next-steps ul {
183
- list-style: none;
184
- font-size: 14px;
185
- color: #6b7280;
186
- }
187
- .next-steps li {
188
- margin-bottom: 6px;
189
- padding-left: 16px;
190
- position: relative;
191
  }
192
- .next-steps li:before {
193
- content: "→";
194
- position: absolute;
195
- left: 0;
196
- color: #8b5cf6;
197
- font-weight: 500;
198
  }
 
199
  .footer {
200
- background: #1a1a1a;
201
- color: #9ca3af;
202
- padding: 32px 40px;
203
  text-align: center;
204
- font-size: 13px;
205
  }
206
- .footer-brand {
207
- color: white;
208
- font-weight: 600;
209
- margin-bottom: 8px;
 
210
  }
211
- .footer-links {
212
- margin-top: 16px;
 
 
 
 
213
  }
214
- .footer-links a {
215
- color: #9ca3af;
 
 
 
 
 
 
 
216
  text-decoration: none;
217
- margin: 0 12px;
218
- transition: color 0.2s ease;
 
 
 
219
  }
220
- .footer-links a:hover {
221
- color: #8b5cf6;
 
 
 
 
 
 
 
 
222
  }
 
223
  @media (max-width: 600px) {
224
- .container {
225
- margin: 20px;
226
- max-width: none;
227
  }
 
228
  .header, .content, .footer {
229
- padding: 32px 24px;
 
 
 
 
 
 
 
 
230
  }
231
- .cta-section {
232
- padding: 24px;
 
 
233
  }
234
  }
235
  </style>
236
  </head>
237
  <body>
238
- <div class="container">
239
  <div class="header">
240
- <div class="logo">ClosetCoach</div>
241
- <p class="tagline">Your personal style companion</p>
 
 
 
 
 
242
  </div>
243
 
244
  <div class="content">
245
- <h1 class="welcome-title">Welcome aboard</h1>
246
- <p class="welcome-text">
247
- 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.
248
- </p>
249
 
250
  <div class="features">
251
  <div class="feature">
252
- <div class="feature-icon">✨</div>
253
- <div class="feature-content">
254
- <h3>Expert Stylists</h3>
255
- <p>Connect with certified professionals who understand your vision and budget</p>
256
  </div>
 
 
257
  </div>
 
258
  <div class="feature">
259
- <div class="feature-icon">🎯</div>
260
- <div class="feature-content">
261
- <h3>Personalized Approach</h3>
262
- <p>Get tailored recommendations that match your lifestyle and preferences</p>
263
  </div>
 
 
264
  </div>
 
265
  <div class="feature">
266
- <div class="feature-icon">📅</div>
267
- <div class="feature-content">
268
- <h3>Flexible Scheduling</h3>
269
- <p>Book consultations that work with your busy schedule</p>
270
  </div>
 
 
271
  </div>
272
  </div>
273
 
274
- <div class="cta-section">
275
- <h3 class="cta-title">Ready to get started?</h3>
276
- <p class="cta-text">Browse our curated selection of stylists and find your perfect match</p>
277
- <a href="#" class="cta-button">Find Your Stylist</a>
278
- </div>
279
-
280
- <div class="next-steps">
281
- <h4>What's Next</h4>
282
- <ul>
283
- <li>Complete your style profile</li>
284
- <li>Browse featured stylists</li>
285
- <li>Book your first consultation</li>
286
- <li>Start your style transformation</li>
287
- </ul>
288
- </div>
289
  </div>
290
 
291
  <div class="footer">
292
- <div class="footer-brand">ClosetCoach</div>
293
- <p>Connecting style with confidence across the USA</p>
294
- <div class="footer-links">
295
- <a href="#">Help Center</a>
296
- <a href="#">Privacy</a>
297
- <a href="#">Unsubscribe</a>
 
 
 
 
 
 
 
 
 
 
 
 
 
298
  </div>
299
  </div>
300
  </div>
 
38
  # Defina aqui os templates HTML para cada tipo de email
39
  if email_type == "welcome":
40
  return """
41
+ <!DOCTYPE html>
42
+ <html lang="pt-BR">
43
  <head>
44
  <meta charset="UTF-8">
45
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
46
+ <title>Bem-vindo(a)!</title>
47
  <style>
48
  * {
49
  margin: 0;
50
  padding: 0;
51
  box-sizing: border-box;
52
  }
53
+
54
  body {
55
+ font-family: 'Arial', sans-serif;
56
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
57
+ min-height: 100vh;
58
+ padding: 20px;
59
  }
60
+
61
+ .email-container {
62
+ max-width: 600px;
63
+ margin: 0 auto;
64
  background: white;
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
+ position: relative;
75
  }
76
+
77
+ .header::before {
78
+ content: '';
79
+ position: absolute;
80
+ top: 0;
81
+ left: 0;
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
+ .welcome-icon {
89
+ width: 80px;
90
+ height: 80px;
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
+ .welcome-icon svg {
101
+ width: 40px;
102
+ height: 40px;
103
+ fill: white;
104
+ }
105
+
106
+ .header h1 {
107
  color: white;
108
+ font-size: 36px;
109
+ font-weight: 700;
110
+ margin-bottom: 15px;
111
+ position: relative;
112
+ z-index: 1;
113
  }
114
+
115
+ .header p {
116
+ color: rgba(255, 255, 255, 0.9);
117
+ font-size: 18px;
118
+ font-weight: 300;
119
+ position: relative;
120
+ z-index: 1;
121
  }
122
+
123
  .content {
124
+ padding: 50px 40px;
125
+ text-align: center;
126
  }
127
+
128
+ .content h2 {
129
+ color: #374151;
130
+ font-size: 28px;
131
  font-weight: 600;
132
+ margin-bottom: 20px;
 
 
133
  }
134
+
135
+ .content p {
136
+ color: #6B7280;
137
  font-size: 16px;
138
+ line-height: 1.7;
139
+ margin-bottom: 30px;
 
140
  }
141
+
142
  .features {
143
+ display: grid;
144
+ grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
145
+ gap: 30px;
146
  margin: 40px 0;
147
  }
148
+
149
  .feature {
150
+ text-align: center;
 
 
 
 
 
 
151
  }
152
+
153
  .feature-icon {
154
+ width: 60px;
155
+ height: 60px;
156
+ background: linear-gradient(135deg, #8B5CF6 0%, #A855F7 100%);
157
+ border-radius: 50%;
158
  display: flex;
159
  align-items: center;
160
  justify-content: center;
161
+ margin: 0 auto 15px;
162
+ transition: transform 0.3s ease;
 
 
 
 
 
 
 
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 h3 {
176
+ color: #374151;
177
+ font-size: 16px;
178
  font-weight: 600;
 
179
  margin-bottom: 8px;
180
  }
181
+
182
+ .feature p {
183
+ color: #6B7280;
184
  font-size: 14px;
185
+ margin: 0;
 
186
  }
187
+
188
  .cta-button {
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
+ transition: all 0.3s ease;
198
+ box-shadow: 0 10px 30px rgba(139, 92, 246, 0.3);
 
 
 
 
 
 
 
 
 
 
 
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
+ border-top: 1px solid #E5E7EB;
211
  }
212
+
213
+ .footer p {
214
+ color: #9CA3AF;
215
+ font-size: 14px;
216
+ margin-bottom: 10px;
217
  }
218
+
219
+ .social-links {
220
+ display: flex;
221
+ justify-content: center;
222
+ gap: 15px;
223
+ margin-top: 20px;
224
  }
225
+
226
+ .social-links a {
227
+ width: 40px;
228
+ height: 40px;
229
+ background: #E5E7EB;
230
+ border-radius: 50%;
231
+ display: flex;
232
+ align-items: center;
233
+ justify-content: center;
234
  text-decoration: none;
235
+ transition: background 0.3s ease;
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-links a:hover svg {
250
+ fill: white;
251
  }
252
+
253
  @media (max-width: 600px) {
254
+ .email-container {
255
+ margin: 0;
256
+ border-radius: 0;
257
  }
258
+
259
  .header, .content, .footer {
260
+ padding: 30px 20px;
261
+ }
262
+
263
+ .header h1 {
264
+ font-size: 28px;
265
+ }
266
+
267
+ .content h2 {
268
+ font-size: 24px;
269
  }
270
+
271
+ .features {
272
+ grid-template-columns: 1fr;
273
+ gap: 20px;
274
  }
275
  }
276
  </style>
277
  </head>
278
  <body>
279
+ <div class="email-container">
280
  <div class="header">
281
+ <div class="welcome-icon">
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
  <div class="content">
291
+ <h2>Obrigado por se juntar a nós!</h2>
292
+ <p>Você acabou de dar o primeiro passo em uma jornada incrível. Nossa equipe está empolgada para ajudá-lo(a) a aproveitar ao máximo nossa plataforma.</p>
 
 
293
 
294
  <div class="features">
295
  <div class="feature">
296
+ <div class="feature-icon">
297
+ <svg viewBox="0 0 24 24">
298
+ <path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"/>
299
+ </svg>
300
  </div>
301
+ <h3>Qualidade Premium</h3>
302
+ <p>Acesso a recursos exclusivos e conteúdo de alta qualidade</p>
303
  </div>
304
+
305
  <div class="feature">
306
+ <div class="feature-icon">
307
+ <svg viewBox="0 0 24 24">
308
+ <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z"/>
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
+ <svg viewBox="0 0 24 24">
318
+ <path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm-1 16H9V7h9v14z"/>
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>Se você tiver alguma dúvida, não hesite em nos contatar.</p>
331
+ <p>Atenciosamente,<br><strong>Equipe de Suporte</strong></p>
332
+
333
+ <div class="social-links">
334
+ <a href="#">
335
+ <svg viewBox="0 0 24 24">
336
+ <path d="M24 4.557c-.883.392-1.832.656-2.828.775 1.017-.609 1.798-1.574 2.165-2.724-.951.564-2.005.974-3.127 1.195-.897-.957-2.178-1.555-3.594-1.555-3.179 0-5.515 2.966-4.797 6.045-4.091-.205-7.719-2.165-10.148-5.144-1.29 2.213-.669 5.108 1.523 6.574-.806-.026-1.566-.247-2.229-.616-.054 2.281 1.581 4.415 3.949 4.89-.693.188-1.452.232-2.224.084.626 1.956 2.444 3.379 4.6 3.419-2.07 1.623-4.678 2.348-7.29 2.04 2.179 1.397 4.768 2.212 7.548 2.212 9.142 0 14.307-7.721 13.995-14.646.962-.695 1.797-1.562 2.457-2.549z"/>
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>