Files
runnerspace/templates/layouts/index.html
Xevion db560b7c41 Add pluralizing macro filter to templating engine
- Only some plural edits are included here - some are locked behind commits coming soon™️
- Also made index template statistics variables read better
- Fixed spelling error in CSRF Error template rendering (hadn't hit the page yet)
2022-03-29 18:07:39 -05:00

38 lines
1.4 KiB
HTML

{% extends 'layouts/base.html' %}
{% block content %}
<div style="display: flex;">
<div class="new-users" style="margin: 2em;">
<h2>New Users</h2>
<div>
<ul>
{% for new_user in new_users %}
<li><a href="{{ url_for('main.view_user', username=new_user.username) }}">{{ new_user.username }}</a> as
of {{ new_user.get_registration_delta() }} ago
</li>
{% endfor %}
</ul>
</div>
</div>
<div class="statistics" style="margin: 1em;">
<h2>runnerspace Statistics</h2>
{% with comments = stats['total_comments'], posts = stats['total_posts'], users = stats['total_users'] %}
<div>
<div>
<ul>
<li>
<strong>{{ comments }}</strong> comment across <strong>{{ posts }}</strong>
post{{ posts|pluralize }}<br>
</li>
<li>
<strong>{{ users }}</strong> user{{ users|pluralize }}
</li>
</ul>
</div>
</div>
{% endwith %}
</div>
</div>
{% endblock %}