sito-hackit-17/talks/_templates/grid.html
2017-05-19 00:23:06 +02:00

46 lines
1.2 KiB
Django/Jinja

<style>
.talk-grid {
table-layout: auto;
width: 100%;
border-collapse: unset;
}
.talk-grid > thead th:first-child {
max-width: 5em;
}
td.talk {
border: 1px solid;
border-radius: 0.3em;
}
.talk-grid tr { line-height: 1em; }
.talk-grid tr:hover { background-color: #980e0eb3; }
.talk-grid td:first-child { font-size: 60%; }
</style>
<table class="talk-grid">
<thead>
<tr>
<th></th>
{% for room in rooms %}
<th>{{room}}</th>
{% endfor %}
</tr>
</thead>
<tbody>
{% for time in range (mintime, maxtime, timestep) %}
<tr>
<td>{{time//60}}:{{ "%02d" % (time % 60)}}</td>
{% for talk in times[time / timestep * timestep] %}
{% if talk == None %}
<td></td>
{% elif not talk.skip %}
<td class="talk" rowspan="{{talk.duration // timestep}}">
<a href="#talk-{{talk.id}}"
title="{{talk.tags|join(",")}}"
>{{talk.title}}</a>
</td>
{% endif %}
{% endfor %}
</tr>
{% endfor %}
</tbody>
</table>
{# vim: set ft=jinja: #}