-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
68 lines (63 loc) · 3.06 KB
/
index.html
File metadata and controls
68 lines (63 loc) · 3.06 KB
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
<!DOCTYPE html>
<html lang="vi">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="icon" type="image/x-icon" href="favicon.ico"/>
<title>Tree Visualization</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet" />
<link rel="stylesheet" href="style.css" />
</head>
<body>
<div class="container my-4">
<h1 class="text-center mb-4" id="tree-title"></h1>
<div class="row justify-content-center">
<div class="col-md-8 col-lg-6">
<div class="controls-card p-3 shadow-sm rounded">
<!-- Tree type selection -->
<div class="d-flex justify-content-center mb-3">
<div class="btn-group" role="group" aria-label="Tree type toggle">
<input type="radio" class="btn-check" name="tree-type" id="bst-radio" value="bst" autocomplete="off" checked />
<label class="btn btn-outline-primary" for="bst-radio">BST</label>
<input type="radio" class="btn-check" name="tree-type" id="avl-radio" value="avl" autocomplete="off" />
<label class="btn btn-outline-primary" for="avl-radio">AVL</label>
</div>
</div>
<!-- Input row -->
<div class="mb-3">
<input type="text" id="node-value" class="form-control rounded-pill" placeholder="Nhập giá trị, vd: 10, 20 5 15" />
</div>
<div class="d-flex justify-content-center text-dark">
<button class="btn btn-success rounded-pill px-4" id="insert-btn">Thêm</button>
<button class="btn btn-danger ms-2" id="delete-btn" disabled>Xóa</button>
<button class="btn btn-primary ms-2" id="search-btn" disabled>Tìm kiếm</button>
<button class="btn btn-warning ms-2" id="reset-btn">Reset</button>
<button class="btn btn-info ms-2" id="details-btn" disabled>Chi tiết</button>
</div>
</div>
</div>
</div>
<div class="tree-container-wrapper mt-4">
<div id="tree-container" class="tree-container shadow rounded">
<svg id="tree-svg"></svg>
</div>
</div>
</div>
<!-- Details Modal -->
<div class="modal fade" id="detailsModal" tabindex="-1" aria-labelledby="detailsModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg modal-dialog-scrollable">
<div class="modal-content bg-detail">
<div class="modal-header">
<h5 class="modal-title text-danger" id="detailsModalLabel"></h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body" id="modal-body-content">
<!-- Content will be injected by JS -->
</div>
</div>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
<script type="module" src="./js/app.js"></script>
</body>
</html>