2023-08-29 22:01:06 +12:00
{% extends "base.html" %}
{% from 'bootstrap/form.html' import render_form %}
{% block app_content %}
< div class = "row" >
2023-11-09 21:32:29 +13:00
< div class = "col-12 col-md-8 position-relative main_pane" >
2024-01-08 19:41:32 +13:00
{% if community.header_image() != '' and not low_bandwidth %}
2023-12-22 14:05:39 +13:00
< div class = "community_header" style = "background-image: url({{ community.header_image() }});" >
2023-10-03 22:29:13 +13:00
< nav aria-label = "breadcrumb" id = "breadcrumb_nav" title = "Navigation" >
< ol class = "breadcrumb" >
< li class = "breadcrumb-item" > < a href = "/" > {{ _('Home') }}< / a > < / li >
< li class = "breadcrumb-item" > < a href = "/communities" > {{ _('Communities') }}< / a > < / li >
2024-01-10 19:06:35 +13:00
{% if community.topic_id %}
< li class = "breadcrumb-item" > < a href = "/communities?topic_id={{ community.topic.id }}" rel = "nofollow" > {{ community.topic.name }}< / a > < / li >
{% endif %}
2023-10-03 22:29:13 +13:00
< li class = "breadcrumb-item active" > {{ community.title|shorten }}< / li >
< / ol >
< / nav >
< / div >
2023-08-29 22:01:06 +12:00
< img class = "community_icon_big bump_up rounded-circle" src = "{{ community.icon_image() }}" / >
2024-01-07 12:47:06 +13:00
< h1 class = "mt-2" > {{ community.title }}
{% if current_user.is_authenticated %}
{% include 'community/_notification_toggle.html' %}
{% endif %}
< / h1 >
2024-01-08 19:41:32 +13:00
{% elif community.icon_id and not low_bandwidth %}
2023-08-29 22:01:06 +12:00
< div class = "row" >
2024-01-06 15:30:50 +13:00
< nav aria-label = "breadcrumb" id = "breadcrumb_nav" title = "Navigation" >
< ol class = "breadcrumb" >
< li class = "breadcrumb-item" > < a href = "/" > {{ _('Home') }}< / a > < / li >
< li class = "breadcrumb-item" > < a href = "/communities" > {{ _('Communities') }}< / a > < / li >
2024-01-10 19:06:35 +13:00
{% if community.topic_id %}
< li class = "breadcrumb-item" > < a href = "/communities?topic_id={{ community.topic.id }}" rel = "nofollow" > {{ community.topic.name }}< / a > < / li >
{% endif %}
2024-01-06 15:30:50 +13:00
< li class = "breadcrumb-item active" > {{ community.title|shorten }}< / li >
< / ol >
< / nav >
2023-08-29 22:01:06 +12:00
< div class = "col-2" >
< img class = "community_icon_big rounded-circle" src = "{{ community.icon_image() }}" / >
< / div >
< div class = "col-10" >
2024-01-07 12:47:06 +13:00
< h1 class = "mt-3" > {{ community.title }}
{% if current_user.is_authenticated %}
{% include 'community/_notification_toggle.html' %}
{% endif %}
< / h1 >
2023-08-29 22:01:06 +12:00
< / div >
< / div >
2023-09-17 21:19:51 +12:00
{% else %}
2023-10-03 22:29:13 +13:00
< nav aria-label = "breadcrumb" id = "breadcrumb_nav" title = "Navigation" >
< ol class = "breadcrumb" >
< li class = "breadcrumb-item" > < a href = "/" > {{ _('Home') }}< / a > < / li >
< li class = "breadcrumb-item" > < a href = "/communities" > {{ _('Communities') }}< / a > < / li >
2024-01-10 19:06:35 +13:00
{% if community.topic_id %}
< li class = "breadcrumb-item" > < a href = "/communities?topic_id={{ community.topic.id }}" rel = "nofollow" > {{ community.topic.name }}< / a > < / li >
{% endif %}
2023-10-03 22:29:13 +13:00
< li class = "breadcrumb-item active" > {{ community.title|shorten }}< / li >
< / ol >
< / nav >
2024-01-07 12:47:06 +13:00
< h1 class = "mt-2" > {{ community.title }}
{% if current_user.is_authenticated %}
{% include 'community/_notification_toggle.html' %}
{% endif %}
< / h1 >
2023-08-29 22:01:06 +12:00
{% endif %}
2024-01-03 20:14:39 +13:00
{% include "community/_community_nav.html" %}
2023-10-02 22:16:44 +13:00
< div class = "post_list" >
{% for post in posts %}
2023-11-30 06:36:08 +13:00
{% include 'post/_post_teaser.html' %}
2023-10-02 22:16:44 +13:00
{% else %}
< p > {{ _('No posts in this community yet.') }}< / p >
{% endfor %}
< / div >
2023-12-15 17:35:11 +13:00
< nav aria-label = "Pagination" class = "mt-4" >
{% if prev_url %}
2024-01-03 20:14:39 +13:00
< a href = "{{ prev_url }}" class = "btn btn-primary" rel = 'nofollow' >
2023-12-15 17:35:11 +13:00
< span aria-hidden = "true" > ← < / span > {{ _('Previous page') }}
< / a >
{% endif %}
{% if next_url %}
2024-01-03 20:14:39 +13:00
< a href = "{{ next_url }}" class = "btn btn-primary" rel = 'nofollow' >
2023-12-15 17:35:11 +13:00
{{ _('Next page') }} < span aria-hidden = "true" > → < / span >
< / a >
{% endif %}
< / nav >
2023-08-29 22:01:06 +12:00
< / div >
2024-01-04 22:21:31 +13:00
< div class = "col-12 col-md-4 side_pane" >
2023-08-29 22:01:06 +12:00
< div class = "card" >
< div class = "card-body" >
< div class = "row" >
2024-01-06 08:16:50 +13:00
< div class = "col-6" >
< a class = "w-100 btn btn-primary" href = "/community/{{ community.link() }}/submit" > {{ _('Create a post') }}< / a >
< / div >
2023-08-29 22:01:06 +12:00
< div class = "col-6" >
2024-01-11 20:52:09 +13:00
{% if current_user.is_authenticated and community_membership(current_user, community) in [SUBSCRIPTION_MEMBER, SUBSCRIPTION_MODERATOR, SUBSCRIPTION_OWNER] %}
2024-01-16 15:38:56 +13:00
< a class = "w-100 btn btn-primary" href = "/community/{{ community.link() }}/unsubscribe" rel = "nofollow" > {{ _('Leave') }}< / a >
2023-12-03 22:41:15 +13:00
{% elif current_user.is_authenticated and community_membership(current_user, community) == SUBSCRIPTION_PENDING %}
2024-01-16 15:38:56 +13:00
< a class = "w-100 btn btn-outline-secondary" href = "/community/{{ community.link() }}/unsubscribe" rel = "nofollow" > {{ _('Pending') }}< / a >
2023-08-29 22:01:06 +12:00
{% else %}
2024-01-16 15:38:56 +13:00
< a class = "w-100 btn btn-primary" href = "/community/{{ community.link() }}/subscribe" rel = "nofollow" > {{ _('Join') }}< / a >
2023-08-29 22:01:06 +12:00
{% endif %}
< / div >
< / div >
2024-01-13 22:09:02 +13:00
<!-- <form method="get">
2023-10-02 22:16:44 +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-08-29 22:01:06 +12:00
< / div >
< / div >
< div class = "card mt-3" >
< div class = "card-header" >
2023-09-03 16:30:20 +12:00
< h2 > {{ _('About community') }}< / h2 >
2023-08-29 22:01:06 +12:00
< / div >
< div class = "card-body" >
2023-12-27 11:00:30 +13:00
< p > {{ community.description_html|safe if community.description_html else '' }}< / p >
< p > {{ community.rules_html|safe if community.rules_html else '' }}< / p >
2023-09-08 20:04:01 +12:00
{% if len(mods) > 0 and not community.private_mods %}
2023-09-05 20:25:02 +12:00
< h3 > Moderators< / h3 >
2023-12-27 11:00:30 +13:00
< ul class = "moderator_list" >
2023-09-05 20:25:02 +12:00
{% for mod in mods %}
2023-10-21 15:49:01 +13:00
< li > {{ render_username(mod) }}< / li >
2023-09-05 20:25:02 +12:00
{% endfor %}
2023-12-22 14:05:39 +13:00
< / ul >
2023-09-05 20:25:02 +12:00
{% endif %}
2024-01-07 14:36:55 +13:00
{% if not community.is_local() %}
< p >
< a href = "{{ community.profile_id() }}" > View community on original server< / a >
< / p >
{% endif %}
< p >
< a class = "no-underline" href = "{{ rss_feed }}" rel = "nofollow" > < span class = "fe fe-rss" > < / span > < / a > < a href = "{{ rss_feed }}" rel = "nofollow" > RSS feed< / a >
2023-12-12 18:28:49 +13:00
< / p >
2023-08-29 22:01:06 +12:00
< / div >
< / div >
2024-01-15 18:32:58 +13:00
{% if related_communities %}
< div class = "card mt-3" >
< div class = "card-header" >
< h2 > {{ _('Related communities') }}< / h2 >
< / div >
< div class = "card-body" >
< ul class = "list-group list-group-flush" >
{% for community in related_communities %}
< li class = "list-group-item" >
< a href = "/c/{{ community.link() }}" > < img src = "{{ community.icon_image() }}" class = "community_icon rounded-circle" loading = "lazy" / >
{{ community.display_name() }}
< / a >
< / li >
{% endfor %}
< / ul >
< p class = "mt-4" > < a class = "btn btn-primary" href = "/communities" > {{ _('Explore communities') }}< / a > < / p >
< / div >
< / div >
{% endif %}
2024-01-15 19:18:21 +13:00
{% if is_moderator or is_admin %}
< 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 >
{% if community.is_owner() or current_user.is_admin() %}
< p > < a class = "btn btn-primary btn-warning" href = "{{ url_for('community.community_delete', community_id=community.id) }}" rel = "nofollow" > Delete community< / a > < / p >
{% endif %}
< / div >
< / div >
{% endif %}
2023-08-29 22:01:06 +12:00
< / div >
< / div >
< div class = "row" >
< / div >
{% endblock %}