-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
287 lines (250 loc) · 13.5 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
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
274
275
276
277
278
279
280
281
282
283
284
285
286
287
<!doctype html>
<html lang="en">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta property="og:type" content="website"/>
<meta property="og:site_name" content="LingoStories"/>
<meta property="og:description" content="Free interactive stories for language learners." />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="manifest" href="/site.webmanifest">
<title>LingoStories - free interactive stories for language learners</title>
<script type="module" src="js/main.js"></script>
<script src="js/third_party/ink.js"></script>
<link rel="stylesheet" href="style.css">
<div class="top">
<div class="icon-bar">
<a href="/" id="back-icon"><img src="img/back.svg" class="icon top-icon" title="Back to the story list"></a>
<a href="/" id="home-icon"><img src="img/home.svg" class="icon top-icon" title="Back to the main page"></a>
<img src="img/options.svg" class="icon top-icon" title="Settings" onclick="toggleOptions()">
<img src="img/restart.svg" id="restart-icon" class="icon top-icon" title="Restart the story" onclick="resetStory(); next();"></a>
<div id="collection-count" class="text-icon" onclick="toggleCollection();"></div>
</div>
<div class="options">
<ul>
<li>
<label for="reading-mode">Story Mode</label>
<select id="reading-mode">
<option title="Show the transcript immediately" value="audioAndText">Listening & Reading</option>
<option title="Show the transcript after a click" value="audioFirst">Listening</option>
<option title="Disable audio" value="textOnly">Reading</option>
<option title="Automatically play the next sentence" value="autoAdvance">Auto play</option>
</select>
<p class="legend" id="reading-mode-legend"></p>
<li>
<label for="audio-volume">Volume</label>
<input type="range" min="0" max="1" step="0.01" value="1" class="slider" id="audio-volume">
<li title="How fast the voice speaks">
<label for="voice-speed">Voice speed</label>
<input type="range" min="0.4" max="1.2" step="0.2" value="1" class="slider" id="voice-speed">
<!-- <li title="Voice used for the local TTS, which is used only as a backup"> <label>Voice (unused)</label>
<select id="voice"></select> -->
<li title="Automatically show the translation below the transcript">
<label for="show-translations">Show translations</label>
<input type="checkbox" id="show-translations">
<p class="legend" id="show-translations-legend"></p>
<li title="Language used for the translations">
<label for="translation-lang">Translation</label>
<select id="translation-lang">
<option value="en">English</option>
<option value="fr">French</option>
<option value="de">German</option>
<option value="nl">Dutch</option>
<option value="pl">Polish</option>
<option value="pt">Portuguese</option>
<option value="es">Spanish</option>
<option value="sv">Swedish</option>
</select>
<li title="Use microphone to repeat the sentences">
<label for="use-microphone">Use microphone (experimental)</label>
<input type="checkbox" id="use-microphone">
<li>
<label>Minigames</label>
<input type="checkbox" id="enable-minigames" checked>
<p class="legend" id="enable-minigames-legend"></p>
</ul>
</div>
<div class="top-collection">
<p>Each story has images to collect. The images you collect in
this story will be will be added here.</p>
<div class="top-image-collection"></div>
</div>
</div>
<div class="main">
<div class="middle">
<div class="title home">
<h1> LingoStories </h1>
<p>
Free interactive stories for language learners.
</p>
</div>
<div class="home" id="language-selector">
<p>Select a language to practice.</p>
<ul>
<li><a href="?lang=nl"><img class="flag" src="img/flags/nl.svg"><div>Dutch</div></a>
<li><a href="?lang=en"><img class="flag" src="img/flags/us.svg"><div>English</div></a>
<li><a href="?lang=fr"><img class="flag" src="img/flags/fr.svg"><div>French</div></a>
<li><a href="?lang=de"><img class="flag" src="img/flags/de.svg"><div>German</div></a>
<li><a href="?lang=pl"><img class="flag" src="img/flags/pl.svg"><div>Polish</div></a>
<li><a href="?lang=pt"><img class="flag" src="img/flags/pt.svg"><div>Portuguese</div></a>
<li><a href="?lang=es"><img class="flag" src="img/flags/es.svg"><div>Spanish</div></a>
<li><a href="?lang=sv"><img class="flag" src="img/flags/sv.svg"><div>Swedish</div></a>
</ul>
</div>
<div class="home" id="story-selector">
<p>Select a story.</p>
<div class="story-list"></div>
</div>
<div class="in-story info-box" style="margin-top: 1em;">
<p>
<i>Check the settings in the top bar to customize your experience,
and <a href="/guide.html" target="_blank">read the user guide</a> for more information.</i>
</p>
<p>
<i>Click on any sentence to see its translation. Click the button at the bottom to continue.</i>
</p>
</div>
<div class="in-story story"></div>
<div class="story-end">
<img class="certificate" src="img/certificate-badge.svg">
<h2>Congratulations!</h2>
<p class="story-end-text"></p>
<div>
<a id="back-to-menu"><img class="icon player-icon" src="img/exit.svg" title="Choose another story"></a>
<img class="icon player-icon" src="img/restart.svg" title="Restart the story" onclick="resetStory(); next();">
</div>
</div>
<div class="info-box speech-recognition">
<img class="icon player-icon" src="img/microphone.svg" title="Speech recognition" onclick="toggleListening();">
<div class="output"></div>
</div>
<div class="in-story inventory"></div>
<div class="in-story" style="height: 30vh;"></div>
<div class="info home">
<details>
<summary><h2>What is LingoStories?</h2></summary>
<p>
LingoStories is a free platform that offers interactive stories
for language learners. The stories use simple vocabulary and
grammar to help you practice your language skills in a fun and
engaging way. You can listen to the audio, read the text in your
target language, and check the translation when needed. The
stories are available in multiple languages, and you can
customize the settings to match your learning style.</p>
<p>For more information, see <a href="guide.html">the user guide</a>.
</p>
</details>
<details>
<summary><h2>How do interactive stories work?</h2></summary>
<p>
During the story, you'll make choices, similar to the format of
Choose Your Own Adventure books. This makes the experience more
engaging, encourages you to replay stories with different
outcomes, and adds variety to the learning process.
</p>
</details>
<details>
<summary><h2>Is this website really free?</h2></summary>
<p>
Yes. LingoStories is 100% free. There are no ads, no account to create, no
arbitrary limitations. The texts are published under a Creative
Commons license. The source code is <a
href="https://github.com/laurentlb/lingostories">available</a>.
</p>
</details>
<details>
<summary><h2>How many stories are there?</h2></summary>
<p>
Currently, there are only two stories:
<ul>
<li> A Day in the Park: A simple story created as a
proof-of-concept for the website.
<li> The Grocery List: A more interactive story that remembers
the choices and includes an inventory of items.
</ul>
More stories will be added over time, and we aim to create more
complex and engaging stories in the future.
</p>
</details>
<details>
<summary><h2>How can stories help me learn a language?</h2></summary>
<p>
Stories provide natural, engaging context for language learning.
By reading or listening to stories, you encounter new vocabulary
and grammar in meaningful situations. Stories also make learning
enjoyable and help improve your comprehension and listening
skills through repeated exposure to the language.
</p><p>For language learning tips, check out the <a
href="guide.html">the user guide</a>.
</p>
</details>
<details>
<summary><h2>How can I contribute to the project?</h2></summary>
<p>
We welcome contributions! Our goal is to create a <a
href="/doc/contributing.md.html">community of contributors</a>
to write and translate stories in many languages. The list of
languages is still limited now, but you can <a
href="https://forms.gle/9djaTH25wUN74psm8">request a new
language</a> and assist with translations.
</p><p>You may discuss the project and give feedback on <a
href="https://discord.gg/SEefvsutca">Discord</a> (or reach out
to laurentlb@gmail.com).
</p>
</details>
<!--
<details>
<summary><h2></h2></summary>
<p>
</p>
</details> -->
<details>
<summary>
<h2>Updates</h2>
</summary>
<ul>
<li> <span class="date">2025-01-19</span>: Chat-GPT integration to provide explanations for sentences (only in Grocery story for longer sentences)
<li> <span class="date">2025-01-17</span>: Support for microphone (see settings), for you to repeat the sentences out loud
<li> <span class="date">2024-10-26</span>: Park: Added Dutch and Swedish translations
<li> <span class="date">2024-09-03</span>: Published <a href="guide.html">a user guide</a>
<li> <span class="date">2024-09-01</span>: New story added ("The Grocery List") for French and English, using a better game engine
<li> <span class="date">2024-07-27</span>: Add dialogue bubbles to better recognize the characters
<li> <span class="date">2024-07-16</span>: Support for direct speech, with avatars and matching voice (depending on the language)
<li> <span class="date">2024-07-03</span>: Added/fixed translations in Swedish, Dutch, German, Portuguese, and Polish
<li> <span class="date">2024-06-22</span>: Added a minigame (reorder words) + image collections
<li> <span class="date">2024-06-05</span>: New story "A Day in the Park"
<li> <span class="date">2024-03-29</span>: Added support for autoplay in the settings
<li> <span class="date">2024-03-05</span>: Published the proof of concept
</ul>
</details>
<p>
<a href="https://discord.gg/SEefvsutca"><img class="logo" title="Discord community" src="img/discord.svg"></a>
<a href="https://github.com/laurentlb/lingostories"><img class="inv-logo" title="GitHub" src="img/github.svg"></a>
<a href="https://www.instagram.com/lingostories"><img class="logo" title="Instagram" src="img/instagram.svg"></a>
</p>
</div>
</div>
</div>
<div class="footer">
<img class="icon player-icon" id="player-next" src="img/player-play.svg" title="Continue (Space key)" onclick="next();">
<img class="icon player-icon" id="microphone-button" src="img/microphone.svg" title="Repeat out loud in your Microphone (M key)" onclick="listenMic();">
</div>
<script>
function toggleOptions() {
var options = document.querySelector('.options');
options.style.display = options.style.display === 'block' ? 'none' : 'block';
}
function toggleCollection() {
var collection = document.querySelector('.top-collection');
collection.style.display = collection.style.display === 'block' ? 'none' : 'block';
}
</script>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-SJPVM9P6EP"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-SJPVM9P6EP');
</script>