pyfedi/app/templates/post/post_reply_edit.html

43 lines
1.7 KiB
HTML

{% if theme() and file_exists('app/templates/themes/' + theme() + '/base.html') %}
{% extends 'themes/' + theme() + '/base.html' %}
{% else %}
{% extends "base.html" %}
{% endif %} %}
{% from 'bootstrap/form.html' import render_form %}
{% block app_content %}
<script src="/static/js/coolfieldset.js"></script>
<div class="row">
<div class="col-12 col-md-8 position-relative add_reply main_pane">
<fieldset class="coolfieldset mt-4"><legend class="w-auto">Original post</legend>
<h3>{{ post.title }}</h3>
{{ post.body_html|safe if post.body_html }}
</fieldset>
{% if comment %}
<fieldset class="coolfieldset mt-4"><legend class="w-auto">Comment you are replying to</legend>
{{ comment.body_html|safe }}
</fieldset>
{% endif %}
<div class="position-relative">
{{ render_form(form) }}
{% if markdown_editor %}
<script nonce="{{ session['nonce'] }}">
window.addEventListener("load", function () {
var downarea = new DownArea({
elem: document.querySelector('#body'),
resize: DownArea.RESIZE_VERTICAL,
hide: ['heading', 'bold-italic'],
value: {{ form.body.data | tojson | safe }}
});
setupAutoResize('body');
});
</script>
{% endif %}
</div>
</div>
{% with community = post.community -%}
{% include "_side_pane.html" %}
{% endwith -%}
</div>
{% endblock %}