{% extends "admin_frontend/base.html" %}
{% load crispy_forms_tags breadcrumbs %}

{% block title %}Edit Post{% endblock %}

{% block content %}
{% render_breadcrumbs breadcrumbs %}
{{ form.media }}
  <div class="bg-white rounded shadow p-4 mb-6">
    <h1 class="text-xl font-semibold mb-4">Edit Post</h1>
    <form method="post" enctype="multipart/form-data">
      {% csrf_token %}
      {% for field in form %}
        {{ field|as_crispy_field }}
      {% endfor %}
      <div class="mt-3 flex gap-3">
        <button class="px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700">Save</button>
        <a class="px-4 py-2 border rounded" href="{{ cancel_url }}">Cancel</a>
      </div>
    </form>
  </div>
{% endblock %}
