-
Notifications
You must be signed in to change notification settings - Fork 1
/
prompt.html
273 lines (268 loc) · 9.14 KB
/
prompt.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
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
<!DOCTYPE html>
<html>
<head>
<title id="t">TeaBag tea choices</title>
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@300&display=swap" rel="stylesheet">
<link rel='icon' href='https://lb123658.github.io/tea/img/favicon.png' type='image/png'/>
<link href="https://fonts.googleapis.com/css2?family=Material+Icons" rel="stylesheet">
<style>
body {
background: #2F3137;
}
* {
font-family: 'Montserrat', sans-serif;
user-select: none;
color: white;
font-size: 20px;
}
.option {
width: 200px;
background: #282828;
border-radius: 15px;
border: none;
font-size: 20px;
margin: 0px 20px 20px 20px;
padding: 10px;
cursor: pointer;
max-height: 120px;
}
.option:hover {
border-radius: 7px;
background: #484848;
}
#div {
width: 80%;
position: absolute;
top: 50px;
left: 10%;
}
.p {
width: 100%;
text-align: center;
}
#brewbanner {
position: fixed;
right: 85px;
bottom: 20px;
background: grey;
color: white;
border-radius: 2px;
padding: 5px;
visibility: hidden;
z-index: 1;
font-size: 17px;
}
.icon {
width: 60px;
height: 60px;
background: #2F3137;
border: none;
color: #5765F2;
border-radius: 15px;
}
.icon:hover {
border-radius: 7px;
}
#brew {
position: fixed;
bottom: 20px;
right: 20px;
z-index: 1;
background: #5765F2;
}
#go:hover {
background: #5765f2;
}
</style>
</head>
<body>
<div id="div">
<p class="p">Choose your teapot.<br><br>
<button class="option" id="potA" onclick="teapota()"><b>Default teapot</b><br><br>A plain grey teapot</button>
<button class="option" id="potB" onclick="teapotb()"><b>Red teapot</b><br><br>Upgraded teapot that's red</button>
<button class="option" id="potC" onclick="teapotc()"><b>Golden teapot</b><br><br>Yellow teapot that costs $30</button>
<button class="option" id="potD" onclick="teapotd()"><b>Emerald teapot</b><br><br>Expensive green teapot</button>
<br><br>
Choose your type of tea.<br><br>
<button class="option" id="boxA" onclick="teaboxa()"><b>Black tea</b><br><br>A box of plain black tea</button>
<button class="option" id="boxB" onclick="teaboxb()"><b>Rooibos tea</b><br><br>A box of rooibos tea</button>
<button class="option" id="boxC" onclick="teaboxc()"><b>Tumeric tea</b><br><br>A box of tumeric tea</button>
<button class="option" id="boxD" onclick="teaboxd()"><b>Green tea</b><br><br>A box of $50 green tea</button>
<br><br>
Choose your teacup.<br><br>
<button class="option" id="cupA" onclick="teacupa()"><b>Default teacup</b><br><br>A plain grey teacup</button>
<button class="option" id="cupB" onclick="teacupb()"><b>Red teacup</b><br><br>A bright red teacup</button>
<button class="option" id="cupC" onclick="teacupc()"><b>Golden teacup</b><br><br>It might be solid gold</button>
<button class="option" id="cupD" onclick="teacupd()"><b>Emerald teacup</b><br><br>A very green teacup</button>
<br><br>
--Not selecting anything will use your selections from last time--
<br><br>
<button class="option" onclick="seguir()" id="go">Brew tea</button>
</p>
</div>
<button class="icon" id="brew" onmouseover="brewHover()" onmouseout="brewUnhover()" onclick="closeT()"><span class="material-icons" style="font-size:30px;">close</span></button>
<p id="brewbanner">Close tea options</p>
<script>
var brewbanner = document.getElementById("brewbanner");
function brewHover() {
brewbanner.style.visibility = "visible";
}
function brewUnhover() {
brewbanner.style.visibility = "hidden";
}
function closeT() {
location.replace("game");
}
function teapota() {
var first = "teapot=img/teapot.svg";
document.getElementById("potA").style.background = "#5765f2";
document.getElementById("potB").style.background = "#282828";
document.getElementById("potC").style.background = "#282828";
document.getElementById("potD").style.background = "#282828";
localStorage.setItem("first", first);
}
function teapotb() {
var first = "teapot=img/teapot-red.svg";
document.getElementById("potA").style.background = "#282828";
document.getElementById("potB").style.background = "#5765f2";
document.getElementById("potC").style.background = "#282828";
document.getElementById("potD").style.background = "#282828";
localStorage.setItem("first", first);
}
function teapotc() {
var first = "teapot=img/teapot-golden.svg";
document.getElementById("potA").style.background = "#282828";
document.getElementById("potB").style.background = "#282828";
document.getElementById("potC").style.background = "#5765f2";
document.getElementById("potD").style.background = "#282828";
localStorage.setItem("first", first);
}
function teapotd() {
var first = "teapot=img/teapot-emerald.svg";
document.getElementById("potA").style.background = "#282828";
document.getElementById("potB").style.background = "#282828";
document.getElementById("potC").style.background = "#282828";
document.getElementById("potD").style.background = "#5765f2";
localStorage.setItem("first", first);
}
function teaboxa() {
var second = "box=img/box.svg";
document.getElementById("boxA").style.background = "#5765f2";
document.getElementById("boxB").style.background = "#282828";
document.getElementById("boxC").style.background = "#282828";
document.getElementById("boxD").style.background = "#282828";
localStorage.setItem("second", second);
}
function teaboxb() {
var second = "box=img/box-red.svg";
document.getElementById("boxA").style.background = "#282828";
document.getElementById("boxB").style.background = "#5765f2";
document.getElementById("boxC").style.background = "#282828";
document.getElementById("boxD").style.background = "#282828";
localStorage.setItem("second", second);
}
function teaboxc() {
var second = "box=img/box-yellow.svg";
document.getElementById("boxA").style.background = "#282828";
document.getElementById("boxB").style.background = "#282828";
document.getElementById("boxC").style.background = "#5765f2";
document.getElementById("boxD").style.background = "#282828";
localStorage.setItem("second", second);
}
function teaboxd() {
var second = "box=img/grntea.svg";
document.getElementById("boxA").style.background = "#282828";
document.getElementById("boxB").style.background = "#282828";
document.getElementById("boxC").style.background = "#282828";
document.getElementById("boxD").style.background = "#5765f2";
localStorage.setItem("second", second);
}
function teacupa() {
var third = "cup=img/cup.svg";
document.getElementById("cupA").style.background = "#5765f2";
document.getElementById("cupB").style.background = "#282828";
document.getElementById("cupC").style.background = "#282828";
document.getElementById("cupD").style.background = "#282828";
localStorage.setItem("third", third);
}
function teacupb() {
var third = "cup=img/cup-red.svg";
document.getElementById("cupA").style.background = "#282828";
document.getElementById("cupB").style.background = "#5765f2";
document.getElementById("cupC").style.background = "#282828";
document.getElementById("cupD").style.background = "#282828";
localStorage.setItem("third", third);
}
function teacupc() {
var third = "cup=img/cup-yellow.svg";
document.getElementById("cupA").style.background = "#282828";
document.getElementById("cupB").style.background = "#282828";
document.getElementById("cupC").style.background = "#5765f2";
document.getElementById("cupD").style.background = "#282828";
localStorage.setItem("third", third);
}
function teacupd() {
var third = "cup=img/greencup.svg";
document.getElementById("cupA").style.background = "#282828";
document.getElementById("cupB").style.background = "#282828";
document.getElementById("cupC").style.background = "#282828";
document.getElementById("cupD").style.background = "#5765f2";
localStorage.setItem("third", third);
}
function seguir() {
var url = "https://lb123658.github.io/tea/animation?" + localStorage.getItem("first") + "&" + localStorage.getItem("second") + "&" + localStorage.getItem("third");
location.replace(url);
}
// local storage to see if you own items
var Pota = localStorage.getItem("Pota");
var Potb = localStorage.getItem("Potb");
var Potc = localStorage.getItem("Potc");
var Potd = localStorage.getItem("Potd");
var Boxa = localStorage.getItem("Boxa");
var Boxb = localStorage.getItem("Boxb");
var Boxc = localStorage.getItem("Boxc");
var Boxd = localStorage.getItem("Boxd");
var Cupa = localStorage.getItem("Cupa");
var Cupb = localStorage.getItem("Cupb");
var Cupc = localStorage.getItem("Cupc");
var Cupd = localStorage.getItem("Cupd");
if (Pota == 0) {
document.getElementById("potA").style.pointerEvents = "none";
}
if (Potb == 0) {
document.getElementById("potB").style.pointerEvents = "none";
}
if (Potc == 0) {
document.getElementById("potC").style.pointerEvents = "none";
}
if (Potd == 0) {
document.getElementById("potD").style.pointerEvents = "none";
}
if (Boxa == 0) {
document.getElementById("boxA").style.pointerEvents = "none";
}
if (Boxb == 0) {
document.getElementById("boxB").style.pointerEvents = "none";
}
if (Boxc == 0) {
document.getElementById("boxC").style.pointerEvents = "none";
}
if (Boxd == 0) {
document.getElementById("boxD").style.pointerEvents = "none";
}
if (Cupa == 0) {
document.getElementById("cupA").style.pointerEvents = "none";
}
if (Cupb == 0) {
document.getElementById("cupB").style.pointerEvents = "none";
}
if (Cupc == 0) {
document.getElementById("cupC").style.pointerEvents = "none";
}
if (Cupd == 0) {
document.getElementById("cupD").style.pointerEvents = "none";
}
</script>
</body>
</html>