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">
|
2023-08-29 22:01:06 +12:00
|
|
|
{% if community.header_image() != '' %}
|
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>
|
|
|
|
<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() }}" />
|
|
|
|
<h1 class="mt-2">{{ community.title }}</h1>
|
2023-09-17 21:19:51 +12:00
|
|
|
{% elif community.icon_image() != '' %}
|
2023-08-29 22:01:06 +12:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-2">
|
|
|
|
<img class="community_icon_big rounded-circle" src="{{ community.icon_image() }}" />
|
|
|
|
</div>
|
|
|
|
<div class="col-10">
|
|
|
|
<h1 class="mt-3">{{ community.title }}</h1>
|
|
|
|
</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>
|
|
|
|
<li class="breadcrumb-item active">{{ community.title|shorten }}</li>
|
|
|
|
</ol>
|
|
|
|
</nav>
|
|
|
|
<h1 class="mt-2">{{ community.title }}</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">
|
|
|
|
<div class="col-6">
|
2023-12-03 22:41:15 +13:00
|
|
|
{% if current_user.is_authenticated and community_membership(current_user, community) == SUBSCRIPTION_MEMBER %}
|
2024-01-05 14:09:46 +13:00
|
|
|
<a class="w-100 btn btn-primary" href="/community/{{ community.link() }}/unsubscribe">{{ _('Leave') }}</a>
|
2023-12-03 22:41:15 +13:00
|
|
|
{% elif current_user.is_authenticated and community_membership(current_user, community) == SUBSCRIPTION_PENDING %}
|
|
|
|
<a class="w-100 btn btn-outline-secondary" href="/community/{{ community.link() }}/unsubscribe">{{ _('Pending') }}</a>
|
2023-08-29 22:01:06 +12:00
|
|
|
{% else %}
|
2024-01-05 14:09:46 +13:00
|
|
|
<a class="w-100 btn btn-primary" href="/community/{{ community.link() }}/subscribe">{{ _('Join') }}</a>
|
2023-08-29 22:01:06 +12:00
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
<div class="col-6">
|
2023-09-17 21:19:51 +12:00
|
|
|
<a class="w-100 btn btn-primary" href="/community/{{ community.link() }}/submit">{{ _('Create a post') }}</a>
|
2023-08-29 22:01:06 +12:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<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') }}" />
|
2023-08-29 22:01:06 +12:00
|
|
|
</form>
|
|
|
|
</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 %}
|
2023-12-12 18:28:49 +13:00
|
|
|
<p class="mt-4">
|
|
|
|
<a class="no-underline" href="{{ rss_feed }}" rel="nofollow"><span class="fe fe-rss"></span> RSS feed</a>
|
|
|
|
</p>
|
2023-08-29 22:01:06 +12:00
|
|
|
</div>
|
|
|
|
</div>
|
2023-12-22 14:05:39 +13:00
|
|
|
{% if is_moderator or is_admin %}
|
2023-09-05 20:25:02 +12:00
|
|
|
<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>
|
2023-12-21 22:14:43 +13:00
|
|
|
{% 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 %}
|
2023-09-05 20:25:02 +12:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2023-08-29 22:01:06 +12:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
{% endblock %}
|