Spaces:
Running
Running
undefined - Initial Deployment
Browse files- README.md +7 -5
- index.html +453 -18
README.md
CHANGED
@@ -1,10 +1,12 @@
|
|
1 |
---
|
2 |
-
title:
|
3 |
-
emoji:
|
4 |
-
colorFrom:
|
5 |
-
colorTo:
|
6 |
sdk: static
|
7 |
pinned: false
|
|
|
|
|
8 |
---
|
9 |
|
10 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
1 |
---
|
2 |
+
title: emailbuilder
|
3 |
+
emoji: 🐳
|
4 |
+
colorFrom: purple
|
5 |
+
colorTo: purple
|
6 |
sdk: static
|
7 |
pinned: false
|
8 |
+
tags:
|
9 |
+
- deepsite
|
10 |
---
|
11 |
|
12 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
index.html
CHANGED
@@ -1,19 +1,454 @@
|
|
1 |
-
<!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
<html>
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html>
|
2 |
+
<html lang="pt-br">
|
3 |
+
<head>
|
4 |
+
<meta charset="UTF-8">
|
5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
+
<title>Email Builder Pro - Criador de Emails HTML</title>
|
7 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
8 |
+
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
|
9 |
+
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
|
10 |
+
<style>
|
11 |
+
/* Custom styles that Tailwind can't handle easily */
|
12 |
+
.code-textarea {
|
13 |
+
font-family: 'Fira Code', 'Courier New', monospace;
|
14 |
+
tab-size: 2;
|
15 |
+
}
|
16 |
+
|
17 |
+
.resize-handle {
|
18 |
+
width: 5px;
|
19 |
+
background-color: rgba(156, 163, 175, 0.2);
|
20 |
+
cursor: col-resize;
|
21 |
+
transition: background-color 0.2s;
|
22 |
+
}
|
23 |
+
|
24 |
+
.resize-handle:hover {
|
25 |
+
background-color: rgba(156, 163, 175, 0.5);
|
26 |
+
}
|
27 |
+
|
28 |
+
.template-item:hover .template-preview {
|
29 |
+
transform: scale(1.02);
|
30 |
+
}
|
31 |
+
|
32 |
+
.template-preview {
|
33 |
+
transition: transform 0.2s ease;
|
34 |
+
}
|
35 |
+
|
36 |
+
/* Custom scrollbar */
|
37 |
+
::-webkit-scrollbar {
|
38 |
+
width: 8px;
|
39 |
+
height: 8px;
|
40 |
+
}
|
41 |
+
|
42 |
+
::-webkit-scrollbar-track {
|
43 |
+
background: #f1f5f9;
|
44 |
+
}
|
45 |
+
|
46 |
+
::-webkit-scrollbar-thumb {
|
47 |
+
background: #cbd5e1;
|
48 |
+
border-radius: 4px;
|
49 |
+
}
|
50 |
+
|
51 |
+
::-webkit-scrollbar-thumb:hover {
|
52 |
+
background: #94a3b8;
|
53 |
+
}
|
54 |
+
</style>
|
55 |
+
<script>
|
56 |
+
tailwind.config = {
|
57 |
+
theme: {
|
58 |
+
extend: {
|
59 |
+
colors: {
|
60 |
+
primary: {
|
61 |
+
50: '#eff6ff',
|
62 |
+
100: '#dbeafe',
|
63 |
+
200: '#bfdbfe',
|
64 |
+
300: '#93c5fd',
|
65 |
+
400: '#60a5fa',
|
66 |
+
500: '#3b82f6',
|
67 |
+
600: '#2563eb',
|
68 |
+
700: '#1d4ed8',
|
69 |
+
800: '#1e40af',
|
70 |
+
900: '#1e3a8a',
|
71 |
+
},
|
72 |
+
secondary: {
|
73 |
+
50: '#f8fafc',
|
74 |
+
100: '#f1f5f9',
|
75 |
+
200: '#e2e8f0',
|
76 |
+
300: '#cbd5e1',
|
77 |
+
400: '#94a3b8',
|
78 |
+
500: '#64748b',
|
79 |
+
600: '#475569',
|
80 |
+
700: '#334155',
|
81 |
+
800: '#1e293b',
|
82 |
+
900: '#0f172a',
|
83 |
+
}
|
84 |
+
},
|
85 |
+
fontFamily: {
|
86 |
+
sans: ['Inter', 'sans-serif'],
|
87 |
+
mono: ['Fira Code', 'monospace']
|
88 |
+
}
|
89 |
+
}
|
90 |
+
}
|
91 |
+
}
|
92 |
+
</script>
|
93 |
+
</head>
|
94 |
+
<body class="font-sans bg-gray-50 text-gray-800 overflow-hidden">
|
95 |
+
<div class="flex h-screen">
|
96 |
+
<!-- Sidebar -->
|
97 |
+
<div id="sidebar" class="w-80 bg-white border-r border-gray-200 flex flex-col transition-all duration-300 ease-in-out transform -translate-x-full md:translate-x-0">
|
98 |
+
<!-- Sidebar Header -->
|
99 |
+
<div class="p-6 bg-gradient-to-r from-primary-600 to-primary-700 text-white">
|
100 |
+
<div class="flex items-center space-x-3">
|
101 |
+
<div class="p-2 bg-white/20 rounded-lg">
|
102 |
+
<i class="fas fa-envelope text-xl"></i>
|
103 |
+
</div>
|
104 |
+
<div>
|
105 |
+
<h1 class="text-xl font-bold">Email Builder Pro</h1>
|
106 |
+
<p class="text-sm opacity-90">Crie emails profissionais</p>
|
107 |
+
</div>
|
108 |
+
</div>
|
109 |
+
</div>
|
110 |
+
|
111 |
+
<!-- Sidebar Content -->
|
112 |
+
<div class="flex-1 overflow-y-auto p-4 space-y-6">
|
113 |
+
<!-- Templates Section -->
|
114 |
+
<div>
|
115 |
+
<h2 class="text-sm font-semibold text-gray-500 uppercase tracking-wider mb-3 flex items-center">
|
116 |
+
<i class="fas fa-file-alt mr-2"></i> Modelos
|
117 |
+
</h2>
|
118 |
+
<div class="grid grid-cols-1 gap-3">
|
119 |
+
<!-- Blank Template -->
|
120 |
+
<div class="template-item bg-white border border-gray-200 rounded-lg overflow-hidden cursor-pointer transition-all duration-200 hover:border-primary-400 hover:shadow-md active"
|
121 |
+
onclick="loadTemplate('blank')">
|
122 |
+
<div class="template-preview bg-gray-50 h-24 flex items-center justify-center">
|
123 |
+
<div class="text-center p-4">
|
124 |
+
<i class="fas fa-file text-3xl text-gray-400 mb-2"></i>
|
125 |
+
<p class="text-xs font-medium text-gray-500">Em Branco</p>
|
126 |
+
</div>
|
127 |
+
</div>
|
128 |
+
<div class="p-3">
|
129 |
+
<h3 class="font-medium text-gray-800">Comece do zero</h3>
|
130 |
+
<p class="text-xs text-gray-500 mt-1">Template vazio para criação personalizada</p>
|
131 |
+
</div>
|
132 |
+
</div>
|
133 |
+
|
134 |
+
<!-- Newsletter Template -->
|
135 |
+
<div class="template-item bg-white border border-gray-200 rounded-lg overflow-hidden cursor-pointer transition-all duration-200 hover:border-primary-400 hover:shadow-md"
|
136 |
+
onclick="loadTemplate('asof')">
|
137 |
+
<div class="template-preview bg-gradient-to-br from-blue-50 to-indigo-50 h-24 flex items-center justify-center">
|
138 |
+
<div class="text-center p-4">
|
139 |
+
<div class="inline-block px-4 py-2 bg-primary-600 text-white rounded-md text-sm font-medium">NEWSLETTER</div>
|
140 |
+
</div>
|
141 |
+
</div>
|
142 |
+
<div class="p-3">
|
143 |
+
<h3 class="font-medium text-gray-800">Newsletter</h3>
|
144 |
+
<p class="text-xs text-gray-500 mt-1">Modelo institucional para newsletters</p>
|
145 |
+
</div>
|
146 |
+
</div>
|
147 |
+
|
148 |
+
<!-- Simple Email Template -->
|
149 |
+
<div class="template-item bg-white border border-gray-200 rounded-lg overflow-hidden cursor-pointer transition-all duration-200 hover:border-primary-400 hover:shadow-md"
|
150 |
+
onclick="loadTemplate('simple')">
|
151 |
+
<div class="template-preview bg-white h-24 flex items-center justify-center">
|
152 |
+
<div class="text-center p-4 border-b-2 border-gray-100 w-full">
|
153 |
+
<h3 class="text-lg font-medium text-gray-800">Email Simples</h3>
|
154 |
+
</div>
|
155 |
+
</div>
|
156 |
+
<div class="p-3">
|
157 |
+
<h3 class="font-medium text-gray-800">Minimalista</h3>
|
158 |
+
<p class="text-xs text-gray-500 mt-1">Design limpo e direto ao ponto</p>
|
159 |
+
</div>
|
160 |
+
</div>
|
161 |
+
|
162 |
+
<!-- Corporate Template -->
|
163 |
+
<div class="template-item bg-white border border-gray-200 rounded-lg overflow-hidden cursor-pointer transition-all duration-200 hover:border-primary-400 hover:shadow-md"
|
164 |
+
onclick="loadTemplate('corporate')">
|
165 |
+
<div class="template-preview bg-gradient-to-r from-primary-600 to-primary-700 h-24 flex items-center justify-center">
|
166 |
+
<div class="text-center p-4 text-white">
|
167 |
+
<h3 class="text-lg font-medium">Corporativo</h3>
|
168 |
+
<p class="text-sm opacity-90">Sua Empresa</p>
|
169 |
+
</div>
|
170 |
+
</div>
|
171 |
+
<div class="p-3">
|
172 |
+
<h3 class="font-medium text-gray-800">Profissional</h3>
|
173 |
+
<p class="text-xs text-gray-500 mt-1">Para comunicações empresariais</p>
|
174 |
+
</div>
|
175 |
+
</div>
|
176 |
+
</div>
|
177 |
+
</div>
|
178 |
+
|
179 |
+
<!-- Quick Settings -->
|
180 |
+
<div>
|
181 |
+
<h2 class="text-sm font-semibold text-gray-500 uppercase tracking-wider mb-3 flex items-center">
|
182 |
+
<i class="fas fa-cog mr-2"></i> Configurações
|
183 |
+
</h2>
|
184 |
+
<div class="space-y-4">
|
185 |
+
<!-- Email Title -->
|
186 |
+
<div>
|
187 |
+
<label for="emailTitle" class="block text-sm font-medium text-gray-700 mb-1">Título do Email</label>
|
188 |
+
<div class="relative">
|
189 |
+
<input type="text" id="emailTitle" value="Meu Email Profissional"
|
190 |
+
class="w-full pl-10 pr-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary-500 focus:border-primary-500">
|
191 |
+
<div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
|
192 |
+
<i class="fas fa-heading text-gray-400"></i>
|
193 |
+
</div>
|
194 |
+
</div>
|
195 |
+
</div>
|
196 |
+
|
197 |
+
<!-- Primary Color -->
|
198 |
+
<div>
|
199 |
+
<label for="primaryColor" class="block text-sm font-medium text-gray-700 mb-1">Cor Principal</label>
|
200 |
+
<div class="flex items-center space-x-3">
|
201 |
+
<div class="relative">
|
202 |
+
<input type="color" id="primaryColor" value="#2563eb"
|
203 |
+
class="w-10 h-10 rounded-lg border border-gray-300 cursor-pointer">
|
204 |
+
</div>
|
205 |
+
<div class="flex-1">
|
206 |
+
<input type="text" id="primaryColorText" value="#2563eb"
|
207 |
+
class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary-500 focus:border-primary-500 font-mono text-sm">
|
208 |
+
</div>
|
209 |
+
</div>
|
210 |
+
</div>
|
211 |
+
|
212 |
+
<!-- Max Width -->
|
213 |
+
<div>
|
214 |
+
<label for="maxWidth" class="block text-sm font-medium text-gray-700 mb-1">Largura Máxima</label>
|
215 |
+
<div class="relative">
|
216 |
+
<select id="maxWidth" class="w-full pl-10 pr-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary-500 focus:border-primary-500 appearance-none">
|
217 |
+
<option value="600px">600px (Padrão)</option>
|
218 |
+
<option value="650px">650px</option>
|
219 |
+
<option value="700px">700px</option>
|
220 |
+
<option value="100%">100% (Responsivo)</option>
|
221 |
+
</select>
|
222 |
+
<div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
|
223 |
+
<i class="fas fa-arrows-alt-h text-gray-400"></i>
|
224 |
+
</div>
|
225 |
+
</div>
|
226 |
+
</div>
|
227 |
+
</div>
|
228 |
+
</div>
|
229 |
+
|
230 |
+
<!-- Actions -->
|
231 |
+
<div class="pt-2">
|
232 |
+
<h2 class="text-sm font-semibold text-gray-500 uppercase tracking-wider mb-3 flex items-center">
|
233 |
+
<i class="fas fa-bolt mr-2"></i> Ações
|
234 |
+
</h2>
|
235 |
+
<div class="space-y-3">
|
236 |
+
<button onclick="copyToClipboard()" class="w-full flex items-center justify-center px-4 py-3 bg-gradient-to-r from-green-500 to-green-600 text-white rounded-lg font-medium hover:from-green-600 hover:to-green-700 transition-all duration-200 shadow hover:shadow-md">
|
237 |
+
<i class="fas fa-copy mr-2"></i> Copiar para Gmail
|
238 |
+
</button>
|
239 |
+
|
240 |
+
<button onclick="downloadHTML()" class="w-full flex items-center justify-center px-4 py-3 bg-gradient-to-r from-primary-500 to-primary-600 text-white rounded-lg font-medium hover:from-primary-600 hover:to-primary-700 transition-all duration-200 shadow hover:shadow-md">
|
241 |
+
<i class="fas fa-download mr-2"></i> Baixar HTML
|
242 |
+
</button>
|
243 |
+
|
244 |
+
<button onclick="previewInNewTab()" class="w-full flex items-center justify-center px-4 py-3 bg-gray-100 text-gray-700 rounded-lg font-medium hover:bg-gray-200 transition-all duration-200">
|
245 |
+
<i class="fas fa-external-link-alt mr-2"></i> Abrir em Nova Janela
|
246 |
+
</button>
|
247 |
+
</div>
|
248 |
+
</div>
|
249 |
+
</div>
|
250 |
+
</div>
|
251 |
+
|
252 |
+
<!-- Main Content -->
|
253 |
+
<div class="flex-1 flex flex-col overflow-hidden">
|
254 |
+
<!-- Toolbar -->
|
255 |
+
<div class="bg-white border-b border-gray-200 p-4 flex items-center">
|
256 |
+
<button onclick="toggleSidebar()" class="md:hidden mr-4 p-2 rounded-lg hover:bg-gray-100 text-gray-600">
|
257 |
+
<i class="fas fa-bars text-lg"></i>
|
258 |
+
</button>
|
259 |
+
|
260 |
+
<div class="flex items-center">
|
261 |
+
<i class="fas fa-code text-primary-600 mr-2"></i>
|
262 |
+
<h2 class="font-medium text-gray-800">Editor de Email HTML</h2>
|
263 |
+
</div>
|
264 |
+
|
265 |
+
<div class="ml-auto flex items-center space-x-3">
|
266 |
+
<button onclick="updatePreview()" class="flex items-center px-4 py-2 bg-gray-100 text-gray-700 rounded-lg font-medium hover:bg-gray-200 transition-all duration-200">
|
267 |
+
<i class="fas fa-sync-alt mr-2"></i> Atualizar
|
268 |
+
</button>
|
269 |
+
|
270 |
+
<div class="relative">
|
271 |
+
<button onclick="showHelp()" class="p-2 rounded-lg hover:bg-gray-100 text-gray-600">
|
272 |
+
<i class="fas fa-question-circle text-lg"></i>
|
273 |
+
</button>
|
274 |
+
<div id="helpTooltip" class="hidden absolute right-0 mt-2 w-64 bg-white border border-gray-200 rounded-lg shadow-lg p-3 z-50">
|
275 |
+
<h3 class="font-medium text-gray-800 mb-2">Dicas Rápidas</h3>
|
276 |
+
<ul class="text-sm text-gray-600 space-y-1">
|
277 |
+
<li>• Use TAB para indentar código</li>
|
278 |
+
<li>• Atualize o preview com F5</li>
|
279 |
+
<li>• Ctrl+S para salvar HTML</li>
|
280 |
+
<li>• Templates são apenas pontos de partida</li>
|
281 |
+
</ul>
|
282 |
+
</div>
|
283 |
+
</div>
|
284 |
+
</div>
|
285 |
+
</div>
|
286 |
+
|
287 |
+
<!-- Editor and Preview Panels -->
|
288 |
+
<div class="flex-1 flex overflow-hidden">
|
289 |
+
<!-- Code Editor -->
|
290 |
+
<div class="flex-1 flex flex-col overflow-hidden border-r border-gray-200">
|
291 |
+
<div class="bg-gray-50 border-b border-gray-200 p-3 flex items-center justify-between">
|
292 |
+
<div class="flex items-center">
|
293 |
+
<i class="fas fa-code text-gray-500 mr-2"></i>
|
294 |
+
<span class="text-sm font-medium text-gray-700">HTML/CSS</span>
|
295 |
+
</div>
|
296 |
+
<div class="flex items-center space-x-2">
|
297 |
+
<button onclick="formatCode()" class="text-xs px-2 py-1 bg-gray-100 text-gray-600 rounded hover:bg-gray-200">
|
298 |
+
<i class="fas fa-indent mr-1"></i> Format
|
299 |
+
</button>
|
300 |
+
<button onclick="minifyCode()" class="text-xs px-2 py-1 bg-gray-100 text-gray-600 rounded hover:bg-gray-200">
|
301 |
+
<i class="fas fa-compress-alt mr-1"></i> Minify
|
302 |
+
</button>
|
303 |
+
</div>
|
304 |
+
</div>
|
305 |
+
<textarea id="codeEditor" class="code-textarea flex-1 p-4 bg-gray-800 text-gray-100 resize-none outline-none" spellcheck="false"></textarea>
|
306 |
+
</div>
|
307 |
+
|
308 |
+
<!-- Resize Handle -->
|
309 |
+
<div class="resize-handle" id="resizeHandle"></div>
|
310 |
+
|
311 |
+
<!-- Preview Panel -->
|
312 |
+
<div class="flex-1 flex flex-col overflow-hidden">
|
313 |
+
<div class="bg-gray-50 border-b border-gray-200 p-3 flex items-center justify-between">
|
314 |
+
<div class="flex items-center">
|
315 |
+
<i class="fas fa-eye text-gray-500 mr-2"></i>
|
316 |
+
<span class="text-sm font-medium text-gray-700">Preview</span>
|
317 |
+
</div>
|
318 |
+
<div class="flex items-center space-x-2">
|
319 |
+
<button onclick="toggleDeviceView('desktop')" class="text-xs px-2 py-1 bg-gray-100 text-gray-600 rounded hover:bg-gray-200">
|
320 |
+
<i class="fas fa-desktop mr-1"></i> Desktop
|
321 |
+
</button>
|
322 |
+
<button onclick="toggleDeviceView('mobile')" class="text-xs px-2 py-1 bg-gray-100 text-gray-600 rounded hover:bg-gray-200">
|
323 |
+
<i class="fas fa-mobile-alt mr-1"></i> Mobile
|
324 |
+
</button>
|
325 |
+
</div>
|
326 |
+
</div>
|
327 |
+
<div id="previewContainer" class="flex-1 bg-gray-100 p-4 overflow-auto">
|
328 |
+
<div id="previewWrapper" class="mx-auto bg-white shadow-lg" style="max-width: 600px;">
|
329 |
+
<iframe id="previewFrame" class="w-full h-full border-0"></iframe>
|
330 |
+
</div>
|
331 |
+
</div>
|
332 |
+
</div>
|
333 |
+
</div>
|
334 |
+
</div>
|
335 |
+
</div>
|
336 |
+
|
337 |
+
<!-- Status Toast -->
|
338 |
+
<div id="statusToast" class="fixed top-4 right-4 z-50 hidden">
|
339 |
+
<div class="bg-white border border-gray-200 rounded-lg shadow-lg overflow-hidden w-64">
|
340 |
+
<div class="flex items-start p-4">
|
341 |
+
<div id="toastIcon" class="flex-shrink-0 mr-3">
|
342 |
+
<i class="fas fa-check-circle text-green-500 text-xl"></i>
|
343 |
+
</div>
|
344 |
+
<div class="flex-1">
|
345 |
+
<h3 id="toastTitle" class="font-medium text-gray-800">Sucesso</h3>
|
346 |
+
<p id="toastMessage" class="text-sm text-gray-600 mt-1">Operação realizada com sucesso</p>
|
347 |
+
</div>
|
348 |
+
<button onclick="hideToast()" class="text-gray-400 hover:text-gray-500">
|
349 |
+
<i class="fas fa-times"></i>
|
350 |
+
</button>
|
351 |
+
</div>
|
352 |
+
<div id="toastProgress" class="h-1 bg-green-500 w-full"></div>
|
353 |
+
</div>
|
354 |
+
</div>
|
355 |
+
|
356 |
+
<!-- Help Modal -->
|
357 |
+
<div id="helpModal" class="fixed inset-0 z-50 hidden flex items-center justify-center bg-black bg-opacity-50">
|
358 |
+
<div class="bg-white rounded-lg shadow-xl w-full max-w-2xl max-h-[90vh] overflow-hidden">
|
359 |
+
<div class="border-b border-gray-200 p-4 flex items-center justify-between">
|
360 |
+
<h3 class="text-lg font-medium text-gray-800">Ajuda do Email Builder</h3>
|
361 |
+
<button onclick="hideHelpModal()" class="text-gray-400 hover:text-gray-500">
|
362 |
+
<i class="fas fa-times"></i>
|
363 |
+
</button>
|
364 |
+
</div>
|
365 |
+
<div class="p-6 overflow-y-auto">
|
366 |
+
<div class="space-y-6">
|
367 |
+
<div>
|
368 |
+
<h4 class="font-medium text-gray-800 mb-3 flex items-center">
|
369 |
+
<i class="fas fa-file-alt text-primary-600 mr-2"></i> Modelos
|
370 |
+
</h4>
|
371 |
+
<p class="text-gray-600 text-sm">Comece rapidamente com nossos modelos pré-definidos. Cada template pode ser completamente personalizado no editor.</p>
|
372 |
+
</div>
|
373 |
+
|
374 |
+
<div>
|
375 |
+
<h4 class="font-medium text-gray-800 mb-3 flex items-center">
|
376 |
+
<i class="fas fa-code text-primary-600 mr-2"></i> Editor HTML/CSS
|
377 |
+
</h4>
|
378 |
+
<p class="text-gray-600 text-sm">Edite livremente o código HTML e CSS do seu email. O preview é atualizado automaticamente conforme você digita.</p>
|
379 |
+
<div class="mt-2 bg-gray-50 p-3 rounded-lg">
|
380 |
+
<p class="text-xs font-mono text-gray-700"><!-- Dica: Use TAB para indentar seu código --></p>
|
381 |
+
</div>
|
382 |
+
</div>
|
383 |
+
|
384 |
+
<div>
|
385 |
+
<h4 class="font-medium text-gray-800 mb-3 flex items-center">
|
386 |
+
<i class="fas fa-download text-primary-600 mr-2"></i> Exportação
|
387 |
+
</h4>
|
388 |
+
<p class="text-gray-600 text-sm">Você pode copiar o código diretamente para o Gmail ou baixar o HTML completo para usar em outros sistemas.</p>
|
389 |
+
</div>
|
390 |
+
</div>
|
391 |
+
</div>
|
392 |
+
<div class="border-t border-gray-200 p-4 flex justify-end">
|
393 |
+
<button onclick="hideHelpModal()" class="px-4 py-2 bg-primary-600 text-white rounded-lg hover:bg-primary-700">
|
394 |
+
Entendi
|
395 |
+
</button>
|
396 |
+
</div>
|
397 |
+
</div>
|
398 |
+
</div>
|
399 |
+
|
400 |
+
<script>
|
401 |
+
// Templates
|
402 |
+
const templates = {
|
403 |
+
blank: `<!DOCTYPE html>
|
404 |
<html>
|
405 |
+
<head>
|
406 |
+
<meta charset="UTF-8">
|
407 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
408 |
+
<title>Seu Email</title>
|
409 |
+
<style>
|
410 |
+
/* Adicione seus estilos CSS aqui */
|
411 |
+
body {
|
412 |
+
font-family: Arial, sans-serif;
|
413 |
+
background-color: #f4f4f4;
|
414 |
+
margin: 0;
|
415 |
+
padding: 0;
|
416 |
+
}
|
417 |
+
.container {
|
418 |
+
max-width: 600px;
|
419 |
+
margin: 0 auto;
|
420 |
+
background: white;
|
421 |
+
}
|
422 |
+
.header {
|
423 |
+
padding: 20px;
|
424 |
+
background: #2563eb;
|
425 |
+
color: white;
|
426 |
+
}
|
427 |
+
.content {
|
428 |
+
padding: 20px;
|
429 |
+
}
|
430 |
+
.footer {
|
431 |
+
padding: 20px;
|
432 |
+
background: #f4f4f4;
|
433 |
+
color: #666;
|
434 |
+
font-size: 12px;
|
435 |
+
}
|
436 |
+
</style>
|
437 |
+
</head>
|
438 |
+
<body>
|
439 |
+
<div class="container">
|
440 |
+
<div class="header">
|
441 |
+
<h1>Título do Email</h1>
|
442 |
+
</div>
|
443 |
+
<div class="content">
|
444 |
+
<!-- Adicione seu conteúdo HTML aqui -->
|
445 |
+
<p>Olá,</p>
|
446 |
+
<p>Este é um exemplo de email HTML.</p>
|
447 |
+
<p>Atenciosamente,<br>Equipe</p>
|
448 |
+
</div>
|
449 |
+
<div class="footer">
|
450 |
+
<p>© 2023 Sua Empresa. Todos os direitos reservados.</p>
|
451 |
+
</div>
|
452 |
+
</div>
|
453 |
+
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=SherlockRamos/emailbuilder" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
454 |
+
</html>
|