mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-24 03:43:42 -08:00
About page gives an overview of what the instance is about, whod administers and how to contact in case of issues.
This commit is contained in:
parent
f0a622e8d9
commit
70a8d8caa0
2 changed files with 41 additions and 0 deletions
|
@ -229,6 +229,23 @@ def list_subscribed_communities():
|
|||
def donate():
|
||||
return render_template('donate.html')
|
||||
|
||||
@bp.route('/about')
|
||||
def about_page():
|
||||
|
||||
users = User.query.filter_by(ap_id=None, deleted=False, banned=False).all()
|
||||
user_amount = len(users)
|
||||
# Todo, figure out how to filter the user list with the list of user_role user_id == 4
|
||||
#admins = users.filter()
|
||||
# Todo, figure out how to filter the user list with the list of user_role user_id == 4
|
||||
#staff = users.filter()
|
||||
|
||||
domains_amount = len(Domain.query.filter_by(banned=False).all())
|
||||
community_amount = len(Community.query.all())
|
||||
instance = Instance.query.filter_by(id=1).first()
|
||||
|
||||
|
||||
return render_template('about.html', user_amount=user_amount, domains_amount=domains_amount, community_amount=community_amount, instance=instance)#, admins=admins)
|
||||
|
||||
|
||||
@bp.route('/privacy')
|
||||
def privacy():
|
||||
|
|
24
app/templates/about.html
Normal file
24
app/templates/about.html
Normal file
|
@ -0,0 +1,24 @@
|
|||
{% if theme() and file_exists('app/templates/themes/' + theme() + '/base.html') %}
|
||||
{% extends 'themes/' + theme() + '/base.html' %}
|
||||
{% else %}
|
||||
{% extends "base.html" %}
|
||||
{% endif %} %}
|
||||
|
||||
{% block app_content %}
|
||||
<div class="row">
|
||||
<div class="col-12 col-md-8 position-relative main_pane">
|
||||
<h1>{{ _('About %(site_name)s', site_name=g.site.name) }}</h1>
|
||||
|
||||
<p> {{g.site.name}} is a <a href="https://join.piefed.social/">pyfedi</a> instance created on {{instance.created_at}}. It is home to <a href="/people">{{user_amount}} users</a>, <a href="/communities/local"> {{community_amount}} communities</a> who discussed <a href="/domains">{{domains_amount}} domains</a>. This instance is administerred and staffed by $PLACEHOLDER_ADMINS and $PLACEHOLDER_STAFF.</p>
|
||||
<h2>Contact</h2>
|
||||
<p>Placeholder Admin email</p>
|
||||
<h2> About Us </h2>
|
||||
<p> {{g.site.description | safe}} </p>
|
||||
<p> {{g.site.sidebar}} </p>
|
||||
{% if g.site.legal_information %}
|
||||
<h2> Legal Information </h2>
|
||||
<p> {{g.site.legal_information}} </p>
|
||||
<p> <a href="/privacy"> Our Privacy Policy </a> </p>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
Loading…
Add table
Reference in a new issue