-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
mnteams.html
231 lines (197 loc) · 9.79 KB
/
mnteams.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
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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
---
layout: default
permalink: /mnteams/
---
<div class="container mt-5">
<h1 class="kk text-center">Minnesota Teams</h1>
<!--
For when the screen is smaller than md (phone)
-->
<div class="d-block d-md-none">
<!--This is the dropdown for select thousand. In the small screen, all id links have an s after them to differentiate them from the large screen links -->
<!--This prevents the page from setting multiple elements to the same id, which wouldn't work right -->
<div class="dropdown d-block">
<button class="dropbtn kk center">Select Thousand<i class="far fa-hand-point-down"></i></button>
<div class="dropdown-content dropdown-menu-center">
<a href="/mnteams/#1816s">1000s</a>
<a href="/mnteams/#2052s">2000s</a>
<a href="/mnteams/#3007s">3000s</a>
<a href="/mnteams/#4009s">4000s</a>
<a href="/mnteams/#5143s">5000s</a>
<a href="/mnteams/#6022s">6000s</a>
<a href="/mnteams/#7019s">7000s</a>
<a href="/mnteams/#8234s">8000s</a>
</div>
</div>
<br>
<p class="text-center">Click team name for media links.</p>
<table class="mnteams">
<tr class="mnteamsHeader">
<th>#</th>
<th>Name</th>
</tr>
{% for def in site.data.teams %}
<tr>
{% assign num = def.TeamNumber | plus: 0 %} <!--creates variable for the team number -->
<!--assigns col to different shade depending on team number. used later to set cell colors-->
{% if num < 2000 %}
{% assign col = "e5e5e5" %}
{% elsif num < 3000 %}
{% assign col = "f9f9f9" %}
{% elsif num < 4000 %}
{% assign col = "e5e5e5" %}
{% elsif num < 5000 %}
{% assign col = "f9f9f9" %}
{% elsif num < 6000 %}
{% assign col = "e5e5e5" %}
{% elsif num < 7000 %}
{% assign col = "f9f9f9" %}
{% elsif num < 8000 %}
{% assign col = "e5e5e5" %}
{% elsif num < 9000 %}
{% assign col = "f9f9f9" %}
{% endif %}
<td width="20%" class="mnteamsList glossary-term" style="background: #{{ col }};"><a name="{{ def.TeamNumber }}"/>{{ def.TeamNumber }}</td>
<td id="{{ def.TeamNumber }}s" colspan="4" class="mnteamsList glossary-term toggler" style="background: #{{ col }};" data-teamnumber="{{ def.TeamNumber }}">{{ def.TeamName }}<i class="fas fa-sort-down"></i></td>
</tr>
<tr id="alinks{{ def.TeamNumber }}s" style="display: none;"> <!--sets initial display of this tr to hidden and assigns a unique id for every team -->
<td width="20%" class="mnteamsList text-center" style="background: #{{ col }};"></td>
<!--puts NA if no link-->
{% if def.Website == "NA" %}
<td width="26.66%" class="mnteamsList text-center" style="font-size: 18px; background: #{{ col }};">NA</td>
{% else %}
<td width="26.66%" class="mnteamsList text-center" style="background: #{{ col }};"><a href="{{def.Website}}"><i class="fas fa-align-center"></i></a></td>
{% endif %}
{% if def.Twitter == "NA" %}
<td width="26.66%" class="mnteamsList text-center" style="font-size: 18px; background: #{{ col }};">NA</td>
{% else %}
<td width="26.66%" class="mnteamsList text-center" style="background: #{{ col }};"><a href="{{def.Twitter}}"><i class="fab fa-twitter-square"></i></a></td>
{% endif %}
{% if def.Facebook == "NA" %}
<td width="26.66%" class="mnteamsList text-center" style="font-size: 18px; background: #{{ col }};">NA</td>
{% else %}
<td width="26.66%" class="mnteamsList text-center" style="background: #{{ col }};"><a href="{{def.Facebook}}"><i class="fab fa-facebook-square"></i></a></td>
{% endif %}
</tr>
<tr id="blinks{{ def.TeamNumber }}s" style="display: none;">
<td width="20%" class="mnteamsList text-center" style="background: #{{ col }};"></td>
{% if def.Instagram == "NA" %}
<td width="26.66%" class="mnteamsList text-center" style="font-size: 18px; background: #{{ col }};">NA</td>
{% else %}
<td width="26.66%" class="mnteamsList text-center" style="background: #{{ col }};"><a href="{{def.Instagram}}"><i class="fab fa-instagram"></i></a></td>
{% endif %}
{% if def.Youtube == "NA" %}
<td width="26.66%" class="mnteamsList text-center" style="font-size: 18px; background: #{{ col }};">NA</td>
{% else %}
<td width="26.66%" class="mnteamsList text-center" style="background: #{{ col }};"><a href="{{def.Youtube}}"><i class="fab fa-youtube-square"></i></a></td>
{% endif %}
<td width="26.66%" class="mnteamsList text-center" style="background: #{{ col }};"><a href="{{def.TBA}}"><i class="fas fa-chess-rook"></i></a></td>
</tr>
<script>
$(document).ready(function(){
$(".toggler").click(function(e){
var num = e.target.id; //gets the id of clicked element
e.preventDefault();
$("#alinks"+num).toggle(); //creates the string of the tr's id and toggles between shown and hidden
$("#blinks"+num).toggle();
});
});
</script>
{% endfor %}
<tr class="mnteamsHeader">
<th colspan="8" class="text-center"><a class="mnteamsTop" href="/mnteams/#1816s">Top <i class="fas fa-arrow-circle-up"></i></a></th>
</tr>
</table>
</div>
<!--
For screen sizes larger than sm
-->
<div class="hidden-sm">
<div class="dropdown d-block"> <!--This is the dropdown for select thousand. In the large screens, the id links are different than the small screen ones -->
<button class="dropbtn kk center">Select Thousand<i class="far fa-hand-point-down"></i></button>
<div class="dropdown-content dropdown-menu-center">
<a href="/mnteams/#1816">1000s</a>
<a href="/mnteams/#2052">2000s</a>
<a href="/mnteams/#3007">3000s</a>
<a href="/mnteams/#4009">4000s</a>
<a href="/mnteams/#5143">5000s</a>
<a href="/mnteams/#6022">6000s</a>
<a href="/mnteams/#7019">7000s</a>
<a href="/mnteams/#8234">8000s</a>
</div>
</div>
<br>
<table class="mnteams">
<tr class="mnteamsHeader">
<th>#</th>
<th>Name</th>
<th>Website</th>
<th>Twitter</th>
<th>Facebook</th>
<th>Instagram</th>
<th>YouTube</th>
<th>TBA</th>
</tr>
{% for def in site.data.teams %}
<tr>
{% assign num = def.TeamNumber | plus: 0 %} <!--creates variable for the team number -->
<!--assigns col to different shade depending on team number. used later to set cell colors-->
{% if num < 2000 %}
{% assign col = "e5e5e5" %}
{% elsif num < 3000 %}
{% assign col = "f9f9f9" %}
{% elsif num < 4000 %}
{% assign col = "e5e5e5" %}
{% elsif num < 5000 %}
{% assign col = "f9f9f9" %}
{% elsif num < 6000 %}
{% assign col = "e5e5e5" %}
{% elsif num < 7000 %}
{% assign col = "f9f9f9" %}
{% elsif num < 8000 %}
{% assign col = "e5e5e5" %}
{% elsif num < 9000 %}
{% assign col = "f9f9f9" %}
{% endif %}
<td class="mnteamsList glossary-term" style="background: #{{ col }};"><a name="{{ def.TeamNumber }}"/>{{ def.TeamNumber }}</td>
<td id="{{ def.TeamNumber }}" class="mnteamsList glossary-term" style="background: #{{ col }};">{{ def.TeamName }}</td>
<!--puts NA if no link-->
{% if def.Website == "NA" %}
<td class="mnteamsList text-center" style="font-size: 18px; background: #{{ col }};">NA</td>
{% else %}
<td class="mnteamsList text-center" style="background: #{{ col }};"><a target="_blank" href="{{def.Website}}"><i class="fas fa-align-center"></i></a></td>
{% endif %}
{% if def.Twitter == "NA" %}
<td class="mnteamsList text-center" style="font-size: 18px; background: #{{ col }};">NA</td>
{% else %}
<td class="mnteamsList text-center" style="background: #{{ col }};"><a target="_blank" href="{{def.Twitter}}"><i class="fab fa-twitter-square"></i></a></td>
{% endif %}
{% if def.Facebook == "NA" %}
<td class="mnteamsList text-center" style="font-size: 18px; background: #{{ col }};">NA</td>
{% else %}
<td class="mnteamsList text-center" style="background: #{{ col }};"><a target="_blank" href="{{def.Facebook}}"><i class="fab fa-facebook-square"></i></a></td>
{% endif %}
{% if def.Instagram == "NA" %}
<td class="mnteamsList text-center" style="font-size: 18px; background: #{{ col }};">NA</td>
{% else %}
<td class="mnteamsList text-center" style="background: #{{ col }};"><a target="_blank" href="{{def.Instagram}}"><i class="fab fa-instagram"></i></a></td>
{% endif %}
{% if def.Youtube == "NA" %}
<td class="mnteamsList text-center" style="font-size: 18px; background: #{{ col }};">NA</td>
{% else %}
<td class="mnteamsList text-center" style="background: #{{ col }};"><a target="_blank" href="{{def.Youtube}}"><i class="fab fa-youtube-square"></i></a></td>
{% endif %}
<td class="mnteamsList text-center" style="background: #{{ col }};"><a target="_blank" href="{{def.TBA}}"><i class="fas fa-chess-rook"></i></a></td>
</tr>
{% endfor %}
<tr class="mnteamsHeader">
<th colspan="8" class="text-center"><a class="mnteamsTop" href="/mnteams/#1816">Top <i class="fas fa-arrow-circle-up"></i></a></th>
</tr>
<table>
</div>
</div>
<!-- Colors for grey gradient background. Each a percent of 255 to create the color hexadecimals
1000s - .98 - #f9f9f9 2000s - .95 - #f2f2f2
3000s - .92 - #EAEAEA 4000s - .89 - #E2E2E2
5000s - .86 - #DBDBDB 6000s - .83 - #D3D3D3
7000s - .80 - #CCCCCC 8000s - .77 - #C4C4C4 -->