-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathall-teams.html
64 lines (55 loc) · 1.97 KB
/
all-teams.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
---
layout: default
title: All Teams
permalink: /teams/
---
{% include color-style.html %}
<div class="container">
<div class="row">
<div class="column" style="margin-top: 10%; margin-bottom: 10%">
<a href="/"><img src="/images/favicon.png" class="avatar" alt="Puzzled Pint Bangalore Logo" /></a>
<h2 role="heading">Teams</h2>
<table>
<tr>
<th>Team</th>
<th>Last Appearance</th>
<th>Event</th>
<th>Appearances</th>
</tr>
{% assign idx=1 %}
{% for row in site.data.teams %}
{% if row.results.size >= 2 %}
<tr>
{%else %}
<tr style="display:none">
{%endif%}
<td style="text-align: left" class="color-{{row.color_index}}" data-slug="{{row.slug}}">
<a href="/teams/{{row.slug}}/">{{row.name | escape}}</a>
</td>
<td class="time">
{% if row.results.last.solved %}
<span>{{row.results.last.duration | duration_to_string}}</span>
{% endif %}
</td>
<td style="font-size: smaller ;">
<a href='/standings/{{row.results.last.event | date: "%Y-%m"}}/'>
{{row.results.last.event | date:"%b %y"}}
</a>
</td>
<td>{{row.results.size}}</td>
</tr>
{% endfor %}
</table>
</div>
</div>
<script>
function showAll(){
var x = document.querySelectorAll("tr[style='display:none']");
for (var i = 0; i < x.length; i++) {
x[i].style.display = "table-row";
}
}
</script>
<a class="button button-default" href='#' role="button" onclick="showAll()">Show All Teams</a><br>
</div>
<small>All teams with 2 or more appearances are shown</small>