space-build / index.html
coyotte508
fix script order
aadcf2f
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<script src="https://cdn.tailwindcss.com"></script>
<!-- polyfill for firefox + import maps -->
<script src="https://unpkg.com/[email protected]/dist/es-module-shims.js"></script>
<script type="importmap">
{
"imports": {
"@microsoft/fetch-event-source": "https://cdn.jsdelivr.net/npm/@microsoft/[email protected]/+esm"
}
}
</script>
<script type="module" src="./app.js"></script>
</head>
<body>
<div class="container mx-auto pt-8 flex flex-col gap-4">
<form id="build-form" class="flex flex-col gap-4">
<input
id="hf-token"
type="text"
placeholder="hf_..."
required
class="border rounded p-2"
/>
<input
id="space-name"
type="text"
placeholder="Space Name"
required
class="border rounded p-2"
/>
<p class="text-sm text-gray-500">
You can duplicate an example space at
<a
href="https://huggingface.co/spaces/coyotte508/static-vite?duplicate=true"
target="_blank"
class="text-blue-500 hover:underline"
>
https://huggingface.co/spaces/coyotte508/static-vite?duplicate=true
</a>
</p>
<input
id="build-command"
type="text"
value="npm run build"
required
class="border rounded p-2"
/>
<input
id="output-path"
type="text"
value="dist/index.html"
required
class="border rounded p-2"
/>
<button
type="submit"
class="bg-blue-500 text-white rounded p-2 hover:bg-blue-600 self-start"
>
Submit
</button>
</form>
<p>Output</p>
<pre
id="output"
style="max-height: 400px; height: 400px; overflow: auto"
class="bg-slate-50 rounded p-2"
></pre>
<p>Job logs</p>
<pre
id="log-output"
style="max-height: 400px; height: 400px; overflow: auto"
class="bg-slate-50 rounded p-2"
></pre>
<p>Job events</p>
<pre
id="event-output"
style="max-height: 400px; height: 400px; overflow: auto"
class="bg-slate-50 rounded p-2"
></pre>
</div>
</body>
</html>