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