{% extends "index.html" %}
{% block content %}
<form>
<textarea name="content" x-data='editor'>{%if page %}{{ page.content }}{% endif %}</textarea>
<span>Title: </span><input name="title" type="text" {%if page %}value="{{ page.meta.title }}"{% endif %}></input>
<span>Parent: </span><input name="parent" type="text" {%if path %}value="{{ path }}"{% endif %}></input>
<br/>
<br/>
<span>Private: </span><input name="private" type="checkbox" value="true" {% if page and page.meta.private %}checked{% endif %}></input>
<span>Directory: </span><input name="directory" type="checkbox" value="true" {% if directory %}checked{% endif %}></input>
<br/>
<br/>
<input type="submit" hx-post="/commit" hx-select="#content" hx-target="#content" hx-swap="outerHTML" hx-push-url="true" hx-include="[name='content']"></input>
</form>
{% endblock content %}