-
Notifications
You must be signed in to change notification settings - Fork 1
/
onboarding.html
138 lines (138 loc) · 5.16 KB
/
onboarding.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link
rel="shortcut icon"
href="//sandervonk.github.io/VITE/img/icon/app/icon-512x512.png"
type="image/png"
/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link
rel="shortcut icon"
href="//sandervonk.github.io/VITE/img/icon/app/icon-512x512.png"
type="image/png"
/>
<link rel="stylesheet" href="css/common.css?version=[-version-number-]" />
<link rel="stylesheet" href="css/theme.css?version=[-version-number-]" />
<link rel="stylesheet" href="css/onboard.css?version=[-version-number-]" />
<link
rel="stylesheet"
href="css/theme-dark.css?version=[-version-number-]"
media="(prefers-color-scheme: unset) and not(print)"
id="theme-dark-stylesheet"
/>
<meta name="theme-color" id="theme-light-color" id="theme-light-color" content="#FFFFFF" />
<meta name="theme-color" id="theme-light-color" content="#FFFFFF" />
<meta
name="apple-mobile-web-app-status-bar"
id="theme-dark-color"
media="prefers-color-scheme: unset"
content="#131F22"
/>
<meta
name="theme-color"
id="theme-dark-color"
media="prefers-color-scheme: unset"
content="#131F22"
/>
<script src="//ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script src="//www.gstatic.com/firebasejs/8.10.0/firebase-app.js"></script>
<script src="//www.gstatic.com/firebasejs/8.10.0/firebase-auth.js"></script>
<script src="//www.gstatic.com/firebasejs/8.10.0/firebase-firestore.js"></script>
<script src="//www.gstatic.com/firebasejs/8.10.0/firebase-messaging.js"></script>
<title>VITE! - Get Started</title>
</head>
<body>
<header>
<button id="back-button" class="progress-button"></button>
<div id="progress-bar">
<div id="progress-fill">
<div id="progress-fill-accent"></div>
</div>
</div>
</header>
<form id="level-form" action="./app/" method="get">
<input type="text" id="path-input" name="path" style="display: none" />
<input
type="text"
id="tutorial-input"
name="showTutorial"
style="display: none"
value="true"
/>
<input type="text" id="classPanel" name="classPanel" style="display: none" value="false" />
<div class="box option" name="beginner">
<div class="option-icon">
<img src="img/icon/onboard/Egg.svg" alt="Beginner Path" />
</div>
<div class="option-text">
<div class="option-text-title bold">Just Starting French?</div>
<div class="option-text-summary secondary">Start here with the présent tense</div>
</div>
</div>
<div class="box option" name="learning">
<div class="option-icon">
<img src="img/icon/onboard/Book Icon.svg" alt="Learning Path" />
</div>
<div class="option-text">
<div class="option-text-title bold">Learning French?</div>
<div class="option-text-summary secondary">Try working with the past tense and more</div>
</div>
</div>
<div class="box option" name="advanced">
<div class="option-icon">
<img src="img/icon/onboard/Cap.svg" alt="Advanced Path" />
</div>
<div class="option-text">
<div class="option-text-title bold">Doing well already?</div>
<div class="option-text-summary secondary">Work on advanced tenses</div>
</div>
</div>
<div class="box option" name="custom">
<div class="option-icon">
<img src="img/icon/onboard/Pencil.svg" alt="Custom Path" />
</div>
<div class="option-text">
<div class="option-text-title bold">Something else?</div>
<div class="option-text-summary secondary">Customize your experience</div>
</div>
</div>
</form>
</body>
<script src="js/util.js?version=[-version-number-]"></script>
<script src="js/firestore-page-auth.js?version=[-version-number-]"></script>
<script>
if (params.get("classPanel") == "true") {
$("#classPanel").val("true");
}
if (params.get("showTutorial") == "false") {
document.getElementById("tutorial-input").value = "false";
document.getElementById("back-button").addEventListener("click", (e) => {
window.history.go(-1);
});
} else {
document.getElementById("back-button").addEventListener("click", (e) => {
e.preventDefault();
auth.signOut();
});
}
for (element of document.getElementsByClassName("box option")) {
element.addEventListener("click", function (e) {
//setup from template
db.collection("templateUsers")
.doc(e.target.getAttribute("name"))
.get()
.then((levelJSON) => {
userDoc()
.set(levelJSON.data(), { merge: true })
.then(() => {
document.getElementById("path-input").value = e.target.getAttribute("name");
e.target.parentElement.submit();
});
});
});
}
</script>
</html>