1.1 KiB · text History 2264215
{% extends "root.html" %}

{% block inner %}
<div class="space-y-4 text-left max-w-2xl">
  <div class="text-sm opacity-70">
    <a href="/t/{{ post.topic_id }}#post-{{ post.post_number }}" class="link link-hover">&larr; Back to post #{{ post.post_number }}</a>
  </div>

  <h1 class="text-2xl font-bold">Edit post</h1>

  <form class="card bg-base-200 border border-base-300 p-4 space-y-3"
        method="post" action="/p/{{ post.id }}">
    <textarea name="body" rows="10" required
              class="textarea textarea-bordered w-full font-mono text-sm">{{ post.raw }}</textarea>
    <div class="flex justify-end gap-2">
      <a href="/t/{{ post.topic_id }}#post-{{ post.post_number }}" class="btn btn-ghost btn-sm">Cancel</a>
      <button type="submit" class="btn btn-primary btn-sm">
        <i class="fas fa-floppy-disk mr-1"></i> Save edit
      </button>
    </div>
  </form>

  <p class="text-xs opacity-60">
    Previous versions are kept and shown in this post's
    <a href="/p/{{ post.id }}/history" class="link">edit history</a>.
  </p>
</div>
{% endblock %}