This repository has been archived on 2024-10-26. You can view files and clone it, but cannot push or open issues or pull requests.
staxman-old/templates/stack/new-form.html
Hamcha 6a77270e5b
Some checks failed
continuous-integration/drone Build is passing
continuous-integration/drone/push Build is failing
fix: pass correct editor to pre-submit check
2024-03-30 18:43:38 +01:00

41 lines
No EOL
878 B
HTML

{% extends "base.html" %}
{% block title %}New stack{% endblock %}
{% block content %}
<main>
<header>
<h1>New stack</h1>
</header>
<section class="editor">
<form method="POST" id="editor-form">
<div class="error"></div>
<textarea name="source" id="editor" required>{}</textarea>
<div class="row">
<button type="submit">Create & Deploy</button>
</div>
</form>
</section>
</main>
<link rel="stylesheet" href="/static/css/editor.css" />
<style scoped>
main {
display: flex;
flex-direction: column;
gap: 1rem;
}
</style>
<script type="module">
import Editor from "/static/scripts/ace.mjs";
import { add_check } from "/static/scripts/enhancements/check.js";
const editor = new Editor("editor");
/* Enforce check pre-submit */
const form = document.getElementById("editor-form");
add_check(form, editor.editor);
</script>
{% endblock %}