-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
493 lines (467 loc) · 26 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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Simple JavaScript | Button </title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-w76AqPfDkMBDXo30jS1Sgez6pr3x5MlQ1ZAGC+nuZB+EYdgRZgiwxhTBTkF7CXvN"
crossorigin="anonymous"></script>
<script type="module" src="calculator.js"></script>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="container mt-3">
<div class="title text-center mb-4">
<h3>Functional Buttons</h3>
</div>
</div>
<div class="container">
<div class="card-group mb-3 row">
<div class="card mx-3 col-12 col-sm-6 col-md-6 col-lg-6">
<div class="card-body">
<h5 class="card-title">Asynchronous programming</h5>
<p class="card-text">
JavaScript is single-threaded, but it can handle multiple tasks simultaneously through asynchronous
programming. </p>
<button class="toggle-btn border-0 bg-white mb-4 text-center">see more </button>
<p class="more"> Understanding the concept of async/await and Promises is essential for handling complex
operations and avoiding blocking the main thread.
</p>
<div>
<a href="#" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#exampleModal1">Click to Demo</a>
</div>
</div>
</div>
<div class="card mx-3 col-12 col-sm-6 col-md-6 col-lg-6">
<div class="card-body">
<h5 class="card-title"> Variables, Data types, and Operators</h5>
<p class="card-text">
Understanding how to declare and manipulate variables and their data types (such as numbers, strings,
booleans,</p>
<button class="toggle-btn border-0 bg-white mb-4 text-center">see more </button>
<p class="more"> etc.) is a fundamental aspect of programming. Understanding the different operators and their
precedence is also important for building expressions and making decisions in code.
</p>
<div>
<a href="#" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#exampleModal2">Click to Demo</a>
</div>
</div>
</div>
<div class="card mx-3 col-12 col-sm-6 col-md-6 col-lg-6">
<div class="card-body">
<h5 class="card-title">Functions</h5>
<p class="card-text">
Functions are a key building block in JavaScript and help to organize code into reusable, composable units.
Understanding concepts </p>
<button class="toggle-btn border-0 bg-white mb-4 text-center">see more </button>
<p class="more">
like hoisting, closures, and immediately-invoked function expressions (IIFEs) is important for writing
clean, maintainable code.
<div>
<a href="#" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#exampleModal3">Click to Demo</a>
</div>
</div>
</div>
<div class="card mx-3 col-12 col-sm-6 col-md-6 col-lg-6">
<div class="card-body">
<h5 class="card-title">Arrays and Objects</h5>
<p class="card-text">
Arrays and objects are the backbone of data structures in JavaScript. Understanding how to manipulate, traverse, and iterate over arrays and </p>
<button class="toggle-btn border-0 bg-white mb-4 text-center">see more </button>
<p class="more"> objects is critical for working with data in a meaningful way.
</p>
<div>
<a href="#" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#exampleModal4">Click to Demo</a>
</div>
</div>
</div>
</div>
<div class="card-group mb-3 row">
<div class="card mx-3 col-lg-6 col-md-6">
<div class="card-body">
<h5 class="card-title">The Document Object Model (DOM) and Browser APIs</h5>
<p class="card-text">
The DOM is a tree-like representation of an HTML document, and understanding how to manipulate the DOM is essential for creating dynamic, interactive web pages. </p>
<button class="toggle-btn border-0 bg-white mb-4 text-center">see more </button>
<p class="more"> Understanding the concept of async/await and Promises is essential for handling complex
operations and avoiding blocking the main thread.
</p>
<div>
<a href="https://aerrowdev.github.io/activity-pre-bot/" class="btn btn-primary" onclick="directlink()">Click to Demo</a>
</div>
</div>
</div>
<div class="card mx-3 col-lg-6 col-md-6">
<div class="card-body">
<h5 class="card-title">Event handling and listeners</h5>
<p class="card-text">
Understanding how to listen for and respond to events, such as user interactions, page loads, and network requests, is critical for creating dynamic, user-friendly web pages.
</p>
<button class="toggle-btn border-0 bg-white mb-4 text-center">see more </button>
<p class="more"> etc.) is a fundamental aspect of programming. Understanding the different operators and their
precedence is also important for building expressions and making decisions in code.
</p>
<div>
<a href="#" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#exampleModal6">Click to Demo</a>
</div>
</div>
</div>
<div class="card mx-3 col-lg-6 col-md-6">
<div class="card-body">
<h5 class="card-title">Prototypal Inheritance and Classes</h5>
<p class="card-text">
JavaScript uses a prototype-based approach to inheritance, rather than the classical inheritance found in languages like Java and C++. </p>
<button class="toggle-btn border-0 bg-white mb-4 text-center">see more </button>
<p class="more">
Understanding how prototypal inheritance works and how to use classes (a recent addition to the language) is important for structuring and organizing code.
<div>
<a href="#" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#exampleModal7">Click to Demo</a>
</div>
</div>
</div>
<div class="card mx-3 col-lg-6 col-md-6">
<div class="card-body">
<h5 class="card-title">Modules and Import/Export statements </h5>
<p class="card-text">
Modules are a way of organizing code and breaking it up into smaller, reusable components. Understanding how to use import and export statements to</p>
<button class="toggle-btn border-0 bg-white mb-4 text-center">see more </button>
<p class="more"> share code between modules is an important aspect of writing modular, scalable code.
</p>
<div>
<a href="#" class="btn btn-primary text-center"data-bs-toggle="modal" data-bs-target="#exampleModal8">Click to Demo</a>
</div>
</div>
</div>
</div>
</div>
<!-- Modal -->
<!-- <div class="modal-dialog modal-lg">
</div> -->
<!-- Modal -->
<!--modal-card-1-->
<div class="modal fade" id="exampleModal1" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title fs-5" id="exampleModalLabel">Asynchronous programming</h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<form class="row g-3">
<div class="col-md-4">
<label for="validationDefaultUsername" class="form-label">Username</label>
<div class="input-group">
<input type="text" id="username" class="form-control" aria-describedby="inputGroupPrepend2" required>
</div>
</div>
<div class="col-md-4">
<label for="validationDefault02" class="form-label">Password</label>
<input type="password" id="password" class="form-control" required>
</div>
<div class="col-12">
<div class="form-check">
<input class="form-check-input" type="checkbox" value="" id="invalidCheck2" required>
<label class="form-check-label" for="invalidCheck2">
Agree to terms and conditions
</label>
</div>
</div>
<div class="col-12">
<button class="btn btn-primary" type="button" onclick="signin()">Sign In</button>
</div>
</form>
<div class="text-muted text-center" id="result"></div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-danger" data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!---end-of-modal-card-1-->
<!--modal-card-2-->
<div class="modal fade" id="exampleModal2" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title fs-5" id="exampleModalLabel">Variables, Data types, and Operators</h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<form class="row g-3">
<div class="col-md-6">
<label for="validationDefaultUsername" class="form-label">First Name</label>
<div class="input-group">
<input type="text" class="form-control" id="FirstName" aria-describedby="inputGroupPrepend2" required>
</div>
</div>
<div class="col-md-6">
<label for="validationDefaultUsername" class="form-label">Last Name</label>
<div class="input-group">
<input type="text" class="form-control" id="LastName" aria-describedby="inputGroupPrepend2" required>
</div>
</div>
<div class="col-md-6">
<label for="validationDefaultUsername" class="form-label">Your Year of Birth</label>
<div class="input-group">
<input type="number" class="form-control" id="YourYear" aria-describedby="inputGroupPrepend2" required>
</div>
</div>
<div class="col-md-6">
<label for="validationDefaultUsername" class="form-label">What Year now?</label>
<div class="input-group">
<input type="number" class="form-control" id="NowYear" aria-describedby="inputGroupPrepend2" required>
</div>
</div>
<div class="col-12">
<button class="btn btn-primary" type="button" onclick="greet()">Submit</button>
</div>
</form>
<div class="text-muted text-center" id="greetnow"></div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-danger" data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!---end-of-modal-card-2-->
<!--modal-card-3-->
<div class="modal fade" id="exampleModal3" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title fs-5" id="exampleModalLabel">Functions</h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<form class="row g-3">
<div class="col-md-12">
<label for="validationDefaultUsername" class="form-label">First Name</label>
<div class="input-group">
<input type="text" class="form-control" id="FirstNamec" aria-describedby="inputGroupPrepend2" required>
</div>
</div>
<div class="col-md-12 text-center">Compute your average.</div>
<div class="col-md-4">
<label for="validationDefaultUsername" class="form-label"> HTML?</label>
<div class="input-group">
<input type="number" class="form-control" id="html" aria-describedby="inputGroupPrepend2" required>
</div>
</div>
<div class="col-md-4">
<label for="validationDefaultUsername" class="form-label"> CSS?</label>
<div class="input-group">
<input type="number" class="form-control" id="css" aria-describedby="inputGroupPrepend2" required>
</div>
</div>
<div class="col-md-4">
<label for="validationDefaultUsername" class="form-label">Javascript?</label>
<div class="input-group">
<input type="number" class="form-control" id="javascript" aria-describedby="inputGroupPrepend2" required>
</div>
</div>
<div class="col-12">
<button class="btn btn-primary" type="button" onclick="average()">Submit</button>
</div>
</form>
<div class="text-muted text-center" id="average"></div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-danger" data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!---end-of-modal-card-3-->
<!--modal-card-4-->
<div class="modal fade" id="exampleModal4" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title fs-5" id="exampleModalLabel">Another World Game</h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<form class="row g-3">
<!--Player name Input -->
<div class="col-md-12">
<label for="validationDefaultUsername" class="form-label">Player Name</label>
<div class="input-group">
<input type="text" class="form-control" id="UID" aria-describedby="inputGroupPrepend2" required>
</div>
</div>
<!-- Message -->
<div class="col-md-12 text-center">catastrophe is coming</div>
<!-- Hero Selector -->
<div class="col-md-12">
<select class="form-select" id="heroSelector" aria-label="Default select example">
<option selected class="text-center">Choose your Hero</option>
<option value="1">Shield Hero</option>
<option value="2">Spear Hero</option>
<option value="3">Bow Hero</option>
<option value="4">Sword Hero</option>
</select>
</div>
<!-- Button -->
<div class="col-12">
<button class="btn btn-primary " type="button" onclick="gameon()">Enter the game</button>
</div>
</form>
<!-- Hero Status -->
<div class="text-muted text-center" id="herostatus"></div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-danger" data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!---end-of-modal-card-4-->
<!--modal-card-6-->
<div class="modal fade" id="exampleModal6" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered modal-dialog-scrollable">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title fs-5" id="exampleModalLabel">Another World Game - Story Time </h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<p class="container">
Chapter 1 <br>
Once upon a time, in a magical land, there was a great catastrophe brewing. The land was being threatened by an evil
force that threatened to destroy everything in its path. The people of the land were afraid and did not know what to do.
</p>
<button class="toggle-btn border-0 bg-white mb-4 text-center">next chapter 2 </button>
<p class="container more">
Chapter 2 <br>
That's when four brave heroes stepped forward to face the challenge. The first hero was the Shield Hero, who was
known
for his unbreakable defense. The second hero was the Spear Hero, who was quick and agile with his weapon. The third
hero
was the Bow Hero, who was a skilled archer with incredible aim. The fourth hero was the Sword Hero, who was strong
and
powerful with his sword.</p> <br>
<button class="toggle-btn border-0 bg-white mb-4 text-center">next chapter 3 </button>
<p class="container more">
Chapter 3 <br>
The four heroes set out on their journey to face the catastrophe and defeat the evil force. They traveled through
treacherous forests, crossed scorching deserts, and climbed towering mountains. Finally, they arrived at the source
of
the catastrophe - a dark castle where the evil force was hiding.
</p> <br>
<button class="toggle-btn border-0 bg-white mb-4 text-center">next chapter 4</button>
<p class="container more">
Chapter 4 <br>
The heroes prepared for battle, each using their unique skills to take on the enemy. The Shield Hero defended
against
the enemy's attacks, the Spear Hero leapt into action, striking the enemy with his spear, the Bow Hero shot arrows
from
a distance, and the Sword Hero sliced through the enemy with his sword.
</p><br>
<button class="toggle-btn border-0 bg-white mb-4 text-center">Final chapter </button>
<p class="container more">
Final <br>
In the end, the heroes emerged victorious, having defeated the evil force and saved the land from destruction. The
people of the land cheered and celebrated the heroes' bravery, and they lived happily ever after.
<br><br>The end.
</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-danger" data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!---end-of-modal-card-6-->
<!--modal-card-7-->
<div class="modal fade" id="exampleModal7" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered modal-dialog-scrollable">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title fs-5" id="exampleModalLabel">To do List </h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<div id="todo-list">
<form>
<div class="col-md-12">
<div class="input-group">
<input type="text" id="new-task-input" class="form-control" aria-describedby="inputGroupPrepend2" required>
<button type="button" class="btn btn-primary" id="add-task-button">Add Task</button>
</div>
</div>
</form>
<p class="text-center my-3">Click the List if Complete</p>
<ul id="task-list" class="to-do-list"></ul>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-danger" data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!---end-of-modal-card-7-->
<!--modal-card-8-->
<div class="modal fade" id="exampleModal8" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered modal-dialog-scrollable">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title fs-5" id="exampleModalLabel"> Basic Calculator </h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<div class="container text-center">
<div class="container row">
<div class="col-md-6">
<label class="form-label">First Number</label>
<div class="input-group">
<input type="number" class="form-control" id="firstNumber" required>
</div>
</div>
<div class="col-md-6">
<label class="form-label">Second Number</label>
<div class="input-group">
<input type="number" class="form-control" id="secondNumber" required>
</div>
</div>
</div><br>
<br>
<div class=" d-grid gap-2 d-md-block text-center ">
<button class="btn btn-primary col-md-2 " id="addition">+</button>
<button class="btn btn-primary col-md-2 " id="subtraction">-</button>
<button class="btn btn-primary col-md-2" id="multiplication">*</button>
<button class="btn btn-primary col-md-2 " id="division">/</button>
</div>
<p id="calculating" class="my-3">Result is</p>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-danger" data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!---end-of-modal-card-8-->
<hr class="container">
<footer class="container">
<div class="text-center">
<p> Created by AerrowDev</p>
</div>
</footer>
<script src="index.js"></script>
<script>
// for Modal
const myModal = document.getElementById('myModal')
const myInput = document.getElementById('myInput')
myModal.addEventListener('shown.bs.modal', () => {
myInput.focus()
})
//end for modal
</script>
</body>
</html>