generated from VCGithubCode/vernell-c-new-repo-generator
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathvoice.html
465 lines (392 loc) · 16.9 KB
/
voice.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
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Access Granted | Voice Assistant</title>
<link rel='shortcut icon' href="assets/images/logo.webp">
<script src="https://code.responsivevoice.org/responsivevoice.js"></script>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.5/font/bootstrap-icons.css" rel="stylesheet">
<script src="assets/js/utils.js" defer></script>
<script src="assets/js/voice_interface.js" defer></script>
<style>
body {
background-image: url('../images/shiny1.webp');
font-family: Arial, sans-serif;
text-align: center;
height: 100VH;
}
body .voice-container {
background-image: url('/assets/images/shiny1.webp') !important;
background-position: bottom center;
background-size: cover;
background-repeat: no-repeat;
height: 100%;
overflow-y: scroll;
position: relative;
}
.assistant-title {
margin-top: 100px;
}
.overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.7);
display: flex;
justify-content: center;
align-items: center;
color: white;
font-size: 24px;
z-index: 1000;
}
.output {
margin-top: 20px;
font-size: 16px;
color: #333;
}
.weather-output {
margin-top: 20px;
font-size: 18px;
color: #333;
}
/* Planner and Reminder Section Styles */
.planner-reminder {
margin-top: 40px;
padding: 20px;
background-color: #f4f4f4;
border-radius: 8px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
max-width: 600px;
margin-left: auto;
margin-right: auto;
}
.planner-reminder h2 {
font-size: 24px;
color: #333;
}
.planner-reminder ul {
list-style-type: none;
padding: 0;
}
.planner-reminder ul li {
padding: 10px;
background-color: #e9ecef;
border-radius: 5px;
margin-bottom: 10px;
font-size: 18px;
}
.planner-reminder ul li span {
font-weight: bold;
}
/* Current Time Section */
.current-time {
margin-top: 20px;
font-size: 24px;
font-weight: bold;
color: #333;
}
.calendar-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
}
.calendar-header button {
font-size: 20px;
padding: 5px 10px;
cursor: pointer;
}
.calendar-header h2 {
font-size: 24px;
margin: 0;
}
.days-of-week {
display: grid;
grid-template-columns: repeat(7, 1fr);
margin-bottom: 10px;
font-size: 12px;
}
#calculator {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background-color: white;
}
#microphone-indicator {
background-color: black;
}
#microphone-indicator img {
width: 100px;
height: 100px;
}
#microphone-indicator p {
font-size: 12px;
font-weight: 600;
color: white;
}
.delete-note-button {
background-color: white !important;
border: none;
border-radius: 10px;
padding: 5px;
}
.day {
padding: 10px;
font-weight: bold;
text-align: center;
background-color: #f4f4f4;
}
.days {
display: grid;
grid-template-columns: repeat(7, 1fr);
font-size: 12px;
}
.day-box {
padding: 15px;
text-align: center;
cursor: pointer;
}
.day-box:hover {
background-color: #007bff;
color: white;
}
.day-box.disabled {
background-color: #000000;
color: #aaa;
cursor: not-allowed;
}
.current-day {
background-color: #000000;
color: white;
}
#calendar-container {
width: 400px;
}
/* Ensure no bullets for list items in organizer-output */
#organizer-output ul {
list-style: none;
padding: 0;
margin: 0;
}
/* Specifically remove markers (bullets) from list items */
#organizer-output li::marker {
content: none;
}
/* Styling for individual list items */
#organizer-output li {
margin-bottom: 15px;
text-decoration: none;
background-color: #000000;
color: white;
padding: 10px;
border-radius: 5px;
}
/* Your existing styles here */
.instructions-container {
display: flex;
flex-wrap: wrap;
gap: 20px;
justify-content: flex-start;
padding: 20px;
display: none; /* Initially hidden */
}
.instruction {
flex: 1 1 calc(33.33% - 20px);
margin-bottom: 20px;
padding: 10px;
border: 1px solid #ccc;
border-radius: 5px;
box-sizing: border-box;
}
.instruction p {
margin: 0 0 10px 0;
}
.instruction button {
padding: 10px 15px;
background-color: #4CAF50;
color: white;
border: none;
cursor: pointer;
border-radius: 5px;
}
.instruction button:hover {
background-color: #45a049;
}
</style>
</head>
<body>
<header class="fixed-top">
<nav class="navbar navbar-expand-lg">
<div class="container">
<a class="navbar-brand" href="index.html">
<img src="assets/images/logo.webp" alt="Access Granted Logo" width="30" height="30"
class="d-inline-block align-top">
Access Granted
</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarContent"
aria-controls="navbarContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarContent">
<ul class="navbar-nav ms-auto mb-2 mb-lg-0">
<li class="nav-item mt-2">
<a class="nav-link" href="resources.html"><i class="fas fa-book"></i> Resources</a>
</li>
<li class="nav-item mt-2">
<a class="nav-link" href="about.html"><i class="fas fa-info-circle"></i> About</a>
</li>
<li class="nav-item mt-2">
<a class="nav-link" href="contact.html"><i class="fas fa-envelope"></i> Contact</a>
</li>
<li><button class="btn btn-secondary mt-2" type="button" data-bs-toggle="offcanvas"
data-bs-target="#offcanvasWithBothOptions" aria-controls="offcanvasWithBothOptions"><i
class="fas fa-universal-access"></i> Accessibility</button></li>
</ul>
</div>
</div>
</nav>
</header>
<div class="voice-container">
<h1 class="assistant-title">Voice Assistant</h1>
<!-- Add this to your HTML -->
<div id="buddy-talking-indicator"
style="display:none; background-color: #000000; color: white; font-size: 20px;">
</div>
<!-- Add this to your HTML -->
<div id="buddy-standby-indicator"
style="display:none; background-color: #000000; color: rgb(255, 255, 255); font-size: 20px;">
</div>
<div class="brief-me-container" style="margin-top: 20px;">
<!-- Microphone Indicator -->
<div id="microphone-indicator" style="display: none;">
<img src="assets/images/microphone-iconNoBG.png" alt="Listening">
<p class="listening-text">LISTENING...</p>
</div>
</div>
<button id="toggle-instructions-btn" class="btn btn-primary mt-4">Instructions</button>
<div class="instructions-container" id="instructions-container">
<div class="instruction" id="navigation">
<p>To navigate, use voice commands like 'Go to home' or 'Navigate to settings'.</p>
</div>
<div class="instruction" id="wakeUp">
<p>To wake up, say 'Wake up' or 'Activate the assistant'.</p>
</div>
<div class="instruction" id="noteCreation">
<p>To create a note, say 'Create a note' followed by the content.</p>
</div>
<div class="instruction" id="weather">
<p>To check the weather, say 'What’s the weather today?' or 'Is it raining?'</p>
</div>
<div class="instruction" id="calculator-instruction">
<p>To use the calculator, say 'Open calculator' or 'Calculate 25 plus 50'.</p>
</div>
</div>
<!-- Overlay for permission request -->
<div id="permissionOverlay" class="overlay" onclick="handleOverlayClick()">
<div class="overlay-text">Click anywhere to grant voice and location permissions</div>
</div>
<!-- Weather Output -->
<div id="weather-output" class="weather-output"></div>
<div class="container vh-100 d-flex align-items-center">
<div class="row w-100 gy-3">
<!-- Calendar Container -->
<div id="calendar-container" class="col-12 col-md-6 d-flex flex-column align-items-center">
<div class="calendar-header mb-3">
<button id="prev-month" class="btn btn-outline-primary">←</button>
<h2 id="calendar-title" class="d-inline mx-2">Month</h2>
<button id="next-month" class="btn btn-outline-primary">→</button>
</div>
<div class="days-of-week d-flex justify-content-between w-100 text-center">
<div class="day">Sun</div>
<div class="day">Mon</div>
<div class="day">Tue</div>
<div class="day">Wed</div>
<div class="day">Thu</div>
<div class="day">Fri</div>
<div class="day">Sat</div>
</div>
<div class="days mt-3" id="days-container">
<!-- Calendar days will be dynamically injected here -->
</div>
</div>
<!-- Weather and Time Container -->
<div class="col-12 col-md-6 d-flex justify-content-center align-items-center flex-column">
<div id="displayed-weather" class="displayed-weather mb-3">
<i class="bi bi-cloud-sun" style="font-size: 2rem;"></i> Weather Info
</div>
<div id="current-time" class="current-time">
<i class="bi bi-clock" style="font-size: 2rem;"></i> 12:00 PM
</div>
</div>
</div>
</div>
<div id="organizer-output" class="organizer-output">
<ul class="notes-list">
<li style="margin-bottom: 15px;">
</li>
</ul>
</div>
<!-- Accessible Calculator Display -->
<div id="calculator" style="display: none; padding: 20px; max-width: 300px;">
<!-- Calculator screen -->
<div id="calc-result"></div>
<input type="text" id="calculator-display" readonly
style="width: 100%; height: 50px; font-size: 1.5em; text-align: right; padding: 10px; margin-bottom: 10px;">
<!-- Calculator buttons -->
<div style="display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;">
<!-- Number buttons -->
<button onclick="appendNumber('1')" style="font-size: 1.5em; padding: 20px;">1</button>
<button onclick="appendNumber('2')" style="font-size: 1.5em; padding: 20px;">2</button>
<button onclick="appendNumber('3')" style="font-size: 1.5em; padding: 20px;">3</button>
<button onclick="appendOperator('+')" style="font-size: 1.5em; padding: 20px;">+</button>
<button onclick="appendNumber('4')" style="font-size: 1.5em; padding: 20px;">4</button>
<button onclick="appendNumber('5')" style="font-size: 1.5em; padding: 20px;">5</button>
<button onclick="appendNumber('6')" style="font-size: 1.5em; padding: 20px;">6</button>
<button onclick="appendOperator('-')" style="font-size: 1.5em; padding: 20px;">−</button>
<button onclick="appendNumber('7')" style="font-size: 1.5em; padding: 20px;">7</button>
<button onclick="appendNumber('8')" style="font-size: 1.5em; padding: 20px;">8</button>
<button onclick="appendNumber('9')" style="font-size: 1.5em; padding: 20px;">9</button>
<button onclick="appendOperator('*')" style="font-size: 1.5em; padding: 20px;">×</button>
<button onclick="clearDisplay()"
style="font-size: 1.5em; padding: 20px; grid-column: span 2;">C</button>
<button onclick="appendNumber('0')" style="font-size: 1.5em; padding: 20px;">0</button>
<button onclick="calculateResult()" style="font-size: 1.5em; padding: 20px;">=</button>
<button onclick="appendOperator('/')" style="font-size: 1.5em; padding: 20px;">÷</button>
</div>
</div>
</div>
<footer class="text-muted py-5">
<div class="container footerdiv">
<div class="row">
<div class="col-md-4">
<h5>Social</h5>
<ul class="list-unstyled">
<li><a href="https://github.com/VCGithubCode/access-granted" class="text-muted" target="_blank"
rel="noopener" aria-label="Visit our github repository page(Opens in a new tab)"
aria-hidden="true"><i class="fa-brands fa-github"></i> Github</a></li>
<li><a href="https://app.slack.com/client/T0L30B202/C080JB3ETHU" class="text-muted"
target="_blank" rel="noopener" aria-label="Visit our Slack channel(Opens in a new tab)"
aria-hidden="true"><i class="fa-brands fa-slack"></i> Slack</a></li>
</ul>
</div>
<div class="col-md-4">
<h5>Site Map</h5>
<ul class="list-unstyled">
<li><a href="index.html" class="text-muted">Home</a></li>
<li><a href="about.html" class="text-muted">About</a></li>
<li><a href="resources.html" class="text-muted">Resources</a></li>
<li><a href="contact.html" class="text-muted">Contact</a></li>
<li><a href="accessibility-guide.html" class="text-muted">Accessibility guide</a></li>
</ul>
</div>
</div>
<p class="mb-1">© 2024 Access Granted Project</p>
</div>
</footer>
</body>
</html>