-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
266 lines (249 loc) · 13.9 KB
/
index.html
File metadata and controls
266 lines (249 loc) · 13.9 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
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
<!DOCTYPE html>
<html lang="en">
<head>
<title>Linkagram - Find All the words</title>
<meta name="description" content="Find all the words on a 4x4 grid. A new puzzle is available each day.">
<meta charset="utf-8" />
<meta name="viewport" content="viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<link rel="apple-touch-icon-precomposed" sizes="57x57" href="/apple-touch-icon-57x57.png" />
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="/apple-touch-icon-114x114.png" />
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="/apple-touch-icon-72x72.png" />
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/apple-touch-icon-144x144.png" />
<link rel="apple-touch-icon-precomposed" sizes="60x60" href="/apple-touch-icon-60x60.png" />
<link rel="apple-touch-icon-precomposed" sizes="120x120" href="/apple-touch-icon-120x120.png" />
<link rel="apple-touch-icon-precomposed" sizes="76x76" href="/apple-touch-icon-76x76.png" />
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="/apple-touch-icon-152x152.png" />
<link rel="icon" type="image/png" href="/favicon-196x196.png" sizes="196x196" />
<link rel="icon" type="image/png" href="/favicon-96x96.png" sizes="96x96" />
<link rel="icon" type="image/png" href="/favicon-32x32.png" sizes="32x32" />
<link rel="icon" type="image/png" href="/favicon-16x16.png" sizes="16x16" />
<link rel="icon" type="image/png" href="/favicon-128.png" sizes="128x128" />
<meta name="application-name" content="Daily word game" />
<meta name="msapplication-TileColor" content="#0A0A1A" />
<meta name="msapplication-TileImage" content="/mstile-144x144.png" />
<meta name="msapplication-square70x70logo" content="/mstile-70x70.png" />
<meta name="msapplication-square150x150logo" content="/mstile-150x150.png" />
<meta name="msapplication-wide310x150logo" content="/mstile-310x150.png" />
<meta name="msapplication-square310x310logo" content="/mstile-310x310.png" />
<meta name="theme-color" content="#0a0a1a">
<meta property="description" content="Find all the words on a 4x4 grid. A new puzzle is available each day.">
<meta property="og:title" content="Linkagram - Daily fun word puzzle" />
<meta property="og:site_name" content="Linkagram" />
<meta property="og:url" content="https://linkagram.jasoncabot.me" />
<meta property="og:description" content="Find all words in a grid in this fun, addictive word game by Jason Cabot" />
<meta property="og:image" itemprop="image" content="https://linkagram.jasoncabot.me/assets/sample.png">
<meta property="og:image:width" content="256" />
<meta property="og:image:height" content="256" />
<meta property="article:author" content="https://jasoncabot.me" />
<style>html,body{background:linear-gradient(135deg,#0a0a1a,#1a0a2e,#0d1b2a,#0a0a1a);background-attachment:fixed;margin:0;height:100vh;height:100dvh;overflow:hidden;color:rgba(255,255,255,0.9)}</style>
<link rel="stylesheet" href="/src/sass/main.scss">
<script type="module" src="/src/index.ts"></script>
</head>
<body>
<div class="hidden">
<h1>Linkagram</h1>
<h2>Play for free this daily fun word game</h2>
<p>Find all words in a grid, using each letter only once</p>
<p>Todays letters are shown below. You can use each letter only once per word and need to try and find all of them. The total amount of words to find include 3000 of the most common english words, so although you might know words that aren't recognised, that's because a larger word list is just less fun to complete!</p>
</div>
<div class="app">
<header class="app-header" id="button-container">
<button id="menu-button" class="icon-btn" aria-label="Menu">
<svg viewBox="0 0 24 24"><path d="M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58a.49.49 0 00.12-.61l-1.92-3.32a.488.488 0 00-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.44.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.07.62-.07.94s.02.64.07.94l-2.03 1.58a.49.49 0 00-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z"/></svg>
</button>
</header>
<aside id="wordlist-panel" class="wordlist-panel">
<div id="wordlist"></div>
</aside>
<main id="game" class="game-area">
<div id="total-found"></div>
<div id="board">
<table tabindex="0"></table>
</div>
<div id="current-word"></div>
<svg id="connections">
<defs>
<filter id="glow-filter" x="-50%" y="-50%" width="200%" height="200%">
<feGaussianBlur in="SourceGraphic" stdDeviation="3" result="blur" />
<feMerge>
<feMergeNode in="blur" />
<feMergeNode in="SourceGraphic" />
</feMerge>
</filter>
</defs>
</svg>
</main>
</div>
<!-- Mobile bottom sheet -->
<div id="wordlist-sheet" class="bottom-sheet">
<div class="bottom-sheet-handle" id="bottom-sheet-handle"></div>
<div class="bottom-sheet-peek" id="bottom-sheet-peek">
<span id="total-found-mobile"></span>
</div>
<div class="bottom-sheet-content" id="wordlist-sheet-content"></div>
</div>
<div class="bottom-sheet-backdrop" id="bottom-sheet-backdrop"></div>
<!-- Definition modal -->
<div class="modal" id="define-modal">
<div class="modal-background" id="define-modal-background"></div>
<div class="modal-content define-content" id="define-modal-content">
<div class="define-word" id="define-word"></div>
<div class="define-body" id="define-body"></div>
<button class="btn btn-secondary btn-fullwidth" id="define-modal-close">Close</button>
</div>
</div>
<!-- Wordlist modal -->
<div class="modal" id="wordlist-modal">
<div class="modal-background" id="wordlist-modal-background"></div>
<div class="modal-content" id="wordlist-modal-content"></div>
</div>
<!-- Hints modal -->
<div class="modal" id="hints-modal">
<div class="modal-background" id="hints-modal-background"></div>
<div class="modal-content" id="hints-modal-content">
<h1>Hints</h1>
<p>Show the word list by selecting the number of found and total words</p>
<p>Use hints by selecting an unknown word from the word list to reveal a single letter</p>
<p>You have <span id="hint-count">0</span> hints remaining. You get topped up to 4 hints each day. You can also buy 12 more for <span id="hint-price">99p</span> as a nice thing to do 😊</p>
<div id="get-hints-pay">
<button id="payment-request-loading" class="btn btn-primary btn-fullwidth loading" onclick="alert('Try adding a payment method to your browser')">How do I get more hints?</button>
<div id="payment-request-button"></div>
</div>
</div>
</div>
<!-- How to play modal -->
<div class="modal" id="how-to-play-modal">
<div class="modal-background" id="how-to-play-modal-background"></div>
<div class="modal-content" id="how-to-play-modal-content">
<h1>How to Play</h1>
<div class="carousel" id="how-to-play-carousel">
<div class="carousel-track" id="carousel-track">
<div class="carousel-slide">
<img src="/assets/help/finding-words.gif" alt="Finding words by swiping" />
<p>Swipe across linked letters to form words</p>
</div>
<div class="carousel-slide">
<img src="/assets/help/using-hints.gif" alt="Using hints" />
<p>Stuck? Use hints to reveal letters</p>
</div>
<div class="carousel-slide">
<img src="/assets/help/completing-puzzle.gif" alt="Completing the puzzle" />
<p>Find all the words to complete the puzzle</p>
</div>
<div class="carousel-slide">
<img src="/assets/help/get-definition.gif" alt="Get word definition" />
<p>Tap a word to see its definition</p>
</div>
</div>
<div class="carousel-dots" id="carousel-dots">
<button class="carousel-dot active" data-index="0"></button>
<button class="carousel-dot" data-index="1"></button>
<button class="carousel-dot" data-index="2"></button>
<button class="carousel-dot" data-index="3"></button>
</div>
</div>
<div style="display:flex;justify-content:center;gap:0.75rem">
<button id="how-to-play-modal-close-ok" class="btn btn-primary">
<svg viewBox="0 0 24 24"><path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z"/></svg>
<span>Play</span>
</button>
<button id="show-hints" class="btn btn-secondary">
<svg viewBox="0 0 24 24"><path d="M11 18h2v-2h-2v2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4z"/></svg>
<span>Hints</span>
</button>
</div>
</div>
</div>
<!-- Suggest a word modal -->
<div class="modal" id="suggest-modal">
<div class="modal-background" id="suggest-modal-background"></div>
<div class="modal-content" id="suggest-modal-content">
<h1>Suggest a Word</h1>
<p>Missing a word from the dictionary? Suggest it and we'll review it.</p>
<div class="suggest-word-input">
<input type="text" id="suggest-word-input" placeholder="Enter a word" maxlength="16" autocomplete="off" autocapitalize="none" />
<button id="suggest-word-button" class="btn btn-primary">Suggest</button>
</div>
<div id="suggest-word-feedback" class="suggest-word-feedback"></div>
</div>
</div>
<!-- Stats modal -->
<div class="modal" id="stats-modal">
<div class="modal-background" id="stats-modal-background"></div>
<div class="modal-content" id="stats-modal-content">
<h1>Your Personal Stats</h1>
<table>
<tbody>
<tr>
<td>Played</td>
<td id="stats-played">--</td>
</tr>
<tr>
<td>Completed</td>
<td id="stats-completed">--</td>
</tr>
<tr>
<td>Streak</td>
<td id="stats-streak">--</td>
</tr>
<tr>
<td>Max Streak</td>
<td id="stats-max-streak">--</td>
</tr>
</tbody>
</table>
<div style="display:flex;justify-content:center;gap:0.5rem">
<button id="share-button" class="btn btn-primary">
<svg viewBox="0 0 24 24"><path d="M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81 1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.79 0 1.5-.31 2.04-.81l7.12 4.16c-.05.21-.08.43-.08.65 0 1.61 1.31 2.92 2.92 2.92s2.92-1.31 2.92-2.92-1.31-2.92-2.92-2.92z"/></svg>
<span>Share</span>
</button>
</div>
<div style="text-align:center;margin-top:0.75rem">
<a id="global-stats-link" href="/stats" style="color:rgba(255,255,255,0.4);font-size:0.8rem;text-decoration:none">View global stats →</a>
</div>
</div>
</div>
<!-- Menu modal -->
<div class="modal" id="menu-modal">
<div class="modal-background" id="menu-modal-background"></div>
<div class="modal-content" id="menu-modal-content">
<nav class="menu-list">
<button class="menu-item" id="menu-how-to-play">
<svg viewBox="0 0 24 24"><path d="M11 18h2v-2h-2v2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4z"/></svg>
<span>How to Play</span>
</button>
<button class="menu-item" id="menu-stats">
<svg viewBox="0 0 24 24"><path d="M6 20h2V10H6v10zm4 0h2V4h-2v16zm4 0h2v-8h-2v8z"/></svg>
<span>Stats</span>
</button>
<button class="menu-item" id="menu-suggest">
<svg viewBox="0 0 24 24"><path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/></svg>
<span>Suggest a Word</span>
</button>
<button class="menu-item" id="menu-settings">
<svg viewBox="0 0 24 24"><path d="M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58a.49.49 0 00.12-.61l-1.92-3.32a.488.488 0 00-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.44.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.07.62-.07.94s.02.64.07.94l-2.03 1.58a.49.49 0 00-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z"/></svg>
<span>Settings</span>
</button>
</nav>
</div>
</div>
<!-- Settings modal -->
<div class="modal" id="settings-modal">
<div class="modal-background" id="settings-modal-background"></div>
<div class="modal-content" id="settings-modal-content">
<h1>Settings</h1>
<div id="settings-section" class="settings-section">
<div class="settings-row">
<span>Haptics</span>
<label class="toggle">
<input type="checkbox" id="haptics-toggle" checked />
<span class="toggle-slider"></span>
</label>
</div>
</div>
<div class="settings-version" id="settings-version"></div>
</div>
</div>
<canvas id="celebration"></canvas>
</body>
</html>