-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
102 lines (101 loc) · 4.07 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
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="/scripts/d3/d3.min.js"></script>
<link rel="stylesheet" type="text/css" href="/scripts/bootstrap/dist/css/bootstrap.css">
<link rel="stylesheet" type="text/css" href="./stylesheet.css">
<script type="text/javascript" src="./graph.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
<title>Graphs</title>
</head>
<body>
<div class="container">
<div class="row">
<div class="col-md-offset-4 col-md-4">
<h1 class="text-center">Graphs!!</h1>
</div>
</div>
<div class="row">
<div class="col-md-2">
<div class="row">
<div class="col-md-12">
<h4>Add Node:</h4>
<form onsubmit="return false">
<div class="form-group">
<label for="nodeVal">Node</label>
<input type="text" class="form-control" id="addNodeV" placeholder="Value">
</div>
<button type="submit" class="btn btn-primary" onclick="addNode()">Add Node</button>
</form>
</div>
<div class="col-md-12">
<h4>Add Edge:</h4>
<form onsubmit="return false">
<div class="form-group">
<label for="fromLbl">From:</label>
<input class="form-control" id="addFrom" placeholder="Node Value">
</div>
<div class="form-group">
<label for="toLbl">To:</label>
<input class="form-control" id="addTo" placeholder="Node Value">
</div>
<div class="form-group">
<label for="weightLbl">Weight:</label>
<input class="form-control" id="addW" placeholder="Number (optional)">
</div>
<div class="checkbox">
<label>
<input type="checkbox" id="directed"> Directed
</label>
</div>
<button type="submit" onclick="addEdge()" class="btn btn-success">Add Edge</button>
</form>
</div>
</div>
</div>
<div class="col-md-8 panel panel-default">
<div class="svg-container" id="content"></div>
</div>
<div class="col-md-2">
<div class="row">
<div class="col-md-12">
<h4>Remove Node:</h4>
<form onsubmit="return false">
<div class="form-group">
<label for="nodeVal">Node</label>
<input type="text" class="form-control" id="rmNodeV" placeholder="Value">
</div>
<button type="submit" onclick="rmNode()" class="btn btn-danger">Remove Node</button>
</form>
</div>
<div class="col-md-12">
<h4>Remove Edge:</h4>
<form onsubmit="return false">
<div class="form-group">
<label for="fromLbl">From:</label>
<input class="form-control" id="rmFrom" placeholder="Node Value">
</div>
<div class="form-group">
<label for="toLbl">To:</label>
<input class="form-control" id="rmTo" placeholder="Node Value">
</div>
<button type="submit" onclick="rmEdge()" class="btn btn-warning">Remove Edge</button>
</form>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-offset-4 col-md-4">
<h3 class="text-center">
<a href="https://github.com/viestat/graph"><i class="fa fa-github"></i></a>
<a href="https://twitter.com/Viestat"><i class="fa fa-twitter"></i></a>
<a href="https://aviesca.herokuapp.com/"><i class="fa fa-info"></i></a>
</h3>
<h6 class="text-center">Andrés Viesca </h5>
</div>
</div>
</div>
<script type="text/javascript" src="./app.js"></script>
</body>
</html>