pyfedi/app/templates/community/community.html

59 lines
2.1 KiB
HTML
Raw Normal View History

{% 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>
{% else %}
<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>
{% 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) %}
<a class="w-100 btn btn-primary" href="/c/{{ community.link() }}/unsubscribe">{{ _('Unsubscribe') }}</a>
{% else %}
<a class="w-100 btn btn-primary" href="/c/{{ community.link() }}/subscribe">{{ _('Subscribe') }}</a>
{% endif %}
</div>
<div class="col-6">
<a class="w-100 btn btn-primary" href="#">{{ _('Create a post') }}</a>
</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">
<h2>About community</h2>
</div>
<div class="card-body">
{{ community.description|safe }}
</div>
</div>
</div>
</div>
<div class="row">
</div>
{% endblock %}