oliverdavies.uk/source/_includes/talks-table.html.twig
2017-09-04 17:55:53 +01:00

83 lines
3 KiB
Twig

<div class="table-responsive">
<table class="w-100 ba b--moon-gray">
<thead>
<tr class="striped--light-gray">
<th class="w-20 pa2 tl">Date</th>
{% if not talk_page %}
<th class="w-40 pa2 tl">Talk</th>
{% endif %}
<th class="pa2 tl">Event</th>
{% if not upcoming %}
<th class="w-12 pa2 tl">Feedback</th>
{% endif %}
</tr>
</thead>
<tbody>
{% for row in events %}
{% set talk = false %}
{% set key = row.date.talk.id ?: row.date.talk %}
{% for item in row.talks if key == item.filename|split('.')|first %}
{% set talk = item %}
{% endfor %}
<tr class="striped--near-white">
<td class="pa2">
{{ row.date.date|date(row.date.fuzzy_date ? 'F Y' : 'j F Y') }}
{% if row.date.time %}
<small class="db">{{ row.date.time }}</small>
{% endif %}
</td>
{% if not talk_page %}
<td class="pa2">
{% if row.date.talk.title is defined %}
{{ row.date.talk.title }}
{% else %}
<a href="{{ talk.url }}" class="blue">{{ talk.title }}</a>
{% endif %}
<small class="db">
{{ row.date.talk.type ?: talk.type }}
</small>
</td>
{% endif %}
<td class="pa2">
{% if row.event.website %}
<a href="{{ row.event.website }}" class="blue">
{{ row.event.name }}
</a>
{% else %}
{{ row.event.name }}
{% endif %}
<small class="db">
{{ row.event.location }}
</small>
</td>
{% if not upcoming %}
<td class="">
{% if row.date.feedback %}
<a
href="{{ row.date.feedback }}"
class="bg-blue br2 pa2 white-90 no-underline dib dim"
title="Read or leave feedback for this talk"
>
<i class="fa fa-comment-o mr1"></i>
joind.in
</a>
{% endif %}
</td>
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>
</div>