-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
86 lines (85 loc) · 3.08 KB
/
index.html
File metadata and controls
86 lines (85 loc) · 3.08 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta name="theme-color" content="#FFCC00">
<link rel="manifest" href="manifest.json" />
<link rel="stylesheet" href="style.css" />
<link rel="icon" href="1719.png" />
<link rel="apple-touch-icon" href="1719.png">
<title>1719 Coach App</title>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<script>
if ('serviceWorker' in navigator) {
window.addEventListener('load', function() {
navigator.serviceWorker.register('/CoachApp2020/sw.js').then(function(registration) {
// Registration was successful
console.log('ServiceWorker registration successful with scope: ', registration.scope);
}, function(err) {
// registration failed :
console.log('ServiceWorker registration failed: ', err);
});
});
}
var prompt=null;
window.addEventListener('beforeinstallprompt',function(e){
prompt=e;
document.querySelector('#download').classList.add('active')
});
</script>
</head>
<body>
<div id="header">
<h1>1719 Coach App</h1>
</div>
<div id="js-is-dumb">
<table>
<tr v-for="team in teams">
<td>{{team.team_number}}</td>
<td @click="onTeamClick(team)" class="team">
{{team.nickname}}
</td>
</tr>
</table>
<div class="refresh" @click="refresh">
<p class="refresh-text">REFRESH</p>
<p v-html="last_modified"></p>
</div>
<div class="logger" @click="loggerToggle">
<p v-html="logger_status"></p>
<div v-if="show_logs">
<p v-html="log" v-for="log in logs" class="log-item"></p>
</div>
</div>
<div class="year">
<label for="year">YEAR:</label>
<input id="year" type="number" v-model.number="year"></input>
<label for="filter">SEARCH:</label>
<input id="filter" v-model="event_name_filter"></input>
</div>
<hr>
<div v-if="visible_events.length">
<ol class="event-list">
<li v-for="(event, ind) in visible_events" @click="eventClick" :data-event="ind">
<p v-if="selected_index == ind" class="selected-event"><b>{{ ind + 1 }}. {{ event.name }}</b></p>
<p v-if="selected_index != ind">{{ ind + 1 }}. {{ event.name }}</p>
</li>
</ol>
</div>
</div>
<div id="download">
<h2 id="dlbtn">
Please download this page!
</h2>
</div>
<script>
document.querySelector('#dlbtn').addEventListener('click',function(e){
prompt.prompt();
});
</script>
<!-- Hack -->
<script src="index.js"></script>
</body>
</html>