{% extends "layout.html" %}

{% set title = "New post" %}

{% block head %}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/trix/0.9.6/trix.min.css">
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/trix/0.9.6/trix.js"></script>
{% endblock %}
{% block body %}
<section class="container">
  <div class='edit-post'>
    <h2>Create new post for {{ page.name }}</h2>
    <form method="POST">
      {{ form.csrf_token }}
      <label class='title'>
        Title: {{ form.title() }}
      </label>
      {{ form.content(id="trix") }}
      <trix-editor input="trix"></trix-editor>
      <label>
        {{ form.published() }} Publish
      </label>
      {{ form.submit() }}
    </form>
  </div>
</section>

{% endblock %}

{% extends "layout.html" %}

{% set title = "Edit post" %}

{% block head %}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/trix/0.9.6/trix.min.css">
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/trix/0.9.6/trix.js"></script>
{% endblock %}
{% block body %}
<section class="container">
  <div class='edit-post'>
    {% if page %}
    <h2>Create new post at {{ page.name }}</h2>
    {% else %}
    <h2>Edit post</h2>
    {% endif %}
    <form method="POST">
      {{ form.csrf_token }}
      <label class='title'>
        Title: {{ form.title() }}
      </label>
      {{ form.content(id="trix") }}
      <trix-editor input="trix"></trix-editor>
      <label>
        {{ form.published() }} Publish
      </label>
      {{ form.submit() }}
    </form>
  </div>
</section>

{% endblock %}

Fix headers in edit mode.
Fix headers in edit mode.
