-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
187 lines (142 loc) · 6.54 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
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Backwords</title>
<link rel ="shortcut icon" type="image/png" href="images/favicon.png">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" xcrossorigin>
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans:wght@500&display=swap" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous">
<link rel="stylesheet" href="style.css">
<script src="https://kit.fontawesome.com/yourcode.js" crossorigin="anonymous"></script>
<script type = "text/javascript" src = "variable.js"></script>
</head>
<script async src="https://www.googletagmanager.com/gtag/js?id=G-4WKLK3DQF1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-4WKLK3DQF1');
</script>
<body>
<nav class="justify-content-center navbar bg-body-tertiary" style="border-bottom: 1px solid #6A6356;; height: 55px; size: 10px;">
<div class="container-fluid">
<button id="instructions" onclick="togglePopup()">?</button>
<a class="navbar-brand">
<img class="logo_image" src="images/logio.png" alt="Backwords" width="70" height="50" class="d-inline-block align-text-top">
</a>
</div>
</nav>
<div class="popup" id="popup-1">
<div class="overlay" onclick="togglePopup()">
<div class="content">
<p id="btn-text">Guess the two-word prompt which AI used to generate this image!</p>
<p id="btn-text">Each guess will have its words ranked based on proximity in meaning within a list of 25,000 words.</p>
<p id="btn-text">And, you'll be told if you guess any letters that are also in the final word</p>
<p id="btn-text">If you get stuck, you can press the hint button to be given a letter.</p>
<p id="btn-text">Have questions? help@backwords.xyz</p>
<p id="btn-text">Press [Esc] to toggle these instructions.</p>
</div>
</div>
</div>
<div class="share" id="share-1">
<div class="overlay">
<div class="content">
<p id="btn-text">Congrats! You got it.</p>
<p id="final-1" class="btn-text">The phrase was: Placeholder Text</p>
<br>
<p id="btn-text">Stats:</p>
<p class="btn-text" id="final-2">Backwords: 001</p>
<p class="btn-text" id="final-3">01 Attempts 🟨🟨🟨🟨b</p>
<p class="btn-text" id="final-4">2/3 Hints 🟨🟨🟨</p>
<p class="btn-text" id="final-5">1 Day Streak 🐢</p>
<textarea id="plswork">www</textarea>
<button id="share-button" onclick="copyFunction()">Copy<i class="fa-light fa-share-nodes"></i></button>
<a id="tweet-balls" href="#" onclick="f1(); return false;"><button id="share-button-tweet" onclick="copyFunction()">Tweet<i class="fa-light fa-share-nodes"></i></button></a>
<div class="close-btn" onclick="toggleshare()"> ×</div>
</div>
</div>
</div>
<div class="d-flex justify-content-center" id="initial_box">
<div class="image-box">
<img id="test" src="placeholder.png" />
</div>
</div>
<div class="d-flex justify-content-center" id="second_box">
<form action="" autocomplete="off" class="guess_form" id="user_form">
<input id="textbox" class="word_guess" type="text" placeholder="Enter"/>
<input class="word_guess" id = "textbox1" type="text" placeholder="Here"/>
</form>
</div>
<div class="d-flex justify-content-center" id="sub_flex">
<button id="submit_button">Submit</button>
</div>
<div class="d-flex justify-content-center" id="similarity_box">
<div class="progress-section">
<div id = "score1" class="score-text"></div>
<div id = "score2" class="score-text"></div>
<div class="progress-bar">
<progress id="semantic_score1" max="100" value="0"></progress>
</div>
<div class="progress-bar">
<progress id="semantic_score2" max="100" value="0"></progress>
</div>
<div id = "hint1" class="score-text"></div>
<div id = "hint2" class="score-text"></div>
</div>
</div>
<div class="d-flex justify-content-center" id="hint_flex">
<button id="hint_button">Hint!</button>
</div>
<div class="d-flex justify-content-center" id="hint_flex">
<div id="score" class="hint-box"></div>
</div>
<footer>
Made by Sam and Andrew <br>
<a href="https://buymeacoffee.com/backwords" style="color: black;">Support us here</a><br>
<div id="countdown" class="timer"></div>
<div id="views"></div>
</footer>
</body>
</html>
<script src="index.js"></script>
<script>
// Set the date we're counting down to
var countDownDate = new Date();
countDownDate.setDate(countDownDate.getDate() + 1); // Set the countdown to the next day
countDownDate.setHours(0, 0, 0, 0); // Set the countdown to midnight
// Update the count down every 1 second
var x = setInterval(function () {
// Get today's date and time
var now = new Date().getTime();
// Find the distance between now and the countdown date
var distance = countDownDate - now;
// Time calculations for days, hours, minutes and seconds
var hours = Math.floor(
(distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)
);
var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
var seconds = Math.floor((distance % (1000 * 60)) / 1000);
// Add a leading zero to the hours, minutes, and seconds if they are less than 10
if (hours < 10) {
hours = "0" + hours;
}
if (minutes < 10) {
minutes = "0" + minutes;
}
if (seconds < 10) {
seconds = "0" + seconds;
}
// Display the result in the element with id="countdown"
document.getElementById("countdown").innerHTML =
"Time until next prompt: " + hours + ":" + minutes + ":" + seconds;
// If the countdown is finished, write some text
if (distance < 0) {
clearInterval(x);
document.getElementById("countdown").innerHTML =
"Time until next prompt: EXPIRED";
}
}, 1000);
</script>