mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
91 lines
No EOL
3.8 KiB
HTML
91 lines
No EOL
3.8 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_field %}
|
|
|
|
{% block app_content %}
|
|
<div class="row">
|
|
<div class="col-12 col-md-8 position-relative main_pane">
|
|
<h1>{{ _('Create post') }}</h1>
|
|
<form method="post" enctype="multipart/form-data" role="form">
|
|
{{ form.csrf_token() }}
|
|
<div class="form-group">
|
|
<label class="form-control-label" for="type_of_post">
|
|
{{ _('Type of post') }}
|
|
</label>
|
|
{% include 'community/_add_post_types.html' %}
|
|
</div>
|
|
|
|
{{ render_field(form.communities) }}
|
|
{{ render_field(form.discussion_title) }}
|
|
{{ render_field(form.discussion_body) }}
|
|
{% if not low_bandwidth %}
|
|
{% if markdown_editor %}
|
|
<script nonce="{{ session['nonce'] }}">
|
|
window.addEventListener("load", function () {
|
|
var downarea = new DownArea({
|
|
elem: document.querySelector('#discussion_body'),
|
|
resize: DownArea.RESIZE_VERTICAL,
|
|
hide: ['heading', 'bold-italic'],
|
|
});
|
|
setupAutoResize('discussion_body');
|
|
});
|
|
</script>
|
|
{% else %}
|
|
<a href="#" aria-hidden="true" class="markdown_editor_enabler create_post_markdown_editor_enabler" data-id="discussion_body">{{ _('Enable markdown editor') }}</a>
|
|
{% endif %}
|
|
{% endif %}
|
|
{{ render_field(form.tags) }}
|
|
<small class="field_hint">{{ _('Separate each tag with a comma.') }}</small>
|
|
|
|
<div class="row mt-4">
|
|
<div class="col-md-3">
|
|
{{ render_field(form.notify_author) }}
|
|
</div>
|
|
<div class="col-md-1">
|
|
{{ render_field(form.sticky) }}
|
|
</div>
|
|
<div class="col-md-1">
|
|
{{ render_field(form.nsfw) }}
|
|
</div>
|
|
<div class="col-md-1">
|
|
{{ render_field(form.nsfl) }}
|
|
</div>
|
|
<div class="col post_language_chooser">
|
|
{{ render_field(form.language_id) }}
|
|
</div>
|
|
</div>
|
|
|
|
{{ render_field(form.submit) }}
|
|
</form>
|
|
</div>
|
|
|
|
<aside id="side_pane" class="col-12 col-md-4 side_pane" role="complementary">
|
|
<div class="card mb-3">
|
|
<div class="card-header">
|
|
<h2>{{ community.title }}</h2>
|
|
</div>
|
|
<div class="card-body">
|
|
<p>{{ community.description_html|safe if community.description_html else '' }}</p>
|
|
<p>{{ community.rules_html|safe if community.rules_html else '' }}</p>
|
|
{% if len(mods) > 0 and not community.private_mods %}
|
|
<h3>Moderators</h3>
|
|
<ul class="moderator_list">
|
|
{% for mod in mods %}
|
|
<li>{{ render_username(mod) }}</li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% endif %}
|
|
{% if rss_feed %}
|
|
<p class="mt-4">
|
|
<a class="no-underline" href="{{ rss_feed }}" rel="nofollow"><span class="fe fe-rss"></span> RSS feed</a>
|
|
</p>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
{% include "_inoculation_links.html" %}
|
|
</aside>
|
|
</div>
|
|
{% endblock %} |