Monte com essas cores e sidebar:
Browse filescolors: {
primary: '#21223a',
secondary: '#ff580f',
}
Monte uma aplicação onde o usuário poderá enviar um Visual Age e ele será convertido para HTML. Preciso que do lado esquerdo o usuário faça upload do arquivo .esf e do lado esquerdo mostre a tela visual age emulada com base no arquivo e em baixo uma tela HTML que foi gerada com base na tela simulada do visual age. Adicione um campo para alterar o modelo LLM de conversão, temperatura e um campo de texto para critérios de conversão e layout.
- README.md +6 -3
- index.html +301 -18
README.md
CHANGED
|
@@ -1,10 +1,13 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
emoji: 🐨
|
| 4 |
colorFrom: purple
|
| 5 |
colorTo: red
|
|
|
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
-
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: VisualAge2HTML Converter 🎨
|
|
|
|
| 3 |
colorFrom: purple
|
| 4 |
colorTo: red
|
| 5 |
+
emoji: 🐳
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
| 8 |
+
tags:
|
| 9 |
+
- deepsite-v3
|
| 10 |
---
|
| 11 |
|
| 12 |
+
# Welcome to your new DeepSite project!
|
| 13 |
+
This project was created with [DeepSite](https://deepsite.hf.co).
|
index.html
CHANGED
|
@@ -1,19 +1,302 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
</html>
|
|
|
|
| 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>VisualAge to HTML Converter</title>
|
| 7 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
+
<script>
|
| 9 |
+
tailwind.config = {
|
| 10 |
+
theme: {
|
| 11 |
+
extend: {
|
| 12 |
+
colors: {
|
| 13 |
+
primary: '#21223a',
|
| 14 |
+
secondary: '#ff580f',
|
| 15 |
+
}
|
| 16 |
+
}
|
| 17 |
+
}
|
| 18 |
+
}
|
| 19 |
+
</script>
|
| 20 |
+
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
|
| 21 |
+
<script src="https://unpkg.com/feather-icons"></script>
|
| 22 |
+
<style>
|
| 23 |
+
.sidebar {
|
| 24 |
+
background: linear-gradient(180deg, #21223a 0%, #1a1b2f 100%);
|
| 25 |
+
box-shadow: 4px 0 15px rgba(0, 0, 0, 0.1);
|
| 26 |
+
}
|
| 27 |
+
.main-content {
|
| 28 |
+
background: #f8fafc;
|
| 29 |
+
}
|
| 30 |
+
.upload-area {
|
| 31 |
+
border: 2px dashed #cbd5e1;
|
| 32 |
+
transition: all 0.3s ease;
|
| 33 |
+
}
|
| 34 |
+
.upload-area:hover {
|
| 35 |
+
border-color: #ff580f;
|
| 36 |
+
background-color: #fef2f2;
|
| 37 |
+
}
|
| 38 |
+
.btn-primary {
|
| 39 |
+
background: linear-gradient(45deg, #21223a, #2d3250);
|
| 40 |
+
transition: all 0.3s ease;
|
| 41 |
+
}
|
| 42 |
+
.btn-primary:hover {
|
| 43 |
+
background: linear-gradient(45deg, #2d3250, #21223a);
|
| 44 |
+
transform: translateY(-2px);
|
| 45 |
+
box-shadow: 0 4px 12px rgba(33, 34, 58, 0.3);
|
| 46 |
+
}
|
| 47 |
+
.btn-secondary {
|
| 48 |
+
background: linear-gradient(45deg, #ff580f, #ff7b3a);
|
| 49 |
+
transition: all 0.3s ease;
|
| 50 |
+
}
|
| 51 |
+
.btn-secondary:hover {
|
| 52 |
+
background: linear-gradient(45deg, #ff7b3a, #ff580f);
|
| 53 |
+
transform: translateY(-2px);
|
| 54 |
+
box-shadow: 0 4px 12px rgba(255, 88, 15, 0.3);
|
| 55 |
+
}
|
| 56 |
+
.preview-frame {
|
| 57 |
+
border: 1px solid #e2e8f0;
|
| 58 |
+
background: white;
|
| 59 |
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
| 60 |
+
}
|
| 61 |
+
.code-container {
|
| 62 |
+
background: #1e1e1e;
|
| 63 |
+
color: #d4d4d4;
|
| 64 |
+
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
|
| 65 |
+
}
|
| 66 |
+
</style>
|
| 67 |
+
</head>
|
| 68 |
+
<body class="flex h-screen bg-gray-100">
|
| 69 |
+
<!-- Sidebar -->
|
| 70 |
+
<div class="sidebar w-80 flex flex-col h-full text-white">
|
| 71 |
+
<div class="p-6 border-b border-gray-700">
|
| 72 |
+
<div class="flex items-center space-x-3">
|
| 73 |
+
<i data-feather="code" class="text-secondary w-8 h-8"></i>
|
| 74 |
+
<h1 class="text-2xl font-bold">VisualAge2HTML</h1>
|
| 75 |
+
</div>
|
| 76 |
+
<p class="text-gray-400 text-sm mt-2">Converta arquivos .esf para HTML</p>
|
| 77 |
+
</div>
|
| 78 |
+
|
| 79 |
+
<div class="p-6 flex-1 overflow-y-auto">
|
| 80 |
+
<div class="mb-6">
|
| 81 |
+
<label class="block text-sm font-medium text-gray-300 mb-2">
|
| 82 |
+
<i data-feather="upload" class="w-4 h-4 inline mr-2"></i>
|
| 83 |
+
Upload do Arquivo .esf
|
| 84 |
+
</label>
|
| 85 |
+
<div class="upload-area rounded-lg p-6 text-center cursor-pointer mb-4">
|
| 86 |
+
<input type="file" id="fileUpload" accept=".esf" class="hidden">
|
| 87 |
+
<i data-feather="file-plus" class="w-12 h-12 text-gray-400 mx-auto mb-3"></i>
|
| 88 |
+
<p class="text-gray-400 text-sm">Arraste e solte ou clique para selecionar</p>
|
| 89 |
+
<p class="text-xs text-gray-500 mt-1">Apenas arquivos .esf são aceitos</p>
|
| 90 |
+
</div>
|
| 91 |
+
<div id="fileInfo" class="hidden bg-gray-800 rounded-lg p-3">
|
| 92 |
+
<div class="flex items-center justify-between">
|
| 93 |
+
<div class="flex items-center">
|
| 94 |
+
<i data-feather="file-text" class="w-5 h-5 text-secondary mr-2"></i>
|
| 95 |
+
<span class="text-sm" id="fileName">arquivo.esf</span>
|
| 96 |
+
</div>
|
| 97 |
+
<button onclick="removeFile()" class="text-red-400 hover:text-red-300">
|
| 98 |
+
<i data-feather="x" class="w-4 h-4"></i>
|
| 99 |
+
</button>
|
| 100 |
+
</div>
|
| 101 |
+
</div>
|
| 102 |
+
</div>
|
| 103 |
+
|
| 104 |
+
<div class="mb-6">
|
| 105 |
+
<label class="block text-sm font-medium text-gray-300 mb-2">
|
| 106 |
+
<i data-feather="cpu" class="w-4 h-4 inline mr-2"></i>
|
| 107 |
+
Configurações do LLM
|
| 108 |
+
</label>
|
| 109 |
+
<select class="w-full bg-gray-800 border border-gray-700 rounded-lg px-3 py-2 text-white text-sm mb-3">
|
| 110 |
+
<option value="gpt-4">GPT-4</option>
|
| 111 |
+
<option value="gpt-3.5">GPT-3.5 Turbo</option>
|
| 112 |
+
<option value="claude">Claude 2</option>
|
| 113 |
+
<option value="llama">Llama 2</option>
|
| 114 |
+
</select>
|
| 115 |
+
|
| 116 |
+
<label class="block text-sm font-medium text-gray-300 mb-2 mt-4">Temperatura</label>
|
| 117 |
+
<input type="range" min="0" max="1" step="0.1" value="0.7"
|
| 118 |
+
class="w-full accent-secondary">
|
| 119 |
+
<div class="flex justify-between text-xs text-gray-400">
|
| 120 |
+
<span>0 (Preciso)</span>
|
| 121 |
+
<span>0.7</span>
|
| 122 |
+
<span>1 (Criativo)</span>
|
| 123 |
+
</div>
|
| 124 |
+
</div>
|
| 125 |
+
|
| 126 |
+
<div class="mb-6">
|
| 127 |
+
<label class="block text-sm font-medium text-gray-300 mb-2">
|
| 128 |
+
<i data-feather="edit-3" class="w-4 h-4 inline mr-2"></i>
|
| 129 |
+
Critérios de Conversão
|
| 130 |
+
</label>
|
| 131 |
+
<textarea
|
| 132 |
+
placeholder="Ex: Use TailwindCSS, componentes responsivos, animações suaves..."
|
| 133 |
+
class="w-full bg-gray-800 border border-gray-700 rounded-lg px-3 py-2 text-white text-sm h-24 resize-none"
|
| 134 |
+
></textarea>
|
| 135 |
+
</div>
|
| 136 |
+
|
| 137 |
+
<button class="btn-secondary w-full py-3 rounded-lg font-semibold text-white flex items-center justify-center">
|
| 138 |
+
<i data-feather="play" class="w-5 h-5 mr-2"></i>
|
| 139 |
+
Converter para HTML
|
| 140 |
+
</button>
|
| 141 |
+
</div>
|
| 142 |
+
|
| 143 |
+
<div class="p-4 border-t border-gray-700">
|
| 144 |
+
<div class="flex items-center justify-between text-xs text-gray-400">
|
| 145 |
+
<span>Status: <span class="text-green-400">Pronto</span></span>
|
| 146 |
+
<span>v1.0.0</span>
|
| 147 |
+
</div>
|
| 148 |
+
</div>
|
| 149 |
+
</div>
|
| 150 |
+
|
| 151 |
+
<!-- Main Content -->
|
| 152 |
+
<div class="main-content flex-1 flex flex-col overflow-hidden">
|
| 153 |
+
<div class="border-b border-gray-200 px-6 py-4">
|
| 154 |
+
<h2 class="text-xl font-semibold text-gray-800">Visualização & Resultado</h2>
|
| 155 |
+
</div>
|
| 156 |
+
|
| 157 |
+
<div class="flex-1 grid grid-cols-2 gap-6 p-6 overflow-y-auto">
|
| 158 |
+
<!-- Visual Age Emulation -->
|
| 159 |
+
<div class="bg-white rounded-lg shadow-sm p-4">
|
| 160 |
+
<div class="flex items-center justify-between mb-4">
|
| 161 |
+
<h3 class="font-semibold text-gray-700 flex items-center">
|
| 162 |
+
<i data-feather="monitor" class="w-4 h-4 mr-2 text-primary"></i>
|
| 163 |
+
Visual Age Emulado
|
| 164 |
+
</h3>
|
| 165 |
+
<div class="flex space-x-2">
|
| 166 |
+
<button class="p-1 text-gray-400 hover:text-gray-600">
|
| 167 |
+
<i data-feather="refresh-cw" class="w-4 h-4"></i>
|
| 168 |
+
</button>
|
| 169 |
+
<button class="p-1 text-gray-400 hover:text-gray-600">
|
| 170 |
+
<i data-feather="maximize" class="w-4 h-4"></i>
|
| 171 |
+
</button>
|
| 172 |
+
</div>
|
| 173 |
+
</div>
|
| 174 |
+
<div class="preview-frame rounded-lg p-4 h-96 overflow-auto">
|
| 175 |
+
<div class="text-center text-gray-500 py-16">
|
| 176 |
+
<i data-feather="image" class="w-12 h-12 mx-auto mb-3 opacity-50"></i>
|
| 177 |
+
<p>Selecione um arquivo .esf para visualizar</p>
|
| 178 |
+
</div>
|
| 179 |
+
</div>
|
| 180 |
+
</div>
|
| 181 |
+
|
| 182 |
+
<!-- HTML Output -->
|
| 183 |
+
<div class="bg-white rounded-lg shadow-sm p-4">
|
| 184 |
+
<div class="flex items-center justify-between mb-4">
|
| 185 |
+
<h3 class="font-semibold text-gray-700 flex items-center">
|
| 186 |
+
<i data-feather="code" class="w-4 h-4 mr-2 text-secondary"></i>
|
| 187 |
+
HTML Gerado
|
| 188 |
+
</h3>
|
| 189 |
+
<div class="flex space-x-2">
|
| 190 |
+
<button class="p-1 text-gray-400 hover:text-gray-600">
|
| 191 |
+
<i data-feather="copy" class="w-4 h-4"></i>
|
| 192 |
+
</button>
|
| 193 |
+
<button class="p-1 text-gray-400 hover:text-gray-600">
|
| 194 |
+
<i data-feather="download" class="w-4 h-4"></i>
|
| 195 |
+
</button>
|
| 196 |
+
</div>
|
| 197 |
+
</div>
|
| 198 |
+
<div class="code-container rounded-lg p-4 h-96 overflow-auto">
|
| 199 |
+
<pre class="text-sm"><code class="language-html"><!-- HTML será gerado aqui após a conversão --></code></pre>
|
| 200 |
+
</div>
|
| 201 |
+
</div>
|
| 202 |
+
</div>
|
| 203 |
+
|
| 204 |
+
<div class="border-t border-gray-200 px-6 py-4">
|
| 205 |
+
<div class="flex items-center justify-between">
|
| 206 |
+
<div class="text-sm text-gray-600">
|
| 207 |
+
<i data-feather="info" class="w-4 h-4 inline mr-1"></i>
|
| 208 |
+
Pronto para converter seu arquivo Visual Age
|
| 209 |
+
</div>
|
| 210 |
+
<div class="flex space-x-3">
|
| 211 |
+
<button class="px-4 py-2 border border-gray-300 rounded-lg text-sm text-gray-700 hover:bg-gray-50">
|
| 212 |
+
Limpar
|
| 213 |
+
</button>
|
| 214 |
+
<button class="btn-primary px-4 py-2 rounded-lg text-sm text-white">
|
| 215 |
+
Exportar Projeto
|
| 216 |
+
</button>
|
| 217 |
+
</div>
|
| 218 |
+
</div>
|
| 219 |
+
</div>
|
| 220 |
+
</div>
|
| 221 |
+
|
| 222 |
+
<script>
|
| 223 |
+
feather.replace();
|
| 224 |
+
|
| 225 |
+
const uploadArea = document.querySelector('.upload-area');
|
| 226 |
+
const fileInput = document.getElementById('fileUpload');
|
| 227 |
+
const fileInfo = document.getElementById('fileInfo');
|
| 228 |
+
const fileName = document.getElementById('fileName');
|
| 229 |
+
|
| 230 |
+
uploadArea.addEventListener('click', () => fileInput.click());
|
| 231 |
+
|
| 232 |
+
uploadArea.addEventListener('dragover', (e) => {
|
| 233 |
+
e.preventDefault();
|
| 234 |
+
uploadArea.classList.add('border-secondary', 'bg-red-50');
|
| 235 |
+
});
|
| 236 |
+
|
| 237 |
+
uploadArea.addEventListener('dragleave', () => {
|
| 238 |
+
uploadArea.classList.remove('border-secondary', 'bg-red-50');
|
| 239 |
+
});
|
| 240 |
+
|
| 241 |
+
uploadArea.addEventListener('drop', (e) => {
|
| 242 |
+
e.preventDefault();
|
| 243 |
+
uploadArea.classList.remove('border-secondary', 'bg-red-50');
|
| 244 |
+
|
| 245 |
+
const files = e.dataTransfer.files;
|
| 246 |
+
if (files.length > 0 && files[0].name.endsWith('.esf')) {
|
| 247 |
+
handleFile(files[0]);
|
| 248 |
+
}
|
| 249 |
+
});
|
| 250 |
+
|
| 251 |
+
fileInput.addEventListener('change', (e) => {
|
| 252 |
+
if (e.target.files.length > 0 && e.target.files[0].name.endsWith('.esf')) {
|
| 253 |
+
handleFile(e.target.files[0]);
|
| 254 |
+
}
|
| 255 |
+
});
|
| 256 |
+
|
| 257 |
+
function handleFile(file) {
|
| 258 |
+
fileName.textContent = file.name;
|
| 259 |
+
fileInfo.classList.remove('hidden');
|
| 260 |
+
// Simular processamento do arquivo .esf
|
| 261 |
+
simulateVisualAgePreview();
|
| 262 |
+
}
|
| 263 |
+
|
| 264 |
+
function removeFile() {
|
| 265 |
+
fileInfo.classList.add('hidden');
|
| 266 |
+
fileInput.value = '';
|
| 267 |
+
// Limpar previews
|
| 268 |
+
document.querySelector('.preview-frame').innerHTML = `
|
| 269 |
+
<div class="text-center text-gray-500 py-16">
|
| 270 |
+
<i data-feather="image" class="w-12 h-12 mx-auto mb-3 opacity-50"></i>
|
| 271 |
+
<p>Selecione um arquivo .esf para visualizar</p>
|
| 272 |
+
</div>
|
| 273 |
+
`;
|
| 274 |
+
feather.replace();
|
| 275 |
+
}
|
| 276 |
+
|
| 277 |
+
function simulateVisualAgePreview() {
|
| 278 |
+
// Simulação de preview do Visual Age
|
| 279 |
+
const previewFrame = document.querySelector('.preview-frame');
|
| 280 |
+
previewFrame.innerHTML = `
|
| 281 |
+
<div class="bg-blue-50 p-4 rounded">
|
| 282 |
+
<div class="bg-white border rounded p-4 mb-4">
|
| 283 |
+
<h4 class="font-bold text-blue-800 mb-2">Formulário Simulado</h4>
|
| 284 |
+
<div class="space-y-3">
|
| 285 |
+
<div>
|
| 286 |
+
<label class="block text-sm text-gray-700 mb-1">Nome:</label>
|
| 287 |
+
<input type="text" class="border rounded px-2 py-1 w-full" style="border-color: #ccc;">
|
| 288 |
+
</div>
|
| 289 |
+
<div>
|
| 290 |
+
<label class="block text-sm text-gray-700 mb-1">Email:</label>
|
| 291 |
+
<input type="email" class="border rounded px-2 py-1 w-full" style="border-color: #ccc;">
|
| 292 |
+
</div>
|
| 293 |
+
<button class="bg-blue-600 text-white px-4 py-1 rounded text-sm">Enviar</button>
|
| 294 |
+
</div>
|
| 295 |
+
</div>
|
| 296 |
+
<p class="text-xs text-gray-600">Visual Age interface emulada</p>
|
| 297 |
+
</div>
|
| 298 |
+
`;
|
| 299 |
+
}
|
| 300 |
+
</script>
|
| 301 |
+
</body>
|
| 302 |
</html>
|