{% extends "base.html" %}

{% load crispy_forms_tags %}

{% block content %}
  <section class="flex justify-between">
    <h1 class="text-lg font-bold py-4">
      {% if instance %}
        Edit {{ instance }}
      {% else %}
        Create
        Something
      {% endif %}
    </h1>
    <a href="{% url 'something_list' %}"
       class="text-blue-600 hover:underline hover:text-blue-500">All Somethings</a>
  </section>
  <form method="post">
    {% csrf_token %}
    {{ form|crispy }}
    <button type="submit"
            class="cursor-pointer py-2 px-4 bg-blue-600 hover:bg-blue-700 focus:ring-blue-500 focus:ring-offset-blue-200 text-white text-center text-base font-semibold focus:outline-none focus:ring-2 focus:ring-offset-2  rounded-lg">
      Save
    </button>
  </form>
{% endblock content %}
