Add conference count display to conference list sections
- Show count of conferences in each section (Current/Future/Past) - Include proper pluralization (1 conference vs N conferences) - Use Jinja2 template logic for count calculation and display Fixes #195
This commit is contained in:
parent
69f76746d5
commit
084e5f44e3
1 changed files with 10 additions and 1 deletions
|
|
@ -26,7 +26,16 @@
|
||||||
|
|
||||||
{% macro section(heading, item_list, badge) %}
|
{% macro section(heading, item_list, badge) %}
|
||||||
{% if item_list %}
|
{% if item_list %}
|
||||||
<div class="heading"><h2>{{ heading }}</h2></div>
|
<div class="heading">
|
||||||
|
|
||||||
|
<h2>{{ heading }}</h2>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
{% set item_count = item_list|length %}
|
||||||
|
{% if item_count == 1 %}{{ item_count }} conference{% else %}{{ item_count }} conferences{% endif %}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
{% for item in item_list %}
|
{% for item in item_list %}
|
||||||
{{ conference_row(item, badge) }}
|
{{ conference_row(item, badge) }}
|
||||||
<div class="grid-item">
|
<div class="grid-item">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue