Plume/templates/posts/new.html.tera

26 lines
811 B
Plaintext

{% extends "base" %}
{% import "macros" as macros %}
{% block title %}
{{ "New post" | _ }}
{% endblock title %}
{% block content %}
<h1>{{ "Create a post" | _ }}</h1>
<form class="new-post" method="post">
{{ macros::input(name="title", label="Title", errors=errors, form=form) }}
{% if errors is defined and errors.content %}
{% for err in errors.content %}
<p class="error">{{ err.message | default(value="Unknown error") | _ }}</p>
{% endfor %}
{% endif %}
<textarea id="content" name="content" placeholder="{{ "Content" | _ }}" value="{{ form.content | default(value="") }}"></textarea>
{{ macros::input(name="license", label="License", errors=errors, form=form) }}
<input type="submit" value="{{ "Publish" | _ }}" />
</form>
{% endblock content %}