-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathapp.html
211 lines (173 loc) · 11 KB
/
app.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
<!doctype html>
<html class="no-js" lang="en" ng-app="speedReadingApp">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Readio Speed Reader</title>
<link rel="stylesheet" href="css/app.css" />
</head>
<body ng-controller="MainCtrl" ng-class="
(game.paused ? 'is-paused' : 'is-not-paused') + ' ' +
(game.hasStarted ? 'has-started' : 'has-not-started') + ' ' +
(settings.nightMode ? 'dark-mode' : 'bright-mode') + ' ' +
(settings.highlightFocusPoint ? 'highlight-focus-point' : '') + ' ' +
(settings.useSerifFont ? 'serif-font' : '') + ' ' +
(settings.showLoadingOverlay ? 'is-loading' : '') + ' ' +
(settings.init ? 'init' : '') + ' ' +
(settings.centerFocusPoint ? 'center-focus-point' : '')
">
<div class="front">
<div class="top-bar">
<div class="inner-container">
<div class="bar-item">
<a class="icon-button outlined has-text" ng-click="startRead()"><i class="fa fa-play"></i>Start reading</a>
</div>
<div class="toast" ng-show="settings.toast">
<p>{{ settings.toast }}</p>
</div>
</div> <!-- inner container -->
</div> <!-- top bar -->
<div class="editor-container">
<textarea ng-model="settings.text" class="editor mousetrap" placeholder="Paste text here..." spellcheck=false ng-paste="formatPastedText($event)"></textarea>
</div>
</div>
<div class="read-canvas">
<div class="inner-content">
<div class="top-controls">
<div class="left">
<a style="width: 132px;" class="icon-button outlined has-text right-spacing show-if-paused" ng-click="continueRead();" title="Continue"><i class="fa fa-play"></i>Continue</a>
<a style="width: 132px;" class="icon-button outlined has-text right-spacing show-if-not-paused" ng-click="pauseRead();" title="Pause"><i class="fa fa-pause"></i>Pause</a>
<a class="icon-button icon-shorter" ng-click="pauseRead(); goToPosition('prev_sentence');" title="Jump to previous sentence"><i class="fa fa-step-backward"></i></a>
<a class="icon-button icon-shorter" ng-click="pauseRead(); goToPosition('next_sentence');" title="Jump to next sentence"><i class="fa fa-step-forward"></i></a>
<a class="icon-button has-text" ng-click="stopRead();" title="Stop">Edit</a>
</div>
<div class="right">
<div class="relative">
<a class="icon-button outlined" title="Show keyboard shortcuts" data-toggle-dropdown="in-read-keyboard-dropdown"><i class="fa fa-keyboard-o"></i></a>
<div style="width: 320px;" id="in-read-keyboard-dropdown" class="dropdown keyboard-shortcuts-dropdown">
<p>Press <span class="key">space</span> to pause/continue,</p>
<hr>
<p><span class="key">up</span> or <span class="key">W</span> to increase speed,</p>
<p><span class="key">down</span> or <span class="key">S</span> to decrease speed,</p>
<hr>
<p><span class="key">left</span> or <span class="key">a</span> for previous word,</p>
<p><span class="key">right</span> or <span class="key">d</span> for next word,</p>
<hr>
<p><span class="key">ctrl + left</span> or <span class="key">q</span> for previous sentence</p>
<p><span class="key">ctrl + right</span> or <span class="key">e</span> for next sentence</p>
</div>
</div>
<div class="relative">
<a class="icon-button outlined" title="Show settings" data-toggle-dropdown="in-read-drop-settings"><i class="fa fa-gear"></i></a>
<div id="in-read-drop-settings" class="dropdown">
<div class="form-row">
<div class="checkbox">
<div class="check">
<input ng-model="settings.pauseBetweenSentences" id="set-pause-sent-chk" type="checkbox">
<span></span>
</div>
<label for="set-pause-sent-chk">Pause between sentences</label>
</div>
</div>
<div class="form-group">
<div class="form-row">
<div class="checkbox">
<div class="check">
<input ng-model="settings.centerFocusPoint" id="set-center-focus-point-chk" type="checkbox">
<span></span>
</div>
<label for="set-center-focus-point-chk">Center focus point</label>
</div>
</div>
<div class="form-row {{ !settings.centerFocusPoint ? 'disabled' : '' }}">
<div class="checkbox">
<div class="check">
<input ng-model="settings.highlightFocusPoint" id="set-highlight-focus-point-chk" type="checkbox">
<span></span>
</div>
<label for="set-highlight-focus-point-chk">Highlight focus point</label>
</div>
</div>
</div>
<div class="form-row">
<div class="checkbox">
<div class="check">
<input ng-model="settings.nightMode" id="set-nm-chk" type="checkbox">
<span></span>
</div>
<label for="set-nm-chk">Dark mode</label>
</div>
</div>
<div class="form-row">
<div class="checkbox">
<div class="check">
<input ng-model="settings.enableMultiplier" id="set-enable-multiplier-chk" type="checkbox">
<span></span>
</div>
<label for="set-enable-multiplier-chk" title="Slow down or speed up words based on their length.">Smart speed (?)</label>
</div>
</div>
<div class="form-row">
<div class="checkbox">
<div class="check">
<input ng-model="settings.useSerifFont" id="set-serifFont-chk" type="checkbox">
<span></span>
</div>
<label for="set-serifFont-chk">Use Serif font style</label>
</div>
</div>
<div class="form-row">
<select ng-model="settings.countdownMultiplier"
ng-options="opt.value as opt.label for opt in settings.countdownMultiplierOptions">
</select>
</div>
</div>
</div>
</div>
<div class="center">
<div class="wpm-setting">
<a class="icon-button" ng-click="setWPM(settings.wpm - 50)" title="Slower"><i class="fa fa-minus"></i></a>
<span> {{ settings.wpm }} wpm </span>
<a class="icon-button" ng-click="setWPM(settings.wpm + 50)" title="Faster"><i class="fa fa-plus"></i></a>
</div>
</div>
</div>
<div class="word-container">
<div class="focus-point">
<div class="scaler">
<div class="before">
<div class="preview-words">
<span ng-if="game.delayedPause" ng-repeat="n in [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1]">{{ game.words[game.currentWord + n].value ? game.words[game.currentWord + n].value : ' ' }} </span>
</div>
<span ng-if="settings.centerFocusPoint">{{ game.words[game.currentWord].raw.start || ' ' }}</span>
</div>
<span class="highlight" ng-if="!settings.centerFocusPoint"> {{ game.words[game.currentWord].value ? game.words[game.currentWord].value :' ' }} </span>
<span class="highlight" ng-if="settings.centerFocusPoint"> {{ game.words[game.currentWord].raw.highlighted ? game.words[game.currentWord].raw.highlighted : ' ' }} </span>
<div class="after">
<span ng-if="settings.centerFocusPoint">{{ game.words[game.currentWord].raw.end || ' ' }}</span>
<div class="preview-words">
<span ng-if="game.delayedPause" ng-repeat="n in [1,2,3,4,5,6,7,8,9,10]"> {{ game.words[game.currentWord + n].value ? game.words[game.currentWord + n].value : ' ' }}</span>
</div>
</div>
</div>
</div>
<div id="countdown-bar" class="countdown-bar">
<div class="progress"></div>
</div>
</div>
<div id="timeline" class="timeline">
<rzslider rz-slider-model="game.currentWord" rz-slider-options="slider.options"></rzslider>
<span class="time-stats" title="{{ game.percentComplete(true) }}% complete">{{ game.timeToComplete() }}</span>
</div>
</div>
</div>
<div class="loading-screen">
<div class="icon">Loading</div>
</div>
<script src="js/libs/jquery.min.js"></script>
<script src="js/libs/angular.js"></script>
<script src="js/libs/angular.rzslider.js"></script>
<script src="js/libs/mousetrap.js"></script>
<script src="js/min/app.js"></script>
</body>
</html>