mirror of
https://github.com/Xevion/runnerspace.git
synced 2025-12-10 10:08:36 -06:00
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)
This commit is contained in:
@@ -16,19 +16,22 @@
|
||||
</div>
|
||||
<div class="statistics" style="margin: 1em;">
|
||||
<h2>runnerspace Statistics</h2>
|
||||
<div>
|
||||
{% with comments = stats['total_comments'], posts = stats['total_posts'], users = stats['total_users'] %}
|
||||
<div>
|
||||
<ul>
|
||||
<li>
|
||||
<strong>{{ stats['total_comments'] }}</strong> comments across <strong>{{ stats['total_posts'] }}</strong> posts<br>
|
||||
</li>
|
||||
<li>
|
||||
<strong>{{ stats['total_users'] }}</strong> users
|
||||
</li>
|
||||
</ul>
|
||||
<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>
|
||||
</div>
|
||||
|
||||
{% endwith %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user