-
Notifications
You must be signed in to change notification settings - Fork 2
/
academic.html
499 lines (484 loc) · 32.1 KB
/
academic.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
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
<!DOCTYPE html>
<html lang="en" data-bs-theme="auto">
<head>
<meta charset="utf-8">
<title>Oxford Academic iWriter</title>
<meta content="width=device-width, initial-scale=1" name="viewport" />
<link href="styles/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="styles/style.css" />
<link rel="icon" type="image/png" href="images/icons/ios/128.png" />
<script src="scripts/jsstore.min.js"></script>
<style>
.bi-nav {
fill: currentcolor;
height: 1em;
width: 1em;
}
.active .bi-nav {
display: block !important;
}
</style>
</head>
<body>
<div id="iLoader" class="overlay d-flex justify-content-center align-items-center">
<div class="d-flex justify-content-center">
<div class="spinner-border" style="width: 5rem; height: 5rem;" role="status">
<span class="visually-hidden">Loading...</span>
</div>
</div>
</div>
<nav class="mb-2 navbar navbar-expand-lg bg-body-tertiary">
<div class="container-fluid d-flex align-items-stretch">
<a class="navbar-brand" href="#">Oxford Academic iWriter</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link" href="https://yell0wsuit.page/">Home</a>
</li>
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="../index.html">Oxford iWriter</a>
</li>
<li class="nav-item">
<a class="nav-link" href="../../ispeaker/">Oxford iSpeaker</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="javascript:void(0);" id="bd-theme" aria-expanded="false" data-bs-toggle="dropdown" data-bs-display="static">
<svg class="bi-nav ms-1 theme-icon-active">
<use href="#circle-half"></use>
</svg>
<span class="ms-2">Toggle theme</span>
</a>
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="bd-theme">
<li>
<a class="dropdown-item d-flex align-items-center" href="javascript:void(0);" data-bs-theme-value="light">
<svg class="bi-nav me-2 opacity-50 theme-icon">
<use href="#sun-fill"></use>
</svg>
Light
<svg class="bi-nav ms-auto d-none">
<use href="#check2"></use>
</svg>
</a>
</li>
<li>
<a class="dropdown-item d-flex align-items-center" href="javascript:void(0);" data-bs-theme-value="dark">
<svg class="bi-nav me-2 opacity-50 theme-icon">
<use href="#moon-stars-fill"></use>
</svg>
Dark
<svg class="bi-nav ms-auto d-none">
<use href="#check2"></use>
</svg>
</a>
</li>
<li>
<a class="dropdown-item d-flex align-items-center" href="javascript:void(0);" data-bs-theme-value="auto">
<svg class="bi-nav me-2 opacity-50 theme-icon">
<use href="#circle-half"></use>
</svg>
Follow OS theme
<svg class="bi-nav ms-auto d-none">
<use href="#check2"></use>
</svg>
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
</nav>
<div class="main_wrapper container-fluid mb-4">
<div class="inner_wrapper container-lg">
<div class="d-flex justify-content-end">
<button type="button" class="btn btn-primary help_btn common_page mb-md-5">Help</button>
</div>
<div class="first_page common_page container-lg mt-5 p-lg-5" id="first_page">
<h1 class="mb-4 fw-semibold text-primary-emphasis d-flex justify-content-center text-center">
<span>Oxford Academic <span class="p-2 bg-warning rounded-5 text-dark">iWriter</span></span>
</h1>
<p class="lead mb-4 d-flex justify-content-center text-center"><a href="./index.html">Go to Oxford iWriter</a></p>
<div class="middle_of_page d-flex justify-content-center">
<div class="row">
<div class="col-md-6 mb-4">
<div class="card shadow-sm h-100">
<div class="card-body d-flex flex-column">
<h5 class="card-title">Models</h5>
<p class="card-text">Choose one of many topics to get started.</p>
<div class="card-text mt-auto mb-3 d-flex justify-content-center"><img class="w-25" src="images/mitr/iwriter-logo_modules.svg" /></div>
<div class="mt-auto d-flex justify-content-center"><a href="#" class="btn btn-primary fn_left w-50">Open</a></div>
</div>
</div>
</div>
<div class="col-md-6 mb-4">
<div class="card shadow-sm h-100">
<div class="card-body d-flex flex-column">
<h5 class="card-title">My Writing</h5>
<p class="card-text">Practice writing with guides.</p>
<div class="card-text mt-auto mb-3 d-flex justify-content-center"><img class="w-25" src="images/mitr/iwriter-logo_mywriting.svg" /></div>
<div class="mt-auto d-flex justify-content-center"><a href="#" class="btn btn-primary fn_rigth w-50">Open</a></div>
</div>
</div>
</div>
<div class="d-flex justify-content-center dropdown-center mt-4">
<button class="btn btn-warning dropdown-toggle save_p_btn_txt" type="button" data-bs-toggle="dropdown" aria-expanded="false">
<span class="writing_list_results"></span> saved writing(s)
</button>
<ul class="dropdown-menu">
<li class="save_p_btn_home"></li>
</ul>
</div>
</div>
</div>
</div>
<div class="second_page common_page" id="second_page" style="display: none;">
<nav class="navbar navbar-expand-lg bg-primary-subtle">
<div class="container-fluid">
<div id="modelnavbar" class="navbar-brand text-truncate fw-semibold">
Choose the model you want to see
</div>
<button class="navbar-toggler collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#innerNavbar2" aria-controls="innerNavbar2" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="navbar-collapse collapse" id="innerNavbar2">
<ul class="navbar-nav float-start">
<li class="nav-item dropdown fw-semibold">
<div class="nav-link dropdown-toggle fw-semibold" role="button" data-bs-toggle="dropdown" aria-expanded="false">
Menu: <span class="models_page_menu_text">Model</span>
</div>
<ul class="dropdown-menu dropdown-menu-start">
<li>
<div class="dropdown-item current_tool" role="button">My Writing</div>
</li>
<li>
<div class="dropdown-item help_btn" role="button">Help</div>
</li>
<li>
<div class="dropdown-item drp_home_clk" role="button">Home</div>
</li>
</ul>
</li>
</ul>
</div>
</div>
</nav>
<div class="second_page_body container-lg mt-2">
<div class="second_page_body_left">
<p>Click/tap on the project name to get started, or click/tap on the information icon to learn more.</p>
<ul class="list-group list-group-flush">
</ul>
</div>
<div class="second_page_body_right"></div>
</div>
</div>
<div class="models_page common_page" id="models_page" style="display: none;">
<nav class="models_page_top navbar navbar-expand-lg bg-primary-subtle">
<div class="container-fluid">
<div class="guideleft-panel-toggle d-sm-block d-md-none">
<button class="navbar-toggler p-2" type="button" data-bs-toggle="offcanvas" data-bs-target="#modelspagebodyleft" aria-controls="modelspagebodyleft" aria-label="Toggle left panel">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-three-dots" viewBox="0 0 16 16"> <path d="M3 9.5a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm5 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm5 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3z"/> </svg>
</button>
</div>
<div class="navbar-brand text-truncate fw-semibold">
<span class="models_page_left_panel">Comparison 1</span>
</div>
<span class="up_arrow d-flex" data-bs-toggle="popover" data-bs-content="Go back"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-90deg-up" viewBox="0 0 16 16"> <path fill-rule="evenodd" d="M4.854 1.146a.5.5 0 0 0-.708 0l-4 4a.5.5 0 1 0 .708.708L4 2.707V12.5A2.5 2.5 0 0 0 6.5 15h8a.5.5 0 0 0 0-1h-8A1.5 1.5 0 0 1 5 12.5V2.707l3.146 3.147a.5.5 0 1 0 .708-.708l-4-4z"/> </svg></span>
<button class="navbar-toggler collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#innerNavbar" aria-controls="innerNavbar" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="navbar-collapse collapse" id="innerNavbar">
<ul class="navbar-nav float-start">
<li class="nav-item dropdown fw-semibold">
<div class="nav-link dropdown-toggle" role="button" data-bs-toggle="dropdown" aria-expanded="false">
Menu: <span class="models_page_menu_text">Model</span>
</div>
<ul class="dropdown-menu dropdown-menu-start">
<li>
<div class="dropdown-item current_tool" role="button">My Writing</div>
</li>
<li>
<div class="dropdown-item help_btn" role="button">Help</div>
</li>
<li>
<div class="dropdown-item drp_home_clk" role="button">Home</div>
</li>
</ul>
</li>
<li class="nav-item dropdown iwriter_t fw-semibold">
<div class="nav-link dropdown-toggle" role="button" data-bs-toggle="dropdown" aria-expanded="false">
Settings
</div>
<ul class="dropdown-menu dropdown-menu-start">
<li class="dropdown-submenu dropstart">
<a class="dropdown-item dropdown-list-group-item dropdown-toggle load_pro iwriter_t" href="#">
Load a project
</a>
<ul class="dropdown-menu dropstart prolist_load"></ul>
</li>
<li>
<div class="dropdown-item save_pro iwriter_t" role="button" data-bs-toggle="modal" data-bs-target="#saveModal"><div class="save_pro_in">Save</div></div>
</li>
<li>
<div class="dropdown-item iwriter_t" role="button" data-bs-toggle="modal" data-bs-target="#saveAsModal"><div class="saveas_pro_in">Save project as...</div></div>
</li>
<li>
<div class="dropdown-item export_doc iwriter_t" role="button">Export project</div>
</li>
</ul>
</li>
</ul>
</div>
</div>
</nav>
<div class="models_page_body mt-2 container-lg">
<div class="row">
<div class="col-md-4">
<div class="offcanvas offcanvas-start offcanvas-collapse border-0" tabindex="-1" id="modelspagebodyleft" aria-labelledby="modelspagebodyleftLabel">
<div class="offcanvas-header d-md-none">
<h5 class="offcanvas-title" id="modelspagebodyleftLabel">Guides & Choose what to show</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<div class="models_page_body_left">
<div class="left_wrapper mb-4">
<div class="check_content">
<div class="check_top fw-semibold">
<span>Use formal and impersonal language.</span>
</div>
<div class="check_con">
</div>
</div>
<div class="checklist_wrp">
</div>
</div>
<div class="show_structure_panel">
<div class="search_title">
<p>Choose what to show</p>
<p>Explore the model by showing and hiding different elements</p>
</div>
<div class="structure_elements list-group">
<button type="button" class="fw-semibold show_structre str_common list-group-item list-group-item-action list-group-item-danger d-flex justify-content-between" data-bs-dismiss="offcanvas">
Show structure
<div class="badge bg-primary p-1"></div>
</button>
<button type="button" class="fw-semibold show_notes str_common list-group-item list-group-item-action list-group-item-success d-flex justify-content-between" data-bs-dismiss="offcanvas">
Show notes
<div class="badge bg-primary p-1"></div>
</button>
<button type="button" class="fw-semibold show_content str_common list-group-item list-group-item-action list-group-item-primary d-flex justify-content-between" data-bs-dismiss="offcanvas">
Show content
<div class="badge bg-primary p-1"></div>
</button>
<button type="button" class="fw-semibold show_all str_common list-group-item list-group-item-action list-group-item-warning d-flex justify-content-between" data-bs-dismiss="offcanvas">
Show all
<div class="badge bg-primary p-1"></div>
</button>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-8 col-sm-12">
<div class="models_page_body_right">
<div class="models_header mb-4">
</div>
<div class="models_content bg-body-tertiary p-4">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="modal fade" id="saveModal" tabindex="-1" aria-labelledby="saveModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title fs-5" id="saveModalLabel">Save project</h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="save_pop_1">
<div class="modal-body">
<label for="projectname" class="col-form-label">Enter project name:</label>
<div>
<input type="text" name="project_name" class="form-control mb-4 project_name">
<p class="err text-danger"></p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary ok_btn">OK</button>
<button type="button" class="btn btn-secondary can_btn" data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
<div class="save_pop_2">
<div class="modal-body">
<div class="pop_msg_d">Project has been created.</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary ok_btn_common" data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
</div>
<div class="modal fade saveas_pro" id="saveAsModal" tabindex="-1" aria-labelledby="saveAsModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title fs-5" id="saveAsModalLabel">Save project as</h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="save_pop_1">
<div class="modal-body">
<label for="projectname" class="col-form-label">Enter project name:</label>
<div>
<input type="text" name="project_name" class="form-control mb-4 project_name">
<p class="err text-danger"></p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary ok_btn create_mode">OK</button>
<button type="button" class="btn btn-secondary ok_btn_common" data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
<div class="save_pop_2">
<div class="modal-body">
<div class="pop_msg_d">Project has been created.</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary ok_btn_common" data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
</div>
<div class="modal fade" id="deleteModal" tabindex="-1" aria-labelledby="deleteModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title fs-5" id="deleteModalLabel">Confirm delete project</h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div id="confirmDelete">
<div class="modal-body" id="deleteProjName">
Do you want to delete this project?
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary ok_btn_delete">OK</button>
<button type="button" class="btn btn-secondary can_btn" data-bs-dismiss="modal">Cancel</button>
</div>
</div>
<div id="deleteComplete">
<div class="modal-body">
Project has been deleted successfully.
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary ok_btn_common" data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
</div>
<div class="modal fade" id="newProjectModal" tabindex="-1" aria-labelledby="newProjectModalLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-scrollable">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title fs-5" id="newProjectModalLabel">Covering/Cover Letter</h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
<symbol id="check2" viewBox="0 0 16 16">
<path d="M13.854 3.646a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6.5 10.293l6.646-6.647a.5.5 0 0 1 .708 0z" />
</symbol>
<symbol id="circle-half" viewBox="0 0 16 16">
<path d="M8 15A7 7 0 1 0 8 1v14zm0 1A8 8 0 1 1 8 0a8 8 0 0 1 0 16z" />
</symbol>
<symbol id="moon-stars-fill" viewBox="0 0 16 16">
<path d="M6 .278a.768.768 0 0 1 .08.858 7.208 7.208 0 0 0-.878 3.46c0 4.021 3.278 7.277 7.318 7.277.527 0 1.04-.055 1.533-.16a.787.787 0 0 1 .81.316.733.733 0 0 1-.031.893A8.349 8.349 0 0 1 8.344 16C3.734 16 0 12.286 0 7.71 0 4.266 2.114 1.312 5.124.06A.752.752 0 0 1 6 .278z" />
<path d="M10.794 3.148a.217.217 0 0 1 .412 0l.387 1.162c.173.518.579.924 1.097 1.097l1.162.387a.217.217 0 0 1 0 .412l-1.162.387a1.734 1.734 0 0 0-1.097 1.097l-.387 1.162a.217.217 0 0 1-.412 0l-.387-1.162A1.734 1.734 0 0 0 9.31 6.593l-1.162-.387a.217.217 0 0 1 0-.412l1.162-.387a1.734 1.734 0 0 0 1.097-1.097l.387-1.162zM13.863.099a.145.145 0 0 1 .274 0l.258.774c.115.346.386.617.732.732l.774.258a.145.145 0 0 1 0 .274l-.774.258a1.156 1.156 0 0 0-.732.732l-.258.774a.145.145 0 0 1-.274 0l-.258-.774a1.156 1.156 0 0 0-.732-.732l-.774-.258a.145.145 0 0 1 0-.274l.774-.258c.346-.115.617-.386.732-.732L13.863.1z" />
</symbol>
<symbol id="sun-fill" viewBox="0 0 16 16">
<path d="M8 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM8 0a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 0zm0 13a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 13zm8-5a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2a.5.5 0 0 1 .5.5zM3 8a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2A.5.5 0 0 1 3 8zm10.657-5.657a.5.5 0 0 1 0 .707l-1.414 1.415a.5.5 0 1 1-.707-.708l1.414-1.414a.5.5 0 0 1 .707 0zm-9.193 9.193a.5.5 0 0 1 0 .707L3.05 13.657a.5.5 0 0 1-.707-.707l1.414-1.414a.5.5 0 0 1 .707 0zm9.193 2.121a.5.5 0 0 1-.707 0l-1.414-1.414a.5.5 0 0 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .707zM4.464 4.465a.5.5 0 0 1-.707 0L2.343 3.05a.5.5 0 1 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .708z" />
</symbol>
</svg>
<script>
var iWriter_controller;
function initiateController() {
iWriter_controller = new Controller();
iWriter_controller.init({
xmlPath: 'xml/academic/',
imgPath: 'images/'
});
}
</script>
<script src="scripts/jquery.min.js" type="text/javascript" language="JavaScript"></script>
<script src="scripts/bootstrap.bundle.min.js"></script>
<script src="scripts/custom.js" type="text/javascript" language="JavaScript"></script>
<script src="scripts/controller.js" type="text/javascript" language="JavaScript"></script>
<script>
/*!
* Color mode toggler for Bootstrap's docs (https://getbootstrap.com/)
* Copyright 2011-2022 The Bootstrap Authors
* Licensed under the Creative Commons Attribution 3.0 Unported License.
*/
(() => {
'use strict'
const storedTheme = localStorage.getItem('theme')
const getPreferredTheme = () => {
if (storedTheme) {
return storedTheme
}
return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'
}
const setTheme = function(theme) {
if (theme === 'auto' && window.matchMedia('(prefers-color-scheme: dark)').matches) {
document.documentElement.setAttribute('data-bs-theme', 'dark')
} else {
document.documentElement.setAttribute('data-bs-theme', theme)
}
}
setTheme(getPreferredTheme())
const showActiveTheme = theme => {
const activeThemeIcon = document.querySelector('.theme-icon-active use')
const btnToActive = document.querySelector(`[data-bs-theme-value="${theme}"]`)
const svgOfActiveBtn = btnToActive.querySelector('svg use').getAttribute('href')
document.querySelectorAll('[data-bs-theme-value]').forEach(element => {
element.classList.remove('active')
})
btnToActive.classList.add('active')
activeThemeIcon.setAttribute('href', svgOfActiveBtn)
}
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', () => {
if (storedTheme !== 'light' || storedTheme !== 'dark') {
setTheme(getPreferredTheme())
}
})
window.addEventListener('DOMContentLoaded', () => {
showActiveTheme(getPreferredTheme())
document.querySelectorAll('[data-bs-theme-value]')
.forEach(toggle => {
toggle.addEventListener('click', () => {
const theme = toggle.getAttribute('data-bs-theme-value')
localStorage.setItem('theme', theme)
setTheme(theme)
showActiveTheme(theme)
})
})
})
})()
</script>
</body>
</html>