-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
60 lines (56 loc) · 1.79 KB
/
index.html
File metadata and controls
60 lines (56 loc) · 1.79 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Graph Visualizer</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" />
<script src="https://unpkg.com/vis-network/standalone/umd/vis-network.min.js"></script>
</head>
<body>
<div class="container py-5">
<div class="row">
<!-- Input Section (Left) -->
<div class="col-md-4">
<h2 class="text-center mb-4">Graph Input</h2>
<div class="card shadow-lg p-4 mb-4">
<div class="mb-3">
<label for="vertices" class="form-label"
>Number of Vertices</label
>
<input type="number" class="form-control" id="vertices" min="1" />
</div>
<div class="mb-3">
<label for="edges" class="form-label"
>Edges (format: from to)</label
>
<textarea
class="form-control"
id="edges"
rows="6"
placeholder="e.g. 1 2 2 3 3 4"
></textarea>
</div>
<button class="btn btn-primary w-100" onclick="drawGraph()">
Draw Graph
</button>
</div>
</div>
<!-- Graph Visualization Section (Right) -->
<div class="col-md-8">
<h2 class="text-center mb-4">Graph Visualization</h2>
<div
id="network"
class="rounded shadow-lg"
style="height: 500px"
></div>
</div>
</div>
</div>
<script src="script.js"></script>
</body>
</html>