2024-02-07 17:31:12 +13:00
{% if theme() and file_exists('app/templates/themes/' + theme() + '/base.html') %}
{% extends 'themes/' + theme() + '/base.html' %}
{% else %}
{% extends "base.html" %}
{% endif %} %}
2023-10-15 21:13:32 +13:00
{% from 'bootstrap/form.html' import render_form %}
{% block app_content %}
< script src = "/static/js/coolfieldset.js" > < / script >
< div class = "row" >
2023-11-09 21:32:29 +13:00
< div class = "col-12 col-md-8 position-relative add_reply main_pane" >
2023-10-15 21:13:32 +13:00
< fieldset class = "coolfieldset mt-4" > < legend class = "w-auto" > Original post< / legend >
< h3 > {{ post.title }}< / h3 >
2024-02-26 21:26:19 +13:00
{{ post.body_html | safe if post.body_html else '' }}
2023-10-15 21:13:32 +13:00
< / fieldset >
< fieldset class = "coolfieldset mt-4" > < legend class = "w-auto" > Comment you are replying to< / legend >
{{ comment.body_html | safe}}
< / fieldset >
2023-11-30 23:21:37 +13:00
< div class = "position-relative" >
2024-01-10 17:27:07 +13:00
{% if post.community.ap_id and '@beehaw.org' in post.community.ap_id %}
< p > {{ _('This post is hosted on beehaw.org which has < a href = "https://docs.beehaw.org/docs/core-principles/what-is-beehaw/" target = "_blank" rel = "nofollow" > higher standards of behaviour than most places. Be nice< / a > .') }}< / p >
{% endif %}
2023-11-30 23:21:37 +13:00
{{ render_form(form) }}
2024-02-28 20:12:57 +13:00
{% if not low_bandwidth %}
{% 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'],
});
setupAutoResize('body');
2023-12-26 10:49:08 +13:00
});
2024-02-28 20:12:57 +13:00
< / script >
{% else %}
2024-05-14 20:53:05 +01:00
<!-- <a href="#" aria - hidden="true" id="post_reply_markdown_editor_enabler" class="markdown_editor_enabler" data - id="body">{{ _('Enable markdown editor') }}</a> -->
2024-02-28 20:12:57 +13:00
{% endif %}
2023-12-26 10:49:08 +13:00
{% endif %}
2023-11-30 23:21:37 +13:00
< / div >
2023-10-15 21:13:32 +13:00
< / div >
2024-02-05 08:39:08 +13:00
< aside id = "side_pane" class = "col-12 col-md-4 side_pane" role = "complementary" >
2023-10-15 21:13:32 +13:00
< div class = "card" >
< div class = "card-body" >
< div class = "row" >
< div class = "col-6" >
2023-12-03 22:41:15 +13:00
{% if current_user.is_authenticated and community_membership(current_user, post.community) %}
2024-01-16 15:38:56 +13:00
< a class = "w-100 btn btn-primary" href = "/community/{{ post.community.link() }}/unsubscribe" rel = "nofollow" > {{ _('Leave') }}< / a >
2023-10-15 21:13:32 +13:00
{% else %}
2024-01-16 15:38:56 +13:00
< a class = "w-100 btn btn-primary" href = "/community/{{ post.community.link() }}/subscribe" rel = "nofollow" > {{ _('Join') }}< / a >
2023-10-15 21:13:32 +13:00
{% endif %}
< / div >
2024-04-15 12:54:27 +01:00
{% if not community.restricted_to_mods or (community.restricted_to_mods and current_user.is_authenticated and community_membership(current_user, community) in [SUBSCRIPTION_MODERATOR, SUBSCRIPTION_OWNER]) %}
< div class = "col-6" >
< a class = "w-100 btn btn-primary" href = "/community/{{ post.community.link() }}/submit" > {{ _('Create post') }}< / a >
< / div >
{% endif %}
2023-10-15 21:13:32 +13:00
< / div >
2024-05-09 20:00:22 +12:00
< form method = "get" action = "/search" >
< input type = "search" name = "q" class = "form-control mt-2" placeholder = "{{ _('Search this community') }}" / >
< input type = "hidden" name = "community" value = "{{ post.community.id }}" >
< / form >
2023-10-15 21:13:32 +13:00
< / div >
< / div >
< div class = "card mt-3" >
< div class = "card-header" >
< h2 > {{ _('About community') }}< / h2 >
< / div >
< div class = "card-body" >
2024-01-03 16:29:58 +13:00
< p > {{ post.community.description_html|safe if post.community.description_html else '' }}< / p >
< p > {{ post.community.rules_html|safe if post.community.rules_html else '' }}< / p >
2023-10-15 21:13:32 +13:00
{% if len(mods) > 0 and not post.community.private_mods %}
< h3 > Moderators< / h3 >
2024-01-03 16:29:58 +13:00
< ul class = "moderator_list" >
2023-10-15 21:13:32 +13:00
{% for mod in mods %}
2024-01-09 20:44:08 +13:00
< li > < a href = "/u/{{ mod.link() }}" > {{ mod.display_name() }}< / a > < / li >
2023-10-15 21:13:32 +13:00
{% endfor %}
2024-01-03 16:29:58 +13:00
< / ul >
2023-10-15 21:13:32 +13:00
{% endif %}
< / div >
< / div >
{% if is_moderator %}
< div class = "card mt-3" >
< div class = "card-header" >
< h2 > {{ _('Community Settings') }}< / h2 >
< / div >
< div class = "card-body" >
2024-03-26 22:18:05 +13:00
{% if is_moderator or is_owner or is_admin %}
2024-03-28 10:02:16 +13:00
< p > < a href = "/community/{{ post.community.link() }}/moderate" class = "btn btn-primary" > {{ _('Moderate') }}< / a > < / p >
2024-03-26 22:18:05 +13:00
{% endif %}
{% if is_owner or is_admin %}
< p > < a href = "{{ url_for('community.community_edit', community_id=community.id) }}" class = "btn btn-primary" > {{ _('Settings') }}< / a > < / p >
{% endif %}
2024-03-28 10:02:16 +13:00
{% if post.community.is_local() and (post.community.is_owner() or current_user.is_admin()) %}
< p > < a class = "btn btn-primary btn-warning" href = "{{ url_for('community.community_delete', community_id=post.community.id) }}" rel = "nofollow" > Delete community< / a > < / p >
2024-03-26 22:18:05 +13:00
{% endif %}
2023-10-15 21:13:32 +13:00
< / div >
< / div >
{% endif %}
2024-01-19 15:08:39 +13:00
{% include "_inoculation_links.html" %}
2024-01-28 21:38:04 +13:00
< / aside >
2023-10-15 21:13:32 +13:00
< / div >
{% endblock %}