Add 'going' badges to conferences
This commit is contained in:
parent
88f4a9c4ec
commit
888c9106b0
|
@ -19,19 +19,25 @@
|
|||
</style>
|
||||
{% endblock %}
|
||||
|
||||
{% macro row(item) %}
|
||||
{% macro row(item, badge) %}
|
||||
<div class="grid-item text-end">{{ item.start.strftime("%a, %d %b %Y") }}</div>
|
||||
<div class="grid-item text-end">{{ item.end.strftime("%a, %d %b") }}</div>
|
||||
<div class="grid-item">{{ item.name }}</div>
|
||||
<div class="grid-item">{{ item.name }}
|
||||
{% if item.going %}
|
||||
<span class="badge text-bg-success">
|
||||
{{ badge }}
|
||||
</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="grid-item">{{ item.topic }}</div>
|
||||
<div class="grid-item">{{ item.location }}</div>
|
||||
<div class="grid-item"><a href="{{ item.url }}">{{ item.url }}</a></div>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro section(heading, item_list) %}
|
||||
{% macro section(heading, item_list, badge) %}
|
||||
{% if item_list %}
|
||||
<div class="heading"><h2>{{heading}}</h2></div>
|
||||
{% for item in item_list %}{{ row(item) }}{% endfor %}
|
||||
{% for item in item_list %}{{ row(item, badge) }}{% endfor %}
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
|
||||
|
@ -52,9 +58,9 @@
|
|||
</p>
|
||||
|
||||
<div class="grid-container">
|
||||
{{ section("Current", current) }}
|
||||
{{ section("Future", future) }}
|
||||
{{ section("Past", past|reverse) }}
|
||||
{{ section("Current", current, "attending") }}
|
||||
{{ section("Future", future, "going") }}
|
||||
{{ section("Past", past|reverse, "went") }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in a new issue