-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcuppers.html
More file actions
127 lines (125 loc) · 6.3 KB
/
cuppers.html
File metadata and controls
127 lines (125 loc) · 6.3 KB
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
---
title: Cuppers
stylesheets:
- /styles/cuppers-styles.css
---
<h2>Cuppers</h2>
<p>The men's and women's cuppers tournaments is an college knouckout tournament usually played in Hilary and Trinity term. If you wish to play in Cuppers email your <a href="/college-captains.html">college captain</a> or someone on the committee.</p>
The draws from previous years can be found <a href="/archive/cuppers-mens.html">here</a> and <a href="/archive/cuppers-womens.html">here</a>.
<h2>Men's Cuppers 2023</h2>
<div class="cuppers-container">
{% assign draw_hash = site.data.cuppers.mens | sort | last %}
{% assign draw = draw_hash[1] %}
{% for round in draw %}
<div class="round">
{% for match in round.matches %}
{% if match.home != null or match.away != null %}
<div class="match">
{% if match.homeScore > match.awayScore or match.homeScore == match.awayScore and match.homePoints > match.awayPoints %}
<div class="team winner"><span class="college">{{match.home}}</span><span class="score">{{match.homeScore}}</span></div>
<div class="team loser" style="border-top: 0"><span class="college">{{match.away}}</span><span class="score">{{match.awayScore}}</span></div>
{% elsif match.homeScore < match.awayScore or match.homeScore == match.awayScore and match.homePoints < match.awayPoints %}
<div class="team loser"><span class="college">{{match.home}}</span><span class="score">{{match.homeScore}}</span></div>
<div class="team winner" style="border-top: 0"><span class="college">{{match.away}}</span><span class="score">{{match.awayScore}}</span></div>
{% elsif match.homePoints < 0 and match.awayPoints < 0 %}
<div class="team loser"><span class="college">{{match.home}}</span><span class="score">{{match.homeScore}}</span></div>
<div class="team loser" style="border-top: 0"><span class="college">{{match.away}}</span><span class="score">{{match.awayScore}}</span></div>
{% else %}
<div class="team"><span class="college">{{match.home}}</span><span class="score">{{match.homeScore}}</span></div>
<div class="team" style="border-top: 0"><span class="college">{{match.away}}</span><span class="score">{{match.awayScore}}</span></div>
{% endif %}
</div>
{% else %}
<div class="match" style="opacity: 0">
<div class="team"><span class="college"></span><span class="score"></span></div>
<div class="team"><span class="college"></span><span class="score"></span></div>
</div>
{% endif %}
{% endfor %}
</div>
{% if forloop.last != true %}
{% assign numberOfTeams = round.matches | size %}
<div>
<svg viewBox="0 0 1 1" xmlns="http://www.w3.org/2000/svg" height="100%" width="40px" preserveAspectRatio="none">
{% assign i = 0 %}
{% for match in round.matches %}
{% assign i = i | plus: 1 %}
{% if match.home != null or match.away != null %}
<line x1="0" y1="{{ i | minus: 0.5 | divided_by: numberOfTeams}}" x2="1" y2="{{i | minus: 1 |divided_by: 2 | floor |plus: 0.5 |divided_by: numberOfTeams| times: 2}}" stroke="grey" stroke-width="2px" vector-effect="non-scaling-stroke"/>
{% endif %}
{% endfor %}
</svg>
</div>
{% endif %}
{% endfor %}
</div>
<h2>Women's Cuppers 2023</h2>
<div class="cuppers-container">
{% assign draw_hash = site.data.cuppers.womens | sort | last %}
{% assign draw = draw_hash[1] %}
{% for round in draw %}
<div class="round">
{% for match in round.matches %}
{% if match.home != null or match.away != null %}
<div class="match">
{% if match.homeScore > match.awayScore or match.homeScore == match.awayScore and match.homePoints > match.awayPoints %}
<div class="team winner"><span class="college">{{match.home}}</span><span class="score">{{match.homeScore}}</span></div>
<div class="team loser" style="border-top: 0"><span class="college">{{match.away}}</span><span class="score">{{match.awayScore}}</span></div>
{% elsif match.homeScore < match.awayScore or match.homeScore == match.awayScore and match.homePoints < match.awayPoints %}
<div class="team loser"><span class="college">{{match.home}}</span><span class="score">{{match.homeScore}}</span></div>
<div class="team winner" style="border-top: 0"><span class="college">{{match.away}}</span><span class="score">{{match.awayScore}}</span></div>
{% elsif match.homePoints < 0 and match.awayPoints < 0 %}
<div class="team loser"><span class="college">{{match.home}}</span><span class="score">{{match.homeScore}}</span></div>
<div class="team loser" style="border-top: 0"><span class="college">{{match.away}}</span><span class="score">{{match.awayScore}}</span></div>
{% else %}
<div class="team"><span class="college">{{match.home}}</span><span class="score">{{match.homeScore}}</span></div>
<div class="team" style="border-top: 0"><span class="college">{{match.away}}</span><span class="score">{{match.awayScore}}</span></div>
{% endif %}
</div>
{% else %}
<div class="match" style="opacity: 0">
<div class="team"><span class="college"></span><span class="score"></span></div>
<div class="team"><span class="college"></span><span class="score"></span></div>
</div>
{% endif %}
{% endfor %}
</div>
{% if forloop.last != true %}
{% assign numberOfTeams = round.matches | size %}
<div>
<svg viewBox="0 0 1 1" xmlns="http://www.w3.org/2000/svg" height="100%" width="40px" preserveAspectRatio="none">
{% assign i = 0 %}
{% for match in round.matches %}
{% assign i = i | plus: 1 %}
{% if match.home != null or match.away != null %}
<line x1="0" y1="{{ i | minus: 0.5 | divided_by: numberOfTeams}}" x2="1" y2="{{i | minus: 1 |divided_by: 2 | floor |plus: 0.5 |divided_by: numberOfTeams| times: 2}}" stroke="grey" stroke-width="2px" vector-effect="non-scaling-stroke"/>
{% endif %}
{% endfor %}
</svg>
</div>
{% endif %}
{% endfor %}
</div>
<h2>Hall of Fame</h2>
<table cellspacing="0" cellpadding="0" class="responsive-table">
<thead>
<th scope="col">Year</th>
<th scope="col">Men</th>
<th scope="col">Women</th>
</thead>
{% for year in site.data.winners %}
<tr>
<th scope="row">{{year.year}}</th>
{% if year.mens-cuppers %}
<td data-title="Men">{{year.mens-cuppers}}</td>
{% else %}
<td data-title="Men">--</td>
{% endif %}
{% if year.womens-cuppers %}
<td data-title="Women">{{year.womens-cuppers}}</td>
{% else %}
<td data-title="Women">--</td>
{% endif %}
</tr>
{% endfor %}
</table>