habulaj commited on
Commit
4c76272
·
verified ·
1 Parent(s): 86a9d1b

Update routes/emails.py

Browse files
Files changed (1) hide show
  1. 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="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>
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>