Spaces:
Running
Running
make it operational
Browse files- index.html +85 -21
index.html
CHANGED
|
@@ -82,10 +82,10 @@
|
|
| 82 |
The easiest way to convert your Python scripts into fully functional Android applications. No Java/Kotlin required.
|
| 83 |
</p>
|
| 84 |
<div class="flex flex-wrap gap-4">
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
See Demo
|
| 90 |
</button>
|
| 91 |
</div>
|
|
@@ -97,25 +97,43 @@
|
|
| 97 |
<div class="w-3 h-3 rounded-full bg-yellow-500"></div>
|
| 98 |
<div class="w-3 h-3 rounded-full bg-green-500"></div>
|
| 99 |
</div>
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 110 |
</div>
|
| 111 |
-
<div class="mt-4
|
| 112 |
-
<
|
| 113 |
-
<button class="flex items-center bg-primary-500 text-white px-4 py-2 rounded-md text-sm">
|
| 114 |
<i data-feather="download" class="mr-2 h-4 w-4"></i>
|
| 115 |
-
|
| 116 |
-
</
|
| 117 |
</div>
|
| 118 |
</div>
|
|
|
|
| 119 |
<div class="absolute -bottom-6 -right-6 bg-white p-2 rounded-full shadow-lg">
|
| 120 |
<div class="bg-secondary-500 p-3 rounded-full">
|
| 121 |
<i data-feather="arrow-right" class="text-white h-6 w-6"></i>
|
|
@@ -308,10 +326,56 @@ MyApp().run()</code></pre>
|
|
| 308 |
</div>
|
| 309 |
</div>
|
| 310 |
</footer>
|
| 311 |
-
|
| 312 |
<script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 313 |
// Initialize Vanta.js background
|
| 314 |
-
|
| 315 |
el: "#vanta-bg",
|
| 316 |
mouseControls: true,
|
| 317 |
touchControls: true,
|
|
|
|
| 82 |
The easiest way to convert your Python scripts into fully functional Android applications. No Java/Kotlin required.
|
| 83 |
</p>
|
| 84 |
<div class="flex flex-wrap gap-4">
|
| 85 |
+
<a href="#uploadForm" class="bg-gradient-to-r from-primary-500 to-secondary-500 text-white px-6 py-3 rounded-lg font-medium hover:shadow-lg transition-all">
|
| 86 |
+
Try It Now
|
| 87 |
+
</a>
|
| 88 |
+
<button class="border-2 border-primary-500 text-primary-500 px-6 py-3 rounded-lg font-medium hover:bg-primary-50 transition-all">
|
| 89 |
See Demo
|
| 90 |
</button>
|
| 91 |
</div>
|
|
|
|
| 97 |
<div class="w-3 h-3 rounded-full bg-yellow-500"></div>
|
| 98 |
<div class="w-3 h-3 rounded-full bg-green-500"></div>
|
| 99 |
</div>
|
| 100 |
+
<div class="code-block p-4 text-white">
|
| 101 |
+
<form id="uploadForm" enctype="multipart/form-data">
|
| 102 |
+
<div class="mb-4">
|
| 103 |
+
<label class="block text-gray-300 text-sm mb-2" for="pythonFile">
|
| 104 |
+
Upload Python File
|
| 105 |
+
</label>
|
| 106 |
+
<input type="file" id="pythonFile" name="pythonFile" accept=".py"
|
| 107 |
+
class="w-full px-3 py-2 bg-gray-800 border border-gray-700 rounded-md text-white">
|
| 108 |
+
</div>
|
| 109 |
+
<div class="mb-4">
|
| 110 |
+
<label class="block text-gray-300 text-sm mb-2" for="appName">
|
| 111 |
+
App Name
|
| 112 |
+
</label>
|
| 113 |
+
<input type="text" id="appName" name="appName" placeholder="My Python App"
|
| 114 |
+
class="w-full px-3 py-2 bg-gray-800 border border-gray-700 rounded-md text-white">
|
| 115 |
+
</div>
|
| 116 |
+
<div class="flex justify-end">
|
| 117 |
+
<button type="submit" class="flex items-center bg-primary-500 hover:bg-primary-600 text-white px-4 py-2 rounded-md text-sm transition-colors">
|
| 118 |
+
<i data-feather="upload" class="mr-2 h-4 w-4"></i>
|
| 119 |
+
Convert to APK
|
| 120 |
+
</button>
|
| 121 |
+
</div>
|
| 122 |
+
</form>
|
| 123 |
+
</div>
|
| 124 |
+
<div id="resultContainer" class="hidden mt-4 p-4 bg-gray-800 rounded-md">
|
| 125 |
+
<div id="conversionStatus" class="flex items-center">
|
| 126 |
+
<i data-feather="loader" class="animate-spin mr-2 text-yellow-500"></i>
|
| 127 |
+
<span>Converting your Python file...</span>
|
| 128 |
</div>
|
| 129 |
+
<div id="downloadBtn" class="hidden mt-4">
|
| 130 |
+
<a href="#" class="flex items-center justify-center bg-green-500 hover:bg-green-600 text-white px-4 py-2 rounded-md text-sm transition-colors">
|
|
|
|
| 131 |
<i data-feather="download" class="mr-2 h-4 w-4"></i>
|
| 132 |
+
Download APK
|
| 133 |
+
</a>
|
| 134 |
</div>
|
| 135 |
</div>
|
| 136 |
+
</div>
|
| 137 |
<div class="absolute -bottom-6 -right-6 bg-white p-2 rounded-full shadow-lg">
|
| 138 |
<div class="bg-secondary-500 p-3 rounded-full">
|
| 139 |
<i data-feather="arrow-right" class="text-white h-6 w-6"></i>
|
|
|
|
| 326 |
</div>
|
| 327 |
</div>
|
| 328 |
</footer>
|
|
|
|
| 329 |
<script>
|
| 330 |
+
// Handle form submission
|
| 331 |
+
document.getElementById('uploadForm').addEventListener('submit', async function(e) {
|
| 332 |
+
e.preventDefault();
|
| 333 |
+
|
| 334 |
+
const formData = new FormData();
|
| 335 |
+
formData.append('pythonFile', document.getElementById('pythonFile').files[0]);
|
| 336 |
+
formData.append('appName', document.getElementById('appName').value);
|
| 337 |
+
|
| 338 |
+
const resultContainer = document.getElementById('resultContainer');
|
| 339 |
+
const conversionStatus = document.getElementById('conversionStatus');
|
| 340 |
+
const downloadBtn = document.getElementById('downloadBtn');
|
| 341 |
+
|
| 342 |
+
resultContainer.classList.remove('hidden');
|
| 343 |
+
downloadBtn.classList.add('hidden');
|
| 344 |
+
|
| 345 |
+
try {
|
| 346 |
+
// Simulate API call (replace with actual API endpoint)
|
| 347 |
+
const response = await fetch('https://api.example.com/convert', {
|
| 348 |
+
method: 'POST',
|
| 349 |
+
body: formData
|
| 350 |
+
});
|
| 351 |
+
|
| 352 |
+
if (response.ok) {
|
| 353 |
+
const data = await response.json();
|
| 354 |
+
conversionStatus.innerHTML = `
|
| 355 |
+
<i data-feather="check-circle" class="mr-2 text-green-500"></i>
|
| 356 |
+
<span>Conversion successful!</span>
|
| 357 |
+
`;
|
| 358 |
+
|
| 359 |
+
const downloadLink = document.querySelector('#downloadBtn a');
|
| 360 |
+
downloadLink.href = data.downloadUrl;
|
| 361 |
+
downloadBtn.classList.remove('hidden');
|
| 362 |
+
|
| 363 |
+
// Update feather icons
|
| 364 |
+
feather.replace();
|
| 365 |
+
} else {
|
| 366 |
+
throw new Error('Conversion failed');
|
| 367 |
+
}
|
| 368 |
+
} catch (error) {
|
| 369 |
+
conversionStatus.innerHTML = `
|
| 370 |
+
<i data-feather="x-circle" class="mr-2 text-red-500"></i>
|
| 371 |
+
<span>Error: ${error.message}</span>
|
| 372 |
+
`;
|
| 373 |
+
feather.replace();
|
| 374 |
+
}
|
| 375 |
+
});
|
| 376 |
+
|
| 377 |
// Initialize Vanta.js background
|
| 378 |
+
VANTA.WAVES({
|
| 379 |
el: "#vanta-bg",
|
| 380 |
mouseControls: true,
|
| 381 |
touchControls: true,
|