2023-10-15 21:13:32 +13:00
{% extends "base.html" %}
{% 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 >
{{ post.body_html | safe }}
< / 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) }}
2023-12-26 10:49:08 +13:00
{% 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'],
});
2023-12-26 22:28:45 +13:00
setupAutoResize('body');
2023-12-26 10:49:08 +13:00
});
< / script >
{% endif %}
2023-11-30 23:21:37 +13:00
< / div >
2023-10-15 21:13:32 +13:00
< / div >
2024-01-04 22:21:31 +13:00
< div class = "col-12 col-md-4 side_pane" >
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 >
< div class = "col-6" >
< a class = "w-100 btn btn-primary" href = "/community/{{ post.community.link() }}/submit" > {{ _('Create post') }}< / a >
< / div >
< / div >
2024-01-13 22:09:02 +13:00
<!-- <form method="get">
2023-10-15 21:13:32 +13:00
< input type = "search" name = "search" class = "form-control mt-2" placeholder = "{{ _('Search this community') }}" / >
2024-01-13 22:09:02 +13:00
< / 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" >
< p > < a href = "#" class = "btn btn-primary" > {{ _('Moderate') }}< / a > < / p >
< p > < a href = "#" class = "btn btn-primary" > {{ _('Settings') }}< / a > < / p >
< / div >
< / div >
{% endif %}
< / div >
< / div >
{% endblock %}