Re-order talks
This commit is contained in:
parent
33a8eff77a
commit
d38d6be307
27 changed files with 264 additions and 358 deletions
|
@ -1,16 +1,13 @@
|
|||
<div class="mt4">
|
||||
<h2>Events</h2>
|
||||
|
||||
{% set events = [] %}
|
||||
{% for date in site.events.dates if date.talk_id == page.talk_id %}
|
||||
{% set events = events|merge([{
|
||||
date: date,
|
||||
event: site.events.events[date.event],
|
||||
{% set talks = [] %}
|
||||
{% for event in page.events %}
|
||||
{% set talks = talks|merge([{
|
||||
event: event|merge(site.events[event.event]),
|
||||
talk: page,
|
||||
}]) %}
|
||||
{% endfor %}
|
||||
|
||||
{% include 'talks-table' with {
|
||||
events: events,
|
||||
talk_page: true
|
||||
} %}
|
||||
{% include "talks-table" with { talk_page: true } %}
|
||||
</div>
|
||||
|
|
52
source/_includes/talks-table-row.html.twig
Normal file
52
source/_includes/talks-table-row.html.twig
Normal file
|
@ -0,0 +1,52 @@
|
|||
<tr class="striped--near-white">
|
||||
<td class="pa2">
|
||||
{{ row.event.date|date(row.event.fuzzy_date ? 'F Y' : 'j F Y') }}
|
||||
|
||||
{% if row.event.time is defined %}
|
||||
<small class="db black-70">
|
||||
{{ row.event.time }}
|
||||
</small>
|
||||
{% endif %}
|
||||
</td>
|
||||
|
||||
{% if not talk_page %}
|
||||
<td class="pa2">
|
||||
<a href="{{ row.talk.url }}">
|
||||
{{ row.talk.title }}
|
||||
</a>
|
||||
|
||||
<small class="db black-70">
|
||||
{{ row.event.type|default('Talk') }}
|
||||
</small>
|
||||
</td>
|
||||
{% endif %}
|
||||
|
||||
<td class="pa2">
|
||||
{% if row.event.website is not empty %}
|
||||
<a href="{{ row.event.website }}">
|
||||
{{ row.event.name }}
|
||||
</a>
|
||||
{% else %}
|
||||
{{ row.event.name }}
|
||||
{% endif %}
|
||||
|
||||
{% if row.event.location is defined %}
|
||||
<small class="db black-70">
|
||||
{{ row.event.location }}
|
||||
</small>
|
||||
{% endif %}
|
||||
</td>
|
||||
|
||||
{% if not upcoming %}
|
||||
<td class="ph2">
|
||||
{% if row.event.feedback and row.event.date <= today %}
|
||||
<a
|
||||
href="{{ row.event.feedback }}"
|
||||
class="button"
|
||||
title="Read or leave feedback for this talk">
|
||||
<i class="fa fa-comment-o"></i> joind.in
|
||||
</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
{% endif %}
|
||||
</tr>
|
|
@ -17,65 +17,8 @@
|
|||
</thead>
|
||||
<tbody>
|
||||
{% set today = 'today'|date('Y-m-d') %}
|
||||
{% for row in events %}
|
||||
<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 is defined %}
|
||||
<small class="db black-70">
|
||||
{{ row.date.time }}
|
||||
</small>
|
||||
{% endif %}
|
||||
</td>
|
||||
|
||||
{% if not talk_page %}
|
||||
<td class="pa2">
|
||||
{% if row.date.talk_title is not defined %}
|
||||
{% for talk in data.talks if talk.talk_id == row.date.talk_id %}
|
||||
<a href="{{ talk.url }}">
|
||||
{{ talk.title }}
|
||||
</a>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
{{ row.date.talk_title }}
|
||||
{% endif %}
|
||||
|
||||
<small class="db black-70">
|
||||
{{ row.date.type|default('Talk') }}
|
||||
</small>
|
||||
</td>
|
||||
{% endif %}
|
||||
|
||||
<td class="pa2">
|
||||
{% if row.event.website is not empty %}
|
||||
<a href="{{ row.event.website }}">
|
||||
{{ row.event.name }}
|
||||
</a>
|
||||
{% else %}
|
||||
{{ row.event.name }}
|
||||
{% endif %}
|
||||
|
||||
{% if row.event.location is defined %}
|
||||
<small class="db black-70">
|
||||
{{ row.event.location }}
|
||||
</small>
|
||||
{% endif %}
|
||||
</td>
|
||||
|
||||
{% if not upcoming %}
|
||||
<td class="ph2">
|
||||
{% if row.date.feedback and row.date.date <= today %}
|
||||
<a
|
||||
href="{{ row.date.feedback }}"
|
||||
class="button"
|
||||
title="Read or leave feedback for this talk">
|
||||
<i class="fa fa-comment-o"></i> joind.in
|
||||
</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% for row in talks %}
|
||||
{% include "talks-table-row" %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue