-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
145 lines (133 loc) · 5.3 KB
/
index.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
<!DOCTYPE html>
<html>
<head>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-RNR15ZWEVB"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-RNR15ZWEVB');
</script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css" />
<script src="https://kit.fontawesome.com/6f3a6d4b55.js" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Wordle For Two - One Device - Pass n' Play</title>
<link href="style.css" rel="stylesheet" type="text/css" />
<link rel="icon" type="image/x-icon" href="/w42_favicon.png">
</head>
<body>
<img src=w42_banner_alT.png id="header" style="margin:0;padding:0;image-rendering: pixelated;" alt="Wordle For Two"></img>
<span id="phase1" style="color:White">
<br>
<br>
<span style="color:rgb(189,164,166)" id="p1header"><strong>Player 1</strong></span>
<br>
Pick your five-letter word for player 2 to guess.
<br>
Don't let them see!
<br>
<br>
You can pass 'n play on this device, or get a link to share with your friends.
<br>
<br>
<label for="word" style="color:White">Your secret word:</label>
<input type="text" id="word" name="word" autocomplete="off">
<br>
<div class="spacer"></div>
<div id="buttons-container">
<button type="button" id="wordentry">Play here</button><!--
--><button type="button" id="sendlink">Share link</button>
</div>
<br>
<label for="hideinput">Make my input look secret</label>
<input type="checkbox" id="hideinput">
<p style="color:Gray" hidden="false" id="warn">Must be a real five-letter
word!</p>
<div id="new-event-box" class="expandable-box">
<div class="box-header" onclick="toggleBox()">
<strong>New Event: Who are you?</strong>
</div>
<div id="box-content" class="box-content" style="display: none;">
<p>We made this website as a gift for our dad's birthday. I never anticipated that it would have upwards of 60 daily active users (thank you!).
I thought it might be nice to get to know my user base. Who are you? Are you a student playing on a school laptop? Someone who likes sending their coworkers unreasonably difficult WordleForTwo links and watching them suffer?
Not a person at all; just a robot built to trick me into thinking I have users? <br><br>Whoever you may be, just tell me. Maybe a couple fun facts about yourself, if you like the site, and your name + where you're from. The winning entry will receive <strong>$200</strong>.</p>
<input type="text" id="userResponse" name="userResponse" placeholder="Enter your response...">
<button onclick="submitResponse()">Submit</button>
</div>
</div>
</span>
<div id="phase2" hidden="true">
<p style="color:Cyan"><strong>Player 2</strong></p>
<div id="board-container">
<div id="board">
</div>
</div>
<br>
<div id="keyboard-container">
<div class="keyboard-row">
<button data-key="q">q</button>
<button data-key="w">w</button>
<button data-key="e">e</button>
<button data-key="r">r</button>
<button data-key="t">t</button>
<button data-key="y">y</button>
<button data-key="u">u</button>
<button data-key="i">i</button>
<button data-key="o">o</button>
<button data-key="p">p</button>
</div>
<div class="keyboard-row">
<div class="spacer-half"></div>
<button data-key="a">a</button>
<button data-key="s">s</button>
<button data-key="d">d</button>
<button data-key="f">f</button>
<button data-key="g">g</button>
<button data-key="h">h</button>
<button data-key="j">j</button>
<button data-key="k">k</button>
<button data-key="l">l</button>
<div class="spacer-half"></div>
</div>
<div class="keyboard-row">
<button data-key="enter" class="wide-button">enter</button>
<button data-key="z">z</button>
<button data-key="x">x</button>
<button data-key="c">c</button>
<button data-key="v">v</button>
<button data-key="b">b</button>
<button data-key="n">n</button>
<button data-key="m">m</button>
<button data-key="del" class="wide-button">back</button>
</div>
</div>
<br>
<br>
</div>
<script>
function toggleBox() {
var content = document.getElementById("box-content");
content.style.display = content.style.display === "none" ? "block" : "none";
}
function submitResponse() {
var response = document.getElementById("userResponse").value;
fetch("https://eokhtxsn01cpax8.m.pipedream.net", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({ response: response })
}).then(response => {
alert("We received your response. Thank you! Also, I know I said there was a $200 prize, but... there's not. Sorry.");
}).catch(error => {
console.error("Error submitting response:", error);
});
}
</script>
<script src="wordlist.js"></script>
<script src="script.js"></script>
</body>
</html>