diff --git a/app/main/routes.py b/app/main/routes.py index cc2a69aa..dfaf1317 100644 --- a/app/main/routes.py +++ b/app/main/routes.py @@ -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(): diff --git a/app/templates/about.html b/app/templates/about.html new file mode 100644 index 00000000..e0595232 --- /dev/null +++ b/app/templates/about.html @@ -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 %} +
+
+

{{ _('About %(site_name)s', site_name=g.site.name) }}

+ +

{{g.site.name}} is a pyfedi instance created on {{instance.created_at}}. It is home to {{user_amount}} users, {{community_amount}} communities who discussed {{domains_amount}} domains. This instance is administerred and staffed by $PLACEHOLDER_ADMINS and $PLACEHOLDER_STAFF.

+

Contact

+

Placeholder Admin email

+

About Us

+

{{g.site.description | safe}}

+

{{g.site.sidebar}}

+ {% if g.site.legal_information %} +

Legal Information

+

{{g.site.legal_information}}

+

Our Privacy Policy

+ {% endif %} +
+{% endblock %}