-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathanswer-questions.html
145 lines (134 loc) · 5.77 KB
/
answer-questions.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Tree Creation</title>
<link href="css/styles.css" rel="stylesheet">
<script src="js/answer-questions.js" type="module" defer></script>
<script src="https://kit.fontawesome.com/fbeeabe0fc.js" crossorigin="anonymous"></script>
<!-- import custom font Nunito -->
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Nunito:wght@700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/seedrandom/3.0.5/seedrandom.min.js"></script>
</head>
<body>
<section class="main-container">
<section class="icon-container">
<i class="fas fa-lightbulb dark-mode-toggle"></i>
<i class="fa-solid fa-rotate-right reset-icon"></i>
<a href="./index.html">
<i class="fa-solid fa-arrow-left"></i>
</a>
</section>
<section class="canvas-container">
<div class="holder">
<ul>
<li>
<label id="treeDegree" value=""></label>
</li>
</ul>
<canvas id="canvas" width="900px" height="670px">
</canvas>
</div>
<!--
<section class="zoom-controls">
<button type="button" class="zoom-in">
+ </button>
<button type="button" class="zoom-out">
- </button>
</section> -->
<section class="panning-controls">
<section class="left-section">
<button type="button" class="l">
←
</button>
</section>
<section class="mid-section">
<button type="button" class="up">
↑
</button>
<button type="button" class="m">
·
</button>
<button type="button" class="down">
↓
</button>
</section>
<section class="right-section">
<button type="button" class="r">
→
</button>
</section>
</section>
<div id="solution-popup" class="popup">
<div id="solution-panel" class="solution">
<span class="close" id="close-solution">×</span>
<h2 id="solution-heading">Correct Tree</h2>
<canvas id="solution-canvas" width="900px" height="450px"></canvas>
</div>
</div>
<div id="help-guide" class="guide">
<div class="guide-content">
<span class="close" id="close-help-guide">×</span>
<h2 id="guide-heading">Getting Started Guide</h2>
<p>Here's a quick guide to using this B-tree simulator:</p>
<ul>
<li><strong>Max Degree (for tree creation):</strong> Enter a number as the maximum degree of the
B-tree.</li>
<li><strong>Num keys (for tree creation):</strong> Enter a number as the number of keys in the
tree.</li>
<li><strong>Random Tree:</strong> Click this button when you have filled in Max Degree and Num
Keys to have a randomised tree.</li>
<li><strong>Custom Tree:</strong> Click this button to create your own B-tree, this will enable
the insert and delete buttons.</li>
<li><strong>Insert:</strong> Enter a number and click this button to insert a node into the
tree.</li>
<li><strong>Delete:</strong> Enter a number and click this button to delete a node from the
tree.</li>
<li><strong>Seeds:</strong> Enter a number and check the "Use Seed" option to generate the same
random tree from reused parameters. Enter a different seed to generate a different tree with
the same parameters.
</li>
</ul>
</div>
</div>
</section>
</section>
<section class="side-panel">
<!-- Question View -->
<section class="parameters-container" id="parameters-container-q">
<ul>
<li class="question">
<label id="question" value=""></label>
</li>
<li>
<button class="random-question">
Next Question
</button>
</li>
<li>
<button class="validate">
Check Answer
</button>
</li>
<li>
<button class="show-correct-tree">
Show Correct Tree
</button>
</li>
<li>
<label id="validation" value=""></label>
</li>
</ul>
<ul>
<h2>More</h2>
<li>
<button id="help-button">Need Help?</button>
</li>
</ul>
</section>
</section>
</body>
</html>