2023-08-29 22:01:06 +12:00
|
|
|
{% extends "base.html" %}
|
|
|
|
{% from 'bootstrap/form.html' import render_form %}
|
|
|
|
|
|
|
|
{% block app_content %}
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-8 position-relative">
|
|
|
|
{% if community.header_image() != '' %}
|
|
|
|
<div class="community_header" style="height: 240px; background-image: url({{ community.header_image() }});"></div>
|
|
|
|
<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 %}
|
|
|
|
<h1 class="mt-3">{{ community.title }}</h1>
|
2023-08-29 22:01:06 +12:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="col-4">
|
|
|
|
<div class="card">
|
|
|
|
<div class="card-body">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-6">
|
|
|
|
{% if current_user.subscribed(community) %}
|
2023-09-05 20:25:02 +12:00
|
|
|
<a class="w-100 btn btn-primary" href="/community/{{ community.link() }}/unsubscribe">{{ _('Unsubscribe') }}</a>
|
2023-08-29 22:01:06 +12:00
|
|
|
{% else %}
|
2023-09-05 20:25:02 +12:00
|
|
|
<a class="w-100 btn btn-primary" href="/community/{{ community.link() }}/subscribe">{{ _('Subscribe') }}</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">
|
|
|
|
<input type="search" name="search" class="form-control mt-2" placeholder="Search this community" />
|
|
|
|
</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-09-17 21:19:51 +12:00
|
|
|
<p>{{ community.description|safe }}</p>
|
|
|
|
<p>{{ community.rules|safe }}</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>
|
|
|
|
<ol>
|
|
|
|
{% for mod in mods %}
|
|
|
|
<li><a href="/u/{{ mod.user_name }}">{{ mod.user_name }}</a></li>
|
|
|
|
{% endfor %}
|
|
|
|
</ol>
|
|
|
|
{% endif %}
|
2023-08-29 22:01:06 +12:00
|
|
|
</div>
|
|
|
|
</div>
|
2023-09-05 20:25:02 +12:00
|
|
|
{% 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 %}
|
2023-08-29 22:01:06 +12:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
{% endblock %}
|